CLI
This package provides a convenient interface to query the MagicBell API.
Quick Start
To get started, install the package with npm
npm install -g magicbell-cliAuthentication
The MagicBell CLI provides two ways to authenticate: interactive browser-based authentication and manual authentication with API keys. Interactive authentication is recommended for local development, while manual authentication is better suited for CI/CD environments.
Interactive Authentication
Log in and authenticate your MagicBell user account to generate a set of authentication keys. To learn more, see our API Authentication docs.
magicbell loginYour browser should open to complete the authentication process. Please click the generated link if it does not.
Output
Starting web-based authentication flow...
Opening browser for authentication...
Please log in with your MagicBell account.
If the browser doesn't open automatically, please visit:
https://api.magicbell.com/cli/auth/initiate?…
Manual Authentication
Optionally, if you don't want to use a browser, use the --manual flag to authenticate with existing keys. This can be helpful when authenticating the CLI in CI/CD environments. This option requires your email, project's JWT, API Key and Secret Key, which are available in the MagicBell Dashboard.
magicbell login \
--manual \
--email $EMAIL \
--jwt $JWT \
--api-key $API_KEY \
--secret-key $SECRET_KEYOutput
Using provided credentials...
✅ Successfully logged in with provided credentials!Commands
Below you'll find the all supported commands with their arguments. Note that you can also run magicbell --help at any time to get a list of options in your console.
You can pass data for commands that take a request body with a --data flag.
Broadcast
Create a broadcast
Creates a new broadcast. When a broadcast is created, it generates individual notifications for relevant users within the project.
magicbell broadcast create \
--data '{"id":"d1b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b","title":"Hello, World!","content":"I come from broadcast","action_url":"https://example.com","category":"example","topic":"example","custom_attributes":{},"recipients":[{"external_id":"83d987a-83fd034","email":"test@example.com","first_name":"Person","last_name":"Doe","custom_attributes":{"plan":"enterprise","pricing_version":"v10","preferred_pronoun":"They"},"phone_numbers":["+1 5005550001"]}],"overrides":{}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The URL recipients will be directed to when interacting with the broadcast.
The label used to group broadcasts.
The body content delivered with the broadcast.
The timestamp when the broadcast was created.
Arbitrary custom data associated with the broadcast.
The unique id for this broadcast.
Channel- or provider-specific values that override the defaults.
Show child attributesHide child attributes
Overrides that are scoped to individual delivery channels.
Show child attributesHide child attributes
Overrides for in-app notifications.
Show child attributesHide child attributes
The channel-specific title.
The channel-specific content.
The link associated with the channel-specific notification.
Overrides for mobile push notifications.
Show child attributesHide child attributes
The channel-specific title.
The channel-specific content.
The link associated with the channel-specific notification.
Overrides for email notifications.
Show child attributesHide child attributes
The channel-specific title.
The channel-specific content.
The link associated with the channel-specific notification.
Overrides for SMS notifications.
Show child attributesHide child attributes
The channel-specific title.
The channel-specific content.
The link associated with the channel-specific notification.
Overrides that are scoped to specific providers for a channel.
Show child attributesHide child attributes
Provider-specific overrides for Sendgrid.
Provider-specific overrides for Twilio.
Provider-specific overrides for Mailgun.
Provider-specific overrides for AWS SES.
Provider-specific overrides for Firebase Cloud Messaging.
Provider-specific overrides for Expo push notifications.
Provider-specific overrides for Slack.
Provider-specific overrides for the web push provider.
Provider-specific overrides for Apple Push Notification service.
Provider-specific overrides for Microsoft Teams.
A collection of users or filters that determine who receives the broadcast.
Show child attributesHide child attributes
The recipient specification for the broadcast.
The runtime state of the broadcast execution.
Show child attributesHide child attributes
The overall processing status of the broadcast.
The summary counts for total recipients and failures.
Show child attributesHide child attributes
The number of recipients that the broadcast was sent to.
The number of failures while processing the broadcast.
A list of errors encountered while processing the broadcast.
Show child attributesHide child attributes
Show child attributesHide child attributes
The details about the processing error.
The subject or headline that will be shown to recipients.
The topic that further classifies the broadcast.
List all broadcasts
Retrieves a paginated list of broadcasts for the project. Returns basic information about each broadcast including its creation time and status.
magicbell broadcast list Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Fetch a broadcast
Retrieves detailed information about a specific broadcast by its ID. Includes the broadcast's configuration and current status.
magicbell broadcast fetch \
--broadcast_id '{broadcast_id}' Flags
| Name | Required |
|---|---|
| broadcast_id | true |
Channel
Delete an APNs token
Deletes one of the authenticated user's APNs tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
magicbell channel delete_apns_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Delete an Expo token
Deletes one of the authenticated user's Expo tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
magicbell channel delete_expo_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Fetch a FCM token
Fetches details of a specific FCM token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
magicbell channel fetch_fcm_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
List all Teams tokens
Lists all Teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
magicbell channel list_teams_tokens Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Delete a Web Push token
Deletes one of the authenticated user's Web Push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
magicbell channel delete_web_push_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Delete an Inbox token
Deletes one of the authenticated user's Inbox tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
magicbell channel delete_inbox_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
List all FCM tokens
Lists all FCM tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
magicbell channel list_fcm_tokens Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Fetch a channels config
Fetches the channels config for a given key.
magicbell channel fetch_config \
--key '{key}' Flags
| Name | Required |
|---|---|
| key | true |
Save a channels config
Save the channels configuration for a given key.
magicbell channel save_config \
--data '{"channels":[{"channel":"in_app"},{"if":"{{notification.unseen}} == false","channel":"email"}],"key":"project"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Ordered channel steps the delivery planner should execute.
Show child attributesHide child attributes
Show child attributesHide child attributes
Name of the channel used for this step.
Delay in seconds to wait after the previous step.
Conditional expression evaluated before running the step.
Disables the plan so it cannot be executed.
Unique identifier for this delivery plan.
Fetch an Inbox token
Fetches details of a specific Inbox token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
magicbell channel fetch_inbox_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
List all APNs tokens
Lists all APNs tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
magicbell channel list_apns_tokens Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Fetch an Expo token
Fetches details of a specific Expo token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
magicbell channel fetch_expo_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Save a FCM token
Saves the FCM token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
magicbell channel save_fcm_token \
--data '{"device_token":"eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt","installation_id":"development"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The Firebase Cloud Messaging device registration token to associate with the user.
List all Slack tokens
Lists all Slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
magicbell channel list_slack_tokens Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Fetch channel preferences
Fetch a user's channel delivery preferences.
magicbell channel fetch_user_preferences List all Expo tokens
Lists all Expo tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
magicbell channel list_expo_tokens Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Delete a Teams token
Deletes one of the authenticated user's Teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
magicbell channel delete_teams_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Fetch a Web Push token
Fetches details of a specific Web Push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
magicbell channel fetch_web_push_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Save an Inbox token
Saves the Inbox token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
magicbell channel save_inbox_token \
--data '{"token":"eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Realtime connection ID to restrict delivery to a specific Ably connection.
The in-app inbox token generated for this user.
List all Inbox tokens
Lists all Inbox tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
magicbell channel list_inbox_tokens Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Save a Slack token
Saves the Slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
magicbell channel save_slack_token \
--data '{"webhook":{"url":"https://example.com/webhook"}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Show child attributesHide child attributes
The OAuth scope granted during installation
The ID of the Slack channel this installation is associated with
A unique identifier for this Slack workspace installation
Obtained directly from the incoming_webhook object in the installation response from the Slack API.
Show child attributesHide child attributes
The URL for the incoming webhook from Slack
Fetch a Slack token
Fetches details of a specific Slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
magicbell channel fetch_slack_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Save a Teams token
Saves the Teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
magicbell channel save_teams_token Fetch a Teams token
Fetches details of a specific Teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
magicbell channel fetch_teams_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Save channel preferences
Save a user's channel preferences.
magicbell channel save_user_preferences \
--data '{"categories":[{"key":"category_1","label":"Category 1","channels":[{"name":"email","label":"Email","enabled":true}]}]}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
List all Web Push tokens
Lists all Web Push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
magicbell channel list_web_push_tokens Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Save an APNs token
Saves the APNs token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
magicbell channel save_apns_token \
--data '{"device_token":"eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt","installation_id":"development"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration.
The APNs device token to register with MagicBell.
The APNs environment this token belongs to. If omitted we assume it targets production.
Fetch an APNs token
Fetches details of a specific APNs token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
magicbell channel fetch_apns_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Delete a FCM token
Deletes one of the authenticated user's FCM tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
magicbell channel delete_fcm_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Delete a Slack token
Deletes one of the authenticated user's Slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
magicbell channel delete_slack_token \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| token_id | true |
Save a Web Push token
Saves the Web Push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
magicbell channel save_web_push_token \
--data '{"endpoint":"https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN","keys":{"p256dh":"BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0","auth":"GoIO2ulhtQuyBM64lZuFuw"}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to.
The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription.
Show child attributesHide child attributes
The P-256 ECDH public key obtained from PushSubscription.getKey('p256dh'). Used to encrypt push messages for this subscription.
The authentication secret obtained from PushSubscription.getKey('auth'). Used to encrypt push messages for this subscription.
Save an Expo token
Saves the Expo token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
magicbell channel save_expo_token \
--data '{"device_token":"ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The Expo push token returned by the Expo client.
Event
List all events
Retrieves a paginated list of events for the project.
magicbell event list Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Fetch an event
Fetches a project event by its ID.
magicbell event fetch \
--event_id '{event_id}' Flags
| Name | Required |
|---|---|
| event_id | true |
Integration
List all SendGrid integrations
Retrieves the current SendGrid integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_sendgrid List all Slack integrations
Retrieves the current Slack integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_slack Start a Slack installation
Initiates the installation flow for a Slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required.
magicbell integration start_slack_installation \
--data '{"app_id":"12345678901","auth_url":"https://example.com/auth","redirect_url":"https://example.com/redirect","extra_scopes":["scope1","scope2"]}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Slack app ID that the installation flow should use.
Optional override for the authorization URL returned to the client.
Additional OAuth scopes to request during installation.
Show child attributesHide child attributes
Custom redirect URL to use after OAuth completes.
List all Stripe integrations
Retrieves the current Stripe integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_stripe Save an EventSource integration
Updates or creates the EventSource integration for the project.
magicbell integration save_eventsource \
--data '{"source":"backend"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
List all Expo integrations
Retrieves the current Expo integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_expo List all FCM integrations
Retrieves the current FCM integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_fcm Delete an Inbox integration
Deletes the Inbox integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_inbox Flags
| Name | Required |
|---|---|
| id | false |
List all Ping Email integrations
Retrieves the current Ping Email integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_ping_email Delete an EventSource integration
Deletes the EventSource integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_eventsource Flags
| Name | Required |
|---|---|
| id | false |
Delete a FCM integration
Deletes the FCM integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_fcm Flags
| Name | Required |
|---|---|
| id | false |
Save a Slack installation
Creates a new installation of a Slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration.
magicbell integration save_slack_installation \
--data '{"id":"A12345678-T123","access_token":"xoxb-123456789012-1234567890123-12345678901234567890abcdef123456","scope":"identify,commands,bot","team_name":"Team Installing Your App","team_id":"T12345678","enterprise_id":"E12345678","enterprise_name":"Enterprise Grid, Inc.","bot_user_id":"U12345678","app_id":"A12345678","authed_user":{"id":"U12345678","scope":"identify,commands"},"incoming_webhook":{"channel":"C12345678","channel_id":"C12345678","configuration_url":"https://teamname.slack.com/services/B12345678","url":"https://hooks.slack.com/services/T12345678/B12345678/123456789012345678901234"},"team":{"name":"Team Installing Your App","id":"T123"}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Bot token returned from the Slack OAuth exchange.
Slack app identifier for the installed app.
Show child attributesHide child attributes
Token type value provided by Slack.
Seconds until the user token expires.
Space-delimited OAuth scopes granted to the user token.
User token returned from the OAuth exchange.
Refresh token for the authed user.
Slack user ID for the installer.
Slack user ID of the installed bot.
Show child attributesHide child attributes
Enterprise grid name.
Enterprise grid identifier.
Seconds until the bot access token expires.
Unique identifier MagicBell assigns to the Slack installation.
Show child attributesHide child attributes
Human readable name for the webhook channel.
URL users can visit to manage the webhook.
Webhook URL that Slack posts events to.
Indicates whether the installation occurred on an enterprise grid.
Refresh token for regenerating the bot access token.
Space-delimited OAuth scopes granted to the bot token.
Show child attributesHide child attributes
Workspace name where the app was installed.
Workspace ID where the app was installed.
Type of bot token returned by Slack.
Finish a Slack installation
Completes the installation flow for the Slack integration. This endpoint is typically called after the user has completed any required authorization steps with Slack.
magicbell integration finish_slack_installation \
--data '{"app_id":"12345678901","code":"string","redirect_url":"string"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The app ID of the Slack app that was originally configured at the project-level.
The code that was returned from the OAuth flow, and found in the query string of the redirect URL.
Delete a Twilio integration
Deletes the Twilio integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_twilio Flags
| Name | Required |
|---|---|
| id | false |
Save a Twilio integration
Updates or creates the Twilio integration for the project.
magicbell integration save_twilio \
--data '{"account_sid":"ACXXXXXXXX","api_key":"SKXXXXXXXX","api_secret":"your_api_secret","from":"+15017122661"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The SID for your Twilio account
A US1 API key for Twilio- - https://www.twilio.com/docs/iam/api-keys
The API Secret for Twilio
The phone number to send from, in E.164 format
List all Twilio integrations
Retrieves the current Twilio integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_twilio List all Web Push integrations
Retrieves the current Web Push integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_web_push Delete an APNs integration
Deletes the APNs integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_apns Flags
| Name | Required |
|---|---|
| id | false |
Save an APNs integration
Updates or creates the APNs integration for the project.
magicbell integration save_apns \
--data '{"app_id":"com.example.myapp","certificate":"-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgHnr4B2P+by++FGu/th0a44E8chJl5v5Vo4gq0YHw6e6gCgYIKoZIzj0DAQehRANCAARCg1MRibnfyeX5mx6+Rtfzzn7UhJP/oaqL4RzSmDuTsd3BTX33cuQ0gWHe20R2m1bLAkI1wrp+zbWOlAOAD7KX\n-----END PRIVATE KEY-----","key_id":"ABCD1234EF","team_id":"ABCD1234EF","badge":"unread"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The default bundle identifier of the application that is configured with this project. It can be overriden on a per token basis, when registering device tokens.
Controls whether the app icon badge counts unread or unseen notifications.
The APNs certificate in P8 format. Generate it at developer.apple.com with the 'Apple Push Notification service (APNs)' option selected.
The 10-character Key ID from your Apple Developer account used with the P8 certificate.
Internal payload format version used by MagicBell.
The Apple Developer Team ID that owns the configured key.
Delete an Expo integration
Deletes the Expo integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_expo Flags
| Name | Required |
|---|---|
| id | false |
Delete a Mailgun integration
Deletes the Mailgun integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_mailgun Flags
| Name | Required |
|---|---|
| id | false |
Delete a Web Push integration
Deletes the Web Push integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_web_push Flags
| Name | Required |
|---|---|
| id | false |
List all integrations
Lists all available and configured integrations for the project. Returns a summary of each integration including its type, status, and basic configuration information.
magicbell integration list Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
Save a GitHub integration
Updates or creates the GitHub integration for the project.
magicbell integration save_github \
--data '{"webhook_signing_secret":"whsec_e5cf4458caae49ae72d8f275deb9b63bdd41dd5c932c27c9346d428fb9e1d0a0"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The signing secret to verify incoming requests from Github
List all GitHub integrations
Retrieves the current GitHub integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_github List all EventSource integrations
Retrieves the current EventSource integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_eventsource List all Inbox integrations
Retrieves the current Inbox integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_inbox Start an Inbox installation
Initiates the installation flow for an Inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required.
magicbell integration start_inbox_installation Save a Mailgun integration
Updates or creates the Mailgun integration for the project.
magicbell integration save_mailgun \
--data '{"from":{"name":"Example","email":"hello@example.com"},"api_key":"key-3ax6xnjp29jd6fds4gc373sgvjxteol0","region":"us","domain":"example.com"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Show child attributesHide child attributes
The email address to send from
The name to send from
Save a Ping Email integration
Updates or creates the Ping Email integration for the project.
magicbell integration save_ping_email \
--data '{"url":"https://example.com/webhook"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
URL to ping
Delete a SendGrid integration
Deletes the SendGrid integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_sendgrid Flags
| Name | Required |
|---|---|
| id | false |
Save a SendGrid integration
Updates or creates the SendGrid integration for the project.
magicbell integration save_sendgrid \
--data '{"api_key":"SG.1234567890","from":{"email":"company@example.com","name":"Company Name"},"reply_to":{"email":"reply-to@example.com","name":"Reply to Company"}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The API key for Sendgrid
Show child attributesHide child attributes
The email address to send from
The name to send from
Show child attributesHide child attributes
The email address to reply to
The name to reply to
Delete an Amazon SES integration
Deletes the Amazon SES integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_ses Flags
| Name | Required |
|---|---|
| id | false |
List all APNs integrations
Retrieves the current APNs integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_apns Save an Expo integration
Updates or creates the Expo integration for the project.
magicbell integration save_expo \
--data '{"access_token":"expo_access_token"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The Expo access token used to authenticate push notifications.
List all Mailgun integrations
Retrieves the current Mailgun integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_mailgun Delete a Ping Email integration
Deletes the Ping Email integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_ping_email Flags
| Name | Required |
|---|---|
| id | false |
Save an Amazon SES integration
Updates or creates the Amazon SES integration for the project.
magicbell integration save_ses \
--data '{"key_id":"MY_FAKE_AWS_ACCESS_KEY_ID","secret_key":"MY_FAKE_AWS_SECRET_KEY","region":"eu-west-1","from":{"name":"Company Name","email":"company@example.com"}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Show child attributesHide child attributes
The email address to send from
The name to send from
AWS Access Key ID
AWS Region
AWS Secret Key
List all Amazon SES integrations
Retrieves the current Amazon SES integration configurations for a specific integration type in the project. Returns configuration details and status information.
magicbell integration list_ses Delete a Slack integration
Deletes the Slack integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_slack Flags
| Name | Required |
|---|---|
| id | false |
Save a Slack integration
Updates or creates the Slack integration for the project.
magicbell integration save_slack \
--data '{"app_id":"12345678901","client_id":"1.0","client_secret":"12345678901234567890123456789012","signing_secret":"12345678901234567890123456789012"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The Slack app ID that can be found in the app's settings page of the Slack API dashboard.
The Slack client ID that can be found in the app's settings page of the Slack API dashboard.
The Slack client secret that can be found in the app's settings page of the Slack API dashboard.
The Slack signing secret that can be found in the app's settings page of the Slack API dashboard.
Save an Inbox integration
Updates or creates the Inbox integration for the project.
magicbell integration save_inbox \
--data '{"images":{"emptyInboxUrl":""},"locale":"de","theme":{"banner":{"backgroundColor":"#F8F5FF","fontSize":"14px","textColor":"#3A424D"},"dialog":{"accentColor":"#5225C1","backgroundColor":"#F5F5F5","textColor":"#313131"},"footer":{"backgroundColor":"#FFFFFF","borderRadius":"16px","fontFamily":"inherit","fontSize":"15px","textColor":"#5225C1"},"header":{"backgroundColor":"#FFFFFF","borderRadius":"16px","fontFamily":"inherit","fontSize":"15px","textColor":"#5225C1"},"icon":{"borderColor":"#EDEDEF","width":"24px"},"unseenBadge":{"backgroundColor":"#F80808"}}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Image overrides for assets used in the inbox UI.
Show child attributesHide child attributes
URL for the illustration shown when the inbox is empty.
Locale code (ISO language tag) used to localize built-in strings.
Visual customization options for the hosted inbox widget.
Show child attributesHide child attributes
Styling overrides for notification list items.
Show child attributesHide child attributes
Overrides for unseen notifications.
Show child attributesHide child attributes
Text color used when a notification is unseen.
Background color applied to unseen notifications.
Hover styles for unseen notifications.
Show child attributesHide child attributes
Background color on hover for unseen notifications.
State indicator styling for unseen notifications.
Show child attributesHide child attributes
Color for the unseen state indicator.
Overrides for unread notifications.
Show child attributesHide child attributes
Text color used when a notification is unread.
Background color applied to unread notifications.
Hover styles for unread notifications.
Show child attributesHide child attributes
Background color on hover for unread notifications.
State indicator styling for unread notifications.
Show child attributesHide child attributes
Color for the unread state indicator.
Base styles applied to every notification item.
Show child attributesHide child attributes
Accent colors for notification state indicators.
Show child attributesHide child attributes
Color used for the state indicator.
CSS margin applied around each notification card.
Font family for notification text.
Font size for notification text.
Default text color for notifications.
Border radius applied to each notification card.
Background color for notifications in their default state.
Styles applied when a notification is hovered.
Show child attributesHide child attributes
Background color on hover.
Styling for confirmation and action dialogs.
Show child attributesHide child attributes
Dialog background color.
Dialog text color.
Accent color for dialog buttons and highlights.
Launcher icon styling overrides.
Show child attributesHide child attributes
CSS color used for the icon border.
Width of the launcher icon (any CSS length).
Top banner styling options.
Show child attributesHide child attributes
Font size for banner text.
Banner background color.
Banner text color.
Opacity applied to the banner background.
Badge styling for unseen notification counts.
Show child attributesHide child attributes
Badge background color.
Header styling for the inbox modal.
Show child attributesHide child attributes
CSS font family for the header title.
Font size used in the header.
Header background color.
Header text color.
Border radius applied to the header container.
Footer styling for the inbox modal.
Show child attributesHide child attributes
Footer text color.
Border radius applied to the footer container.
Font size used in the footer.
Footer background color.
Save an Inbox installation
Creates a new installation of a Inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration.
magicbell integration save_inbox_installation \
--data '{"images":{"emptyInboxUrl":""},"locale":"de","theme":{"banner":{"backgroundColor":"#F8F5FF","fontSize":"14px","textColor":"#3A424D"},"dialog":{"accentColor":"#5225C1","backgroundColor":"#F5F5F5","textColor":"#313131"},"footer":{"backgroundColor":"#FFFFFF","borderRadius":"16px","fontFamily":"inherit","fontSize":"15px","textColor":"#5225C1"},"header":{"backgroundColor":"#FFFFFF","borderRadius":"16px","fontFamily":"inherit","fontSize":"15px","textColor":"#5225C1"},"icon":{"borderColor":"#EDEDEF","width":"24px"},"unseenBadge":{"backgroundColor":"#F80808"}}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Image overrides for assets used in the inbox UI.
Show child attributesHide child attributes
URL for the illustration shown when the inbox is empty.
Locale code (ISO language tag) used to localize built-in strings.
Visual customization options for the hosted inbox widget.
Show child attributesHide child attributes
Footer styling for the inbox modal.
Show child attributesHide child attributes
Font size used in the footer.
Footer background color.
Footer text color.
Border radius applied to the footer container.
Styling overrides for notification list items.
Show child attributesHide child attributes
Base styles applied to every notification item.
Show child attributesHide child attributes
Default text color for notifications.
Border radius applied to each notification card.
Background color for notifications in their default state.
Styles applied when a notification is hovered.
Show child attributesHide child attributes
Background color on hover.
Accent colors for notification state indicators.
Show child attributesHide child attributes
Color used for the state indicator.
CSS margin applied around each notification card.
Font family for notification text.
Font size for notification text.
Overrides for unseen notifications.
Show child attributesHide child attributes
Text color used when a notification is unseen.
Background color applied to unseen notifications.
Hover styles for unseen notifications.
Show child attributesHide child attributes
Background color on hover for unseen notifications.
State indicator styling for unseen notifications.
Show child attributesHide child attributes
Color for the unseen state indicator.
Overrides for unread notifications.
Show child attributesHide child attributes
Hover styles for unread notifications.
Show child attributesHide child attributes
Background color on hover for unread notifications.
State indicator styling for unread notifications.
Show child attributesHide child attributes
Color for the unread state indicator.
Text color used when a notification is unread.
Background color applied to unread notifications.
Styling for confirmation and action dialogs.
Show child attributesHide child attributes
Dialog background color.
Dialog text color.
Accent color for dialog buttons and highlights.
Launcher icon styling overrides.
Show child attributesHide child attributes
CSS color used for the icon border.
Width of the launcher icon (any CSS length).
Top banner styling options.
Show child attributesHide child attributes
Banner background color.
Banner text color.
Opacity applied to the banner background.
Font size for banner text.
Badge styling for unseen notification counts.
Show child attributesHide child attributes
Badge background color.
Header styling for the inbox modal.
Show child attributesHide child attributes
Font size used in the header.
Header background color.
Header text color.
Border radius applied to the header container.
CSS font family for the header title.
Delete a Stripe integration
Deletes the Stripe integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_stripe Flags
| Name | Required |
|---|---|
| id | false |
Save a Stripe integration
Updates or creates the Stripe integration for the project.
magicbell integration save_stripe \
--data '{"webhook_signing_secret":"whsec_e5cf4458caae49ae72d8f275deb9b63bdd41dd5c932c27c9346d428fb9e1d0a0"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The unique identifier for this configuration
The signing secret to verify incoming requests from Stripe
Save a Web Push integration
Updates or creates the Web Push integration for the project.
magicbell integration save_web_push \
--data '{"public_key":"BNKZeSrRX_c3QfqzOvv1oshpj1qPbDcUJHKET6Ahs2u9-F4HgllPYxtgaGvGSqfytuALumX5NYZPLD8YmCwBxcw","private_key":"y56TIPdEzrQ0Ku_uQbGGkB84mYdF9pJl5IHvmAZ_fVs"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
VAPID private key - from the pair you generated.
VAPID public key - generate one at https://magicbell.com/web-push/vapid-keys.
Save a Web Push installation
Creates a new installation of a Web Push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration.
magicbell integration save_web_push_installation \
--data '{"endpoint":"https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN","keys":{"p256dh":"BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0","auth":"GoIO2ulhtQuyBM64lZuFuw"}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to.
The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription.
Show child attributesHide child attributes
The authentication secret obtained from PushSubscription.getKey('auth'). Used to encrypt push messages for this subscription.
The P-256 ECDH public key obtained from PushSubscription.getKey('p256dh'). Used to encrypt push messages for this subscription.
Start a Web Push installation
Initiates the installation flow for a Web Push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required.
magicbell integration start_web_push_installation Save a FCM integration
Updates or creates the FCM integration for the project.
magicbell integration save_fcm \
--data '{"type":"service_account","project_id":"platform-development","private_key_id":"1935e74178f6ef0bbc23fb3538255f8281093bf2","private_key":"-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC7/GBHM4AK4/8c\nZyvJfdzjBzfA48tV9T3N4hBCb4E66jIz+oztH9oSngEfIVO/L1dWjK1OlN0cqJ0f\nQaKq1eycSjmwfTR3HGNjQQyoGQ4BFBdyqT5rRDDZLPI2LoR0dtQXcBtiFpJF2t8e\niDmpl3d/ipuKMtBRzjYPqzP0qv3YkPmw2v5FqKK9EIaHRtOhd2R28F5FE+kF1dvB\nt7fEeVtKcQJcSwDUQ8HEshlWSx6azGd4jxf9jHRXWumXYfTA6NMA7EUTDJVus3vU\ny9MCv2KwZO/dzlQygY0BM9FHPSzZRIiHUx+DH6gYl2uWJatluHz58lj3r5mo/Ssc\nyP3TrqOnAgMBAAECggEAWAnDe0UCt9b8QGyPBK/V1VspgMQOE+UlOzkenUaEUreg\nqFg0TM8ofaSS6OXeR0DgGdALUCyGeyf6YcuG55QFWlKmvuF8QzY/05mA2G7XcKjc\nrF3Xtju61tLmYnqZnMOT46AkquTgPyfYa3+n5aVimRAsdOYESvOUvPTUgcbc2GGK\nC2h2MUCoRKuhzbGx847XJmINRE+xaht4hDMhzhMBVrgGGyQ3sIdbCxpbiQR6QH2H\npITrSnd4hlKRPREWS/D4FUKP/ucXdORP9SUi0R64NRZ3GvT1HvpVZ9fOXwIACdAG\n9fpIQbsmIgxhgZ5ZjuGz/nFi2KQ2Y8rEycQmnHd4QQKBgQD4LVFL93E4qwr7Eruj\nFjyxGYYi2PhVxvrpiSD6ziK3HUjAxat6OcoElJx7WEFWHmi7KRgehqcl40A8Coav\n9DGBwnSM2AYKgzOqMqzjK71TFOQsJdGEYThnhiL2FoQeptgskVS7J9MMBPTnyl7D\nYObINwGbg9auVp66rj5W+dymZwKBgQDB6VdpxJpU9hXBW+8nJESduhzpYiHoe1kN\nyka90dQDOe2b/R7bnF1Ggte6Ll1dMs3xLhN1Mm2XTcX2zmzM15C0E4+1t1LXXzAo\nO2P+riEmCIUc1i0yNMVgEKXiOBBYgKauE3fT88c4dw2JAT0QlifJ0h8kRPNhUaq9\nespjleNQwQKBgHUzwZ7knn2qmSb1M9PTHppseWJfoPexXrGHZyHK064ykDcpos+4\nFuWO4U+G4GQxPDiXMaLI6IsGBUHVnsHdyruC/9O7+S5hw7Zu9CLcdy6TQSZwPcAM\nwbxyJnSdMYvgM1roz2ELb6nPdXE5qwMN8i8/euzcmDgBBDkZLKuamE+lAoGBAKb7\nvd7DAvPvBkUAWi2mub/pqUQA0ZpVvhZ1/f0wWBZ/J/KQQqZzPI+f1Q3rJ1M+kMIE\nH5Vo257TxooGsQKlD2NDBRpCx//XZK0Al9eVM86Av8BZX4pAj0dujqsEBG9yOhbl\nhObsor4pJ2q3ulIyPAk7/L1K8xr3LMUGnIqtZJcBAoGAEQffqGbnaOG8Ue3++bLP\nN6XlAyt5UajAd1CycIHgDvbW0CkWoI70Bg7QNqMYJe6DareH4vRpdB3tw6zNP7qN\n0Bd04L8+zUYN+VqNJ70d7Xn+k2rY7STlgU3vwOzHFwu4wK2A7e+aAZ8AjC+Sr0ZM\nps+wuWO8MN5yQTBZvAEIfQs=\n-----END PRIVATE KEY-----\n","client_email":"firebase-adminsdk-qwhtp@platform-development.iam.gserviceaccount.com","client_id":"117893100789081023083","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-qwhtp%40magicbell-development.iam.gserviceaccount.com","universe_domain":"googleapis.com"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
URL for Google's OAuth provider x509 certificates used to validate tokens.
OAuth authorization endpoint used when exchanging Firebase credentials.
The client email address from the Firebase service account.
The numeric client identifier for the Firebase service account.
URL to the public x509 certificate for this service account.
The PEM encoded service account private key used to sign Firebase credentials.
Identifier of the private key inside the downloaded service account JSON.
The Firebase project ID associated with this service account.
OAuth token endpoint used to mint access tokens for FCM.
Indicates the kind of Google credential. Service accounts always use the service_account type.
The Google Cloud universe domain hosting the Firebase APIs.
Delete a GitHub integration
Deletes the GitHub integration configuration from the project. This will disable the integration's functionality within the project.
magicbell integration delete_github Flags
| Name | Required |
|---|---|
| id | false |
Notification
Fetch a notification
Gets a notification by ID.
magicbell notification fetch \
--notification_id '{notification_id}' Flags
| Name | Required |
|---|---|
| notification_id | true |
Archive a notification
Archive a notification.
magicbell notification archive \
--notification_id '{notification_id}' Flags
| Name | Required |
|---|---|
| notification_id | true |
Mark a notification read
Marks a notification as read.
magicbell notification mark_read \
--notification_id '{notification_id}' Flags
| Name | Required |
|---|---|
| notification_id | true |
Unarchive a notification
Unarchives a notification.
magicbell notification unarchive \
--notification_id '{notification_id}' Flags
| Name | Required |
|---|---|
| notification_id | true |
Mark a notification unread
Marks a notification as unread.
magicbell notification mark_unread \
--notification_id '{notification_id}' Flags
| Name | Required |
|---|---|
| notification_id | true |
List all notifications
Lists all notifications for a user.
magicbell notification list Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
| status | false |
| category | false |
| topic | false |
Archive all notifications
Archive all notifications.
magicbell notification archive_all Flags
| Name | Required |
|---|---|
| category | false |
| topic | false |
Mark all notifications read
Marks all notifications as read.
magicbell notification mark_all_read Flags
| Name | Required |
|---|---|
| category | false |
| topic | false |
User
List an user's Expo tokens
Lists all Expo tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
magicbell user list_expo_tokens \
--user_id '{user_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| limit | false |
| starting_after | false |
| ending_before | false |
Fetch an user's Expo token
Fetches a specific Expo token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
magicbell user fetch_expo_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Delete an user's Web Push token
Deletes a specific user's Web Push token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
magicbell user delete_web_push_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
List an user's FCM tokens
Lists all FCM tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
magicbell user list_fcm_tokens \
--user_id '{user_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| limit | false |
| starting_after | false |
| ending_before | false |
Delete an user's Slack token
Deletes a specific user's Slack token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
magicbell user delete_slack_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
List an user's Teams tokens
Lists all Teams tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
magicbell user list_teams_tokens \
--user_id '{user_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| limit | false |
| starting_after | false |
| ending_before | false |
Delete an user's Teams token
Deletes a specific user's Teams token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
magicbell user delete_teams_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Fetch an user's Teams token
Fetches a specific Teams token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
magicbell user fetch_teams_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
List an user's Web Push tokens
Lists all Web Push tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
magicbell user list_web_push_tokens \
--user_id '{user_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| limit | false |
| starting_after | false |
| ending_before | false |
Fetch an user's Web Push token
Fetches a specific Web Push token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
magicbell user fetch_web_push_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Delete a user
Removes a user and all associated data from the project.
magicbell user delete \
--user_id '{user_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
Fetch an user's Inbox token
Fetches a specific Inbox token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
magicbell user fetch_inbox_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
List an user's APNs tokens
Lists all APNs tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
magicbell user list_apns_tokens \
--user_id '{user_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| limit | false |
| starting_after | false |
| ending_before | false |
Delete an user's APNs token
Deletes a specific user's APNs token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
magicbell user delete_apns_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Delete an user's FCM token
Deletes a specific user's FCM token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
magicbell user delete_fcm_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Fetch an user's FCM token
Fetches a specific FCM token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
magicbell user fetch_fcm_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
List an user's Slack tokens
Lists all Slack tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
magicbell user list_slack_tokens \
--user_id '{user_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| limit | false |
| starting_after | false |
| ending_before | false |
Delete an user's Inbox token
Deletes a specific user's Inbox token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
magicbell user delete_inbox_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Delete an user's Expo token
Deletes a specific user's Expo token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
magicbell user delete_expo_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Fetch an user's Slack token
Fetches a specific Slack token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
magicbell user fetch_slack_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Save a user
Creates or updates a user with the provided details. The user will be associated with the project specified in the request context.
magicbell user save \
--data '{"id":"8a038704-acc1-47f9-81b0-7523886cbeae","external_id":"external-id","email":"dan@example.com","first_name":"Dan","last_name":"Example","custom_attributes":{"key":"value"}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
The timestamp when the user was created.
Arbitrary custom values stored on the user.
The primary email address of the user.
The user identifier from an external system.
The first name of the user.
The unique identifier for the user.
The last name of the user.
The timestamp when the user last received a notification.
The timestamp when the user last opened the inbox.
The timestamp when the user was last updated.
List all users
Lists all users in the project.
magicbell user list Flags
| Name | Required |
|---|---|
| limit | false |
| starting_after | false |
| ending_before | false |
| query | false |
List an user's Inbox tokens
Lists all Inbox tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
magicbell user list_inbox_tokens \
--user_id '{user_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| limit | false |
| starting_after | false |
| ending_before | false |
Fetch an user's APNs token
Fetches a specific APNs token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
magicbell user fetch_apns_token \
--user_id '{user_id}' \
--token_id '{token_id}' Flags
| Name | Required |
|---|---|
| user_id | true |
| token_id | true |
Workflow
Fetch workflow definition
Retrieves a workflow definition by key
magicbell workflow fetch Execute workflow
Executes a workflow with the provided input parameters
magicbell workflow create_run \
--data '{"key":"magicbell:signup","input":{"user":{"id":"123","name":"John Doe"}}}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
Optional JSON payload that will be passed as the workflow input context.
The unique workflow key to execute (e.g. integration.stripe.charge.succeeded).
Get workflow run status
Retrieves the status and details of a workflow run
magicbell workflow fetch_run \
--run_id '{run_id}' Flags
| Name | Required |
|---|---|
| run_id | true |
List workflow runs
Retrieves all runs for a specific workflow
magicbell workflow list_runs \
--workflow_key '{workflow_key}' Flags
| Name | Required |
|---|---|
| workflow_key | true |
Save workflow definition
Creates or updates a workflow definition for the project
magicbell workflow save \
--data '{"steps":[{"command":"broadcast:send","input":{"channel":"in_app"}},{"command":"broadcast:send","if":"{{notification.unseen}} == false","input":{"channel":"email"}}],"key":"project"}' Flags
| Name | Required |
|---|---|
| data | true |
Data
This command expects a --data argument. The data argument takes a JSON object matching the following spec:
When true, prevents the workflow from being triggered.
Unique identifier for this workflow definition.
Ordered list describing each action that will run inside the workflow.
Show child attributesHide child attributes
Show child attributesHide child attributes
Command to execute (e.g., broadcast, pause, wait, abort)
JMESPath condition that must evaluate truthy for the step to run.
Optional payload passed to the command when it executes.