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
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 |
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 timestamp when the broadcast was created.
The unique id for this broadcast.
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
The number of recipients that the broadcast was sent to.
The number of failures while processing the broadcast.
Show child attributesHide child attributes
Show child attributesHide child attributes
Channel
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 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:
Show child attributesHide child attributes
Show child attributesHide child attributes
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 |
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 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:
(Optional) The bundle identifier of the application that is registering this token. Use this field to override the default identifier specified in the projects APNs integration.
(Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in production.
Fetch channel preferences
Fetch a user's channel delivery preferences.
magicbell channel fetch_user_preferences Fetch a channels config
Fetches the channels config for a given key.
magicbell channel fetch_config \
--key '{key}' Flags
| Name | Required |
|---|---|
| key | true |
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 |
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:
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 |
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 |
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:
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 |
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 |
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 |
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
Obtained directly from the incoming_webhook object in the installation response from the Slack API.
Show child attributesHide child attributes
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 |
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 |
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
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 |
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:
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 |
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 |
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 |
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 |
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 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 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 |
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 |
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 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 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 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:
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
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.
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://tools.reactpwa.com/vapid.
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 |
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 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 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
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 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 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
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 |
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 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 |
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 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.
The APNs certificate in P8 format. Generate it at developer.apple.com with the 'Apple Push Notification service (APNs)' option selected.
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 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:
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
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 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
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 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 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:
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 |
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:
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 |
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
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 |
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.
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 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 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:
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
Show child attributesHide child attributes
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 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 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 |
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:
Show child attributesHide child attributes
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 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 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 |
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 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 name to reply to
The email address to reply to
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 |
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 |
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 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 |
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:
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
Notification
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 |
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 |
User
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 |
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 |
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 |
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 |
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 |
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 |
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:
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 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 |
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 |
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 |
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 |
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 |
Workflow
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:
Show child attributesHide child attributes
Show child attributesHide child attributes
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:
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 |