REST API Reference

Explore the MagicBell REST API

Broadcasts


The broadcast object

Attributes

action_urlnullable string
max length: 2048
categorynullable string
max length: 255
contentnullable string
max length: 10485760
created_atstring
The timestamp when the broadcast was created.
custom_attributesnullable object
idstring
The unique id for this broadcast.
overridesnullable object

Creates a new broadcast message. When a broadcast is created, it generates individual notifications for relevant users within the project. Only administrators can create broadcasts.

Request body

action_urlnullable string
max length: 2048
categorynullable string
max length: 255
contentnullable string
max length: 10485760
created_atstring
The timestamp when the broadcast was created.
custom_attributesnullable object
idstring
The unique id for this broadcast.
overridesnullable object

Retrieves a paginated list of broadcasts for the project. Returns basic information about each broadcast including its creation time and status.

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves detailed information about a specific broadcast by its ID. Includes the broadcast's configuration and current status.

Path parameters

broadcast_idstringrequired

Channels



Request body

channelsarray of objectsrequired



Request body

categorystringrequired
min length: 3
channelsarray of objectsrequired
disabledboolean

Saves a mobile_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.

Request body

app_idstring
(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.
device_tokenstringrequired
min length: 64
installation_idenum
(Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in production.
Possible enum values:
development
production

Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves details of a specific mobile_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.

Path parameters

token_idstringrequired

Revokes one of the authenticated user's mobile_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.

Path parameters

token_idstringrequired

Saves a mobile_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.

Request body

device_tokenstringrequired
min length: 1

Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves details of a specific mobile_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.

Path parameters

token_idstringrequired

Revokes one of the authenticated user's mobile_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.

Path parameters

token_idstringrequired

Saves a mobile_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.

Request body

device_tokenstringrequired
min length: 64
installation_idenum
Possible enum values:
development
production

Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves details of a specific mobile_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.

Path parameters

token_idstringrequired

Revokes one of the authenticated user's mobile_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.

Path parameters

token_idstringrequired

Saves a 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.

Request body

oauthobject
webhookobject

Lists all slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves 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.

Path parameters

token_idstringrequired

Revokes 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.

Path parameters

token_idstringrequired

Saves a 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.

Request body

webhook.urlstring

Lists all teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves 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.

Path parameters

token_idstringrequired

Revokes 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.

Path parameters

token_idstringrequired

Saves a 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.

Request body

endpointstringrequired
keysobjectrequired

Lists all web_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves 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.

Path parameters

token_idstringrequired

Revokes 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.

Path parameters

token_idstringrequired

Events


The event object

Attributes

codeinteger
contextnullable object
idstring
levelstring
lognullable string
timestampstring
typestring

Retrieves a paginated list of events for the project.

Query parameters

page[size]integer
page[after]string
page[before]string

Integrations


The integration object

Attributes

List Integrations

Lists all available and configured integrations for the project. Returns a summary of each integration including its type, status, and basic configuration information.

Query parameters

page[size]integer
page[after]string
page[before]string

Creates or updates a apns integration for the project. Only administrators can configure integrations.

Request body

app_idstringrequired
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.
badgeenumrequired
Possible enum values:
unread
unseen
certificatestringrequired
The APNs certificate in P8 format. Generate it at [developer.apple.com](https://developer.apple.com/account/resources/authkeys/add) with the 'Apple Push Notification service (APNs)' option selected.
key_idstringrequired
min length: 10
max length: 10
payload_versionenum
Possible enum values:
1
2
team_idstringrequired
min length: 10
max length: 10

Retrieves the current apns integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a apns integration configuration from the project. This will disable the integration's functionality within the project.

Removes a specific apns integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a awssns integration for the project. Only administrators can configure integrations.

Request body

webhook_signing_secretstringrequired
The signing certificate from AWS SNS
min length: 1

Retrieves the current awssns integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a awssns integration configuration from the project. This will disable the integration's functionality within the project.

Receives and processes incoming webhook events from the awssns integration. Each integration can define its own webhook payload format and handling logic.

Path parameters

idstringrequired

Request body

descriptionstring
payloadnullable object
typestring

Removes a specific awssns integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a expo integration for the project. Only administrators can configure integrations.

Request body

access_tokenstringrequired
min length: 1

Retrieves the current expo integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a expo integration configuration from the project. This will disable the integration's functionality within the project.

Removes a specific expo integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a fcm integration for the project. Only administrators can configure integrations.

Request body

auth_provider_x509_cert_urlstringrequired
auth_uristringrequired
client_emailstringrequired
client_idstringrequired
client_x509_cert_urlstringrequired
private_keystringrequired
private_key_idstringrequired

Retrieves the current fcm integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a fcm integration configuration from the project. This will disable the integration's functionality within the project.

Removes a specific fcm integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a github integration for the project. Only administrators can configure integrations.

Request body

webhook_signing_secretstringrequired
The signing secret to verify incoming requests from Github
min length: 1
max length: 100

Retrieves the current github integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a github integration configuration from the project. This will disable the integration's functionality within the project.

Receives and processes incoming webhook events from the github integration. Each integration can define its own webhook payload format and handling logic.

Path parameters

idstringrequired

Request body

descriptionstringrequired
payloadobjectrequired
typestringrequired

Removes a specific github integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a inbox integration for the project. Only administrators can configure integrations.

Request body

imagesnullable objectrequired
localenullable stringrequired
min length: 2
themenullable objectrequired

Retrieves the current inbox integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a inbox integration configuration from the project. This will disable the integration's functionality within the project.

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.

Request body

imagesnullable objectrequired
localenullable stringrequired
min length: 2
themenullable objectrequired

Initiates the installation flow for a inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required.

Removes a specific inbox integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a mailgun integration for the project. Only administrators can configure integrations.

Request body

api_keystringrequired
min length: 1
domainstringrequired
min length: 1
regionenumrequired
Possible enum values:
us
eu

Retrieves the current mailgun integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a mailgun integration configuration from the project. This will disable the integration's functionality within the project.

Removes a specific mailgun integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a ping_email integration for the project. Only administrators can configure integrations.

Request body

urlstringrequired
URL to ping
min length: 1
max length: 100

Retrieves the current ping_email integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a ping_email integration configuration from the project. This will disable the integration's functionality within the project.

Removes a specific ping_email integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a sendgrid integration for the project. Only administrators can configure integrations.

Request body

api_keystringrequired
The API key for Sendgrid
fromobject
reply_toobject

Retrieves the current sendgrid integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a sendgrid integration configuration from the project. This will disable the integration's functionality within the project.

Removes a specific sendgrid integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a ses integration for the project. Only administrators can configure integrations.

Request body

endpointstring
HTTP endpoint to send requests to (testing only)
min length: 1
fromobject
key_idstringrequired
AWS Access Key ID
min length: 1
regionstringrequired
AWS Region
min length: 1
secret_keystringrequired
AWS Secret Key
min length: 1

Retrieves the current ses integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a ses integration configuration from the project. This will disable the integration's functionality within the project.

Removes a specific ses integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a slack integration for the project. Only administrators can configure integrations.

Request body

app_idstringrequired
The Slack app ID that can be found in the app's settings page of the Slack API dashboard.
client_idstringrequired
The Slack client ID that can be found in the app's settings page of the Slack API dashboard.
client_secretstringrequired
The Slack client secret that can be found in the app's settings page of the Slack API dashboard.
min length: 32
max length: 32
signing_secretstringrequired
The Slack signing secret that can be found in the app's settings page of the Slack API dashboard.
min length: 32
max length: 32

Retrieves the current slack integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a slack integration configuration from the project. This will disable the integration's functionality within the project.

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.

Request body

access_tokenstringrequired
app_idstringrequired
authed_userobjectrequired
bot_user_idstring
enterpriseobject
expires_ininteger
idstring

Completes the installation flow for a slack integration. This endpoint is typically called after the user has completed any required authorization steps with slack.

Request body

app_idstringrequired
codestringrequired
redirect_urlstring

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.

Request body

app_idstringrequired
auth_urlstring
extra_scopesarray of strings
redirect_urlstring

Removes a specific slack integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a stripe integration for the project. Only administrators can configure integrations.

Request body

webhook_signing_secretstringrequired
The signing secret to verify incoming requests from Stripe
min length: 1
max length: 100

Retrieves the current stripe integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a stripe integration configuration from the project. This will disable the integration's functionality within the project.

Receives and processes incoming webhook events from the stripe integration. Each integration can define its own webhook payload format and handling logic.

Path parameters

idstringrequired

Request body

descriptionstringrequired
Description of the webhook event
idstringrequired
Unique identifier for the webhook event

Removes a specific stripe integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a templates integration for the project. Only administrators can configure integrations.

Request body

Retrieves the current templates integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a templates integration configuration from the project. This will disable the integration's functionality within the project.

Creates a new installation of a templates integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration.

Request body

categorynullable string
channelstringrequired
textstringrequired

Removes a specific templates integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a twilio integration for the project. Only administrators can configure integrations.

Request body

account_sidstringrequired
The SID for your Twilio account
min length: 1
max length: 100
api_keystringrequired
The API key for Twilio
min length: 1
max length: 100
api_secretstringrequired
The API Secret for Twilio
min length: 1
max length: 100
fromstringrequired
The phone number to send from, in E.164 format
min length: 1
max length: 100
regionenum
The region to use for Twilio, defaults to 'us1'
Possible enum values:
us1
ie1
au1

Retrieves the current twilio integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a twilio integration configuration from the project. This will disable the integration's functionality within the project.

Removes a specific twilio integration instance by ID from the project.

Path parameters

idstringrequired

Creates or updates a web_push integration for the project. Only administrators can configure integrations.

Request body

private_keystringrequired
min length: 8
max length: 128
public_keystringrequired
min length: 8
max length: 128

Retrieves the current web_push integration configurations for a specific integration type in the project. Returns configuration details and status information.

Removes a web_push integration configuration from the project. This will disable the integration's functionality within the project.

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.

Request body

endpointstringrequired
keysobjectrequired

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.

Removes a specific web_push integration instance by ID from the project.

Path parameters

idstringrequired

Jwt


Creates a new project-level JWT token. These tokens provide project-wide access and should be carefully managed. Only administrators can create project tokens. The returned token should be securely stored as it cannot be retrieved again after creation.

Request body

expiryinteger
The duration for which the token is valid (in seconds)
namestringrequired
The name of the token.
max length: 255

Retrieves a list of all active project-level JWT tokens. Returns a paginated list showing token metadata including creation date, last used date, and expiration time. For security reasons, the actual token values are not included in the response.

Query parameters

page[size]integer
page[after]string
page[before]string

Immediately revokes a project-level JWT token. Once revoked, any requests using this token will be rejected. This action is immediate and cannot be undone. Active sessions using this token will be terminated.

Path parameters

token_idstringrequired

Issues a new user-specific JWT token. These tokens are scoped to individual user permissions and access levels. Only administrators can create user tokens. The token is returned only once at creation time and cannot be retrieved later.

Request body

emailstring
The user's email.
max length: 255
expiryinteger
The duration for which the token is valid (in seconds)
external_idstring
A unique string that MagicBell can utilize to identify the user uniquely. We recommend setting this attribute to the ID of the user in your database. Provide the external id if the user's email is unavailable.
max length: 255
namestring
The name of the token.
max length: 255

Revokes a specific user's JWT token. This immediately invalidates the token and terminates any active sessions using it. This action cannot be undone. Administrators should use this to revoke access when needed for security purposes.

Path parameters

token_idstringrequired

Lists all JWT tokens associated with a specific user. Returns token metadata including creation time, last access time, and expiration date. Administrators can use this to audit user token usage and manage active sessions. Token values are not included in the response for security reasons.

Path parameters

user_idstringrequired

Query parameters

page[size]integer
page[after]string
page[before]string

Users


The user object

Attributes

Lists all mobile_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.

Path parameters

user_idstringrequired

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves a specific mobile_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.

Path parameters

user_idstringrequired
token_idstringrequired

Revokes a specific user's mobile_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.

Path parameters

user_idstringrequired
token_idstringrequired

Lists all mobile_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.

Path parameters

user_idstringrequired

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves a specific mobile_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.

Path parameters

user_idstringrequired
token_idstringrequired

Revokes a specific user's mobile_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.

Path parameters

user_idstringrequired
token_idstringrequired

Lists all mobile_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.

Path parameters

user_idstringrequired

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves a specific mobile_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.

Path parameters

user_idstringrequired
token_idstringrequired

Revokes a specific user's mobile_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.

Path parameters

user_idstringrequired
token_idstringrequired

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.

Path parameters

user_idstringrequired

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves 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.

Path parameters

user_idstringrequired
token_idstringrequired

Revokes 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.

Path parameters

user_idstringrequired
token_idstringrequired

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.

Path parameters

user_idstringrequired

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves 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.

Path parameters

user_idstringrequired
token_idstringrequired

Revokes 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.

Path parameters

user_idstringrequired
token_idstringrequired

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.

Path parameters

user_idstringrequired

Query parameters

page[size]integer
page[after]string
page[before]string

Retrieves 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.

Path parameters

user_idstringrequired
token_idstringrequired

Revokes 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.

Path parameters

user_idstringrequired
token_idstringrequired