API (v2) Reference

Introduction

Base URL: https://api.magicbell.com/v2

For authentication, rate limits, and errors, please refer to the API documentation.

Broadcasts

ENDPOINTS
  POST /broadcasts
   GET /broadcasts/{broadcast_id}
   GET /broadcasts

The Broadcasts object

Attributes

action_url
nullable string
max length: 2048
category
nullable string
max length: 255
pattern: ^[A-Za-z0-9_\.\-/:]+$
content
nullable string
max length: 10485760
created_at
string
format: date-time
custom_attributes
nullable object
id
string
format: uuid
overrides
nullable object
Show child attributes
providers
object
Show child attributes
sendgrid
object
ses
object
apns
object
web_push
object
teams
object
twilio
object
mailgun
object
fcm
object
expo
object
slack
object
channels
object
Show child attributes
sms
object
Show child attributes
content
string
max length: 1048576
action_url
nullable string
max length: 2048
title
string
min length: 1
max length: 255
in_app
object
Show child attributes
title
string
min length: 1
max length: 255
content
string
max length: 1048576
action_url
nullable string
max length: 2048
mobile_push
object
Show child attributes
title
string
min length: 1
max length: 255
content
string
max length: 1048576
action_url
nullable string
max length: 2048
email
object
Show child attributes
action_url
nullable string
max length: 2048
title
string
min length: 1
max length: 255
content
string
max length: 1048576
recipients
nullable array required
min items: 1
max items: 1000
Show child attributes
(array item)
status
object
Show child attributes
status
string required
Possible enum values:
enqueued
processing
processed
summary
object required
Show child attributes
total
integer required
failures
integer required
errors
nullable array required
Show child attributes
(array item)
object
Show child attributes
message
string
title
string required
min length: 1
max length: 255
topic
nullable string
max length: 255
pattern: ^[A-Za-z0-9_\.\-/:]+$
The Broadcasts object
{
  "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": {}
}

Create a broadcast

POST/broadcasts
Project JWT

Request body

action_url
nullable string
max length: 2048
category
nullable string
max length: 255
pattern: ^[A-Za-z0-9_\.\-/:]+$
content
nullable string
max length: 10485760
created_at
string
format: date-time
custom_attributes
nullable object
id
string
format: uuid
overrides
nullable object
Show child attributes
channels
object
Show child attributes
sms
object
Show child attributes
content
string
max length: 1048576
action_url
nullable string
max length: 2048
title
string
min length: 1
max length: 255
in_app
object
Show child attributes
title
string
min length: 1
max length: 255
content
string
max length: 1048576
action_url
nullable string
max length: 2048
mobile_push
object
Show child attributes
title
string
min length: 1
max length: 255
content
string
max length: 1048576
action_url
nullable string
max length: 2048
email
object
Show child attributes
title
string
min length: 1
max length: 255
content
string
max length: 1048576
action_url
nullable string
max length: 2048
providers
object
Show child attributes
slack
object
web_push
object
teams
object
sendgrid
object
mailgun
object
ses
object
twilio
object
fcm
object
expo
object
apns
object
recipients
nullable array required
min items: 1
max items: 1000
Show child attributes
(array item)
status
object
Show child attributes
status
string required
Possible enum values:
enqueued
processing
processed
summary
object required
Show child attributes
total
integer required
failures
integer required
errors
nullable array required
Show child attributes
(array item)
object
Show child attributes
message
string
title
string required
min length: 1
max length: 255
topic
nullable string
max length: 255
pattern: ^[A-Za-z0-9_\.\-/:]+$
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/broadcasts' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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":{}}'
Response
{
  "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": {}
}

Fetch a broadcast

GET/broadcasts/{broadcast_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/broadcasts/{broadcast_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "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": {}
}

List all broadcasts

GET/broadcasts
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/broadcasts' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "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": {}
}
],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Channels

Mobile Push

ENDPOINTS
   PUT /channels/mobile_push/apns/tokens
   GET /channels/mobile_push/apns/tokens/{token_id}
DELETE /channels/mobile_push/apns/tokens/{token_id}
   GET /channels/mobile_push/apns/tokens
   PUT /channels/mobile_push/expo/tokens
   GET /channels/mobile_push/expo/tokens/{token_id}
DELETE /channels/mobile_push/expo/tokens/{token_id}
   GET /channels/mobile_push/expo/tokens
   PUT /channels/mobile_push/fcm/tokens
   GET /channels/mobile_push/fcm/tokens/{token_id}
DELETE /channels/mobile_push/fcm/tokens/{token_id}
   GET /channels/mobile_push/fcm/tokens

The Mobile Push object

Attributes

app_id
string
pattern: ^[a-zA-Z0-9]+(.[a-zA-Z0-9]+)*$
created_at
string required
format: date-time
device_token
string required
min length: 64
discarded_at
nullable string
format: date-time
id
string required
installation_id
string
Possible enum values:
development
production
updated_at
nullable string
format: date-time
The Mobile Push object
{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}

Save an APNs token

PUT/channels/mobile_push/apns/tokens
User JWT

Request body

app_id
string
pattern: ^[a-zA-Z0-9]+(.[a-zA-Z0-9]+)*$
device_token
string required
min length: 64
installation_id
string
Possible enum values:
development
production
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/apns/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"device_token":"eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt","installation_id":"development"}'
Response
{
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "installation_id": "development"
}

Fetch an APNs token

GET/channels/mobile_push/apns/tokens/{token_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/apns/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an APNs token

DELETE/channels/mobile_push/apns/tokens/{token_id}
User JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/apns/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List all APNs tokens

GET/channels/mobile_push/apns/tokens
User JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/apns/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Save an Expo token

PUT/channels/mobile_push/expo/tokens
User JWT

Request body

device_token
string required
min length: 1
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/expo/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"device_token":"ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"}'
Response
{
  "device_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]"
}

Fetch an Expo token

GET/channels/mobile_push/expo/tokens/{token_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/expo/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an Expo token

DELETE/channels/mobile_push/expo/tokens/{token_id}
User JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/expo/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List all Expo tokens

GET/channels/mobile_push/expo/tokens
User JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/expo/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Save a FCM token

PUT/channels/mobile_push/fcm/tokens
User JWT

Request body

device_token
string required
min length: 64
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/fcm/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"device_token":"eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt","installation_id":"development"}'
Response
{
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "installation_id": "development"
}

Fetch a FCM token

GET/channels/mobile_push/fcm/tokens/{token_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/fcm/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete a FCM token

DELETE/channels/mobile_push/fcm/tokens/{token_id}
User JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/fcm/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List all FCM tokens

GET/channels/mobile_push/fcm/tokens
User JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/mobile_push/fcm/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

In App

ENDPOINTS
   PUT /channels/in_app/inbox/tokens
   GET /channels/in_app/inbox/tokens/{token_id}
DELETE /channels/in_app/inbox/tokens/{token_id}
   GET /channels/in_app/inbox/tokens

The In App object

Attributes

connection_id
nullable string
created_at
string required
format: date-time
discarded_at
nullable string
format: date-time
id
string required
token
string required
min length: 64
updated_at
nullable string
format: date-time
The In App object
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "updated_at": "2021-01-01T00:00:00Z"
}

Save an Inbox token

PUT/channels/in_app/inbox/tokens
User JWT

Request body

connection_id
nullable string
token
string required
min length: 64
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/in_app/inbox/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"token":"eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt"}'
Response
{
  "token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt"
}

Fetch an Inbox token

GET/channels/in_app/inbox/tokens/{token_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/in_app/inbox/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an Inbox token

DELETE/channels/in_app/inbox/tokens/{token_id}
User JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/channels/in_app/inbox/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List all Inbox tokens

GET/channels/in_app/inbox/tokens
User JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/in_app/inbox/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Slack

ENDPOINTS
   PUT /channels/slack/magicbell_slackbot/tokens
   GET /channels/slack/magicbell_slackbot/tokens/{token_id}
DELETE /channels/slack/magicbell_slackbot/tokens/{token_id}
   GET /channels/slack/magicbell_slackbot/tokens
   PUT /channels/slack/tokens
   GET /channels/slack/tokens/{token_id}
DELETE /channels/slack/tokens/{token_id}
   GET /channels/slack/tokens

The Slack object

Attributes

created_at
string required
format: date-time
discarded_at
nullable string
format: date-time
id
string required
oauth
object
Show child attributes
channel_id
string required
installation_id
string required
scope
string
updated_at
nullable string
format: date-time
webhook
object
Show child attributes
url
string required
format: uri
min length: 1
The Slack object
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}

Save a MagicBell SlackBot token

PUT/channels/slack/magicbell_slackbot/tokens
User JWT

Request body

oauth
object
Show child attributes
scope
string
channel_id
string required
installation_id
string required
webhook
object
Show child attributes
url
string required
format: uri
min length: 1
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/slack/magicbell_slackbot/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"webhook":{"url":"https://example.com/webhook"}}'
Response
{
  "webhook": {
    "url": "https://example.com/webhook"
  }
}

Fetch a MagicBell SlackBot token

GET/channels/slack/magicbell_slackbot/tokens/{token_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/slack/magicbell_slackbot/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}

Delete a MagicBell SlackBot token

DELETE/channels/slack/magicbell_slackbot/tokens/{token_id}
User JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/channels/slack/magicbell_slackbot/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List all MagicBell SlackBot tokens

GET/channels/slack/magicbell_slackbot/tokens
User JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/slack/magicbell_slackbot/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Save a Slack token

PUT/channels/slack/tokens
User JWT

Request body

oauth
object
Show child attributes
channel_id
string required
installation_id
string required
scope
string
webhook
object
Show child attributes
url
string required
format: uri
min length: 1
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/slack/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"webhook":{"url":"https://example.com/webhook"}}'
Response
{
  "webhook": {
    "url": "https://example.com/webhook"
  }
}

Fetch a Slack token

GET/channels/slack/tokens/{token_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/slack/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}

Delete a Slack token

DELETE/channels/slack/tokens/{token_id}
User JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/channels/slack/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List all Slack tokens

GET/channels/slack/tokens
User JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/slack/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Teams

ENDPOINTS
   PUT /channels/teams/tokens
   GET /channels/teams/tokens/{token_id}
DELETE /channels/teams/tokens/{token_id}
   GET /channels/teams/tokens

The Teams object

Attributes

created_at
string required
format: date-time
discarded_at
nullable string
format: date-time
id
string required
updated_at
nullable string
format: date-time
webhook
object
Show child attributes
url
string
The Teams object
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}

Save a Teams token

PUT/channels/teams/tokens
User JWT

Request body

webhook
object
Show child attributes
url
string
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/teams/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

Fetch a Teams token

GET/channels/teams/tokens/{token_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/teams/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete a Teams token

DELETE/channels/teams/tokens/{token_id}
User JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/channels/teams/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List all Teams tokens

GET/channels/teams/tokens
User JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/teams/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

User Preferences

ENDPOINTS
   PUT /channels/user_preferences
   GET /channels/user_preferences

The User Preferences object

Attributes

categories
array
Show child attributes
(array item)
object
Show child attributes
label
nullable string
max length: 255
channels
array
Show child attributes
(array item)
object
Show child attributes
name
string
enabled
boolean
key
string
max length: 255
pattern: ^[A-Za-z0-9_\.\-/:]+$
The User Preferences object
{
  "categories": [
    {
      "key": "category_1",
      "label": "Category 1",
      "channels": [
        {
          "name": "email",
          "label": "Email",
          "enabled": true
        }
      ]
    }
  ]
}

Save channel preferences

PUT/channels/user_preferences
User JWT

Request body

categories
array
Show child attributes
(array item)
object
Show child attributes
label
nullable string
max length: 255
channels
array
Show child attributes
(array item)
object
Show child attributes
name
string
enabled
boolean
key
string
max length: 255
pattern: ^[A-Za-z0-9_\.\-/:]+$
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/user_preferences' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"categories":[{"key":"category_1","label":"Category 1","channels":[{"name":"email","label":"Email","enabled":true}]}]}'
Response
{}

Fetch channel preferences

GET/channels/user_preferences
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/user_preferences' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "categories": [
      {
        "key": "category_1",
        "label": "Category 1",
        "channels": [
          {
            "name": "email",
            "label": "Email",
            "enabled": true
          }
        ]
      }
    ]
  }

Web Push

ENDPOINTS
   PUT /channels/web_push/tokens
   GET /channels/web_push/tokens/{token_id}
DELETE /channels/web_push/tokens/{token_id}
   GET /channels/web_push/tokens

The Web Push object

Attributes

created_at
string required
format: date-time
discarded_at
nullable string
format: date-time
endpoint
string required
format: uri
id
string required
keys
object required
Show child attributes
auth
string required
p256dh
string required
updated_at
nullable string
format: date-time
The Web Push object
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "endpoint": "https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN",
  "id": "123",
  "keys": {
    "auth": "GoIO2ulhtQuyBM64lZuFuw",
    "p256dh": "BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0"
  },
  "updated_at": "2021-01-01T00:00:00Z"
}

Save a Web Push token

PUT/channels/web_push/tokens
User JWT

Request body

endpoint
string required
format: uri
keys
object required
Show child attributes
auth
string required
p256dh
string required
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/channels/web_push/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $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"}}'
Response
{
  "endpoint": "https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN",
  "keys": {
    "p256dh": "BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0",
    "auth": "GoIO2ulhtQuyBM64lZuFuw"
  }
}

Fetch a Web Push token

GET/channels/web_push/tokens/{token_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/web_push/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "endpoint": "https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN",
  "id": "123",
  "keys": {
    "auth": "GoIO2ulhtQuyBM64lZuFuw",
    "p256dh": "BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0"
  },
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete a Web Push token

DELETE/channels/web_push/tokens/{token_id}
User JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/channels/web_push/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List all Web Push tokens

GET/channels/web_push/tokens
User JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/channels/web_push/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "endpoint": "https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN",
  "id": "123",
  "keys": {
    "auth": "GoIO2ulhtQuyBM64lZuFuw",
    "p256dh": "BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0"
  },
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Events

ENDPOINTS
   GET /events/{event_id}
   GET /events

The Events object

Attributes

code
integer
context
nullable object
id
string required
level
string
log
nullable string
payload
nullable object
timestamp
string required
format: date-time
type
string required
The Events object
{
  "id": "123",
  "type": "example_type",
  "timestamp": "2021-01-01T00:00:00Z"
}

Fetch an event

GET/events/{event_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/events/{event_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "type": "example_type",
    "timestamp": "2021-01-01T00:00:00Z"
  }

List all events

GET/events
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/events' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "id": "123",
    "type": "example_type",
    "timestamp": "2021-01-01T00:00:00Z"
  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Integrations

APNs

ENDPOINTS
   PUT /integrations/apns
DELETE /integrations/apns
   GET /integrations/apns

The APNs object

Attributes

data
array
Show child attributes
(array item)
links
The APNs object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "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"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save an APNs integration

PUT/integrations/apns
Project JWT

Request body

app_id
string required
pattern: ^[a-zA-Z0-9]+(.[a-zA-Z0-9]+)*$
badge
string required
Possible enum values:
unread
unseen
certificate
string required
pattern: ^-+?\s?BEGIN PRIVATE KEY-+\n([A-Za-z0-9+/\r\n]+={0,2})\n-+\s?END PRIVATE KEY+-+\n?$
key_id
string required
min length: 10
max length: 10
payload_version
string
Possible enum values:
1
2
team_id
string required
min length: 10
max length: 10
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/apns' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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"}'
Response
{
  "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"
}

Delete an APNs integration

DELETE/integrations/apns
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/apns' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all APNs integrations

GET/integrations/apns
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/apns' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "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"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Expo

ENDPOINTS
   PUT /integrations/expo
DELETE /integrations/expo
   GET /integrations/expo

The Expo object

Attributes

data
array
Show child attributes
(array item)
links
The Expo object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "access_token": "expo_access_token"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save an Expo integration

PUT/integrations/expo
Project JWT

Request body

access_token
string required
min length: 1
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/expo' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"access_token":"expo_access_token"}'
Response
{
  "access_token": "expo_access_token"
}

Delete an Expo integration

DELETE/integrations/expo
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/expo' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all Expo integrations

GET/integrations/expo
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/expo' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "access_token": "expo_access_token"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

FCM

ENDPOINTS
   PUT /integrations/fcm
DELETE /integrations/fcm
   GET /integrations/fcm

The FCM object

Attributes

data
array
Show child attributes
(array item)
links
The FCM object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "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"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a FCM integration

PUT/integrations/fcm
Project JWT

Request body

auth_provider_x509_cert_url
string required
auth_uri
string required
client_email
string required
client_id
string required
client_x509_cert_url
string required
private_key
string required
pattern: ^-+?\s?BEGIN[A-Z ]+-+\n([A-Za-z0-9+/\r\n]+={0,2})\n-+\s?END[A-Z ]+-+\n?$
private_key_id
string required
project_id
string required
token_uri
string required
type
string required
Possible enum values:
service_account
universe_domain
string required
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/fcm' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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"}'
Response
{
  "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"
}

Delete a FCM integration

DELETE/integrations/fcm
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/fcm' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all FCM integrations

GET/integrations/fcm
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/fcm' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "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"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Inbox

ENDPOINTS
   PUT /integrations/inbox/installations
  POST /integrations/inbox/installations/start
   PUT /integrations/inbox
DELETE /integrations/inbox
   GET /integrations/inbox

The Inbox object

Attributes

data
array
Show child attributes
(array item)
links
The Inbox object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "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"
          }
        }
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save an Inbox installation

PUT/integrations/inbox/installations
User JWT

Request body

images
nullable object required
Show child attributes
emptyInboxUrl
string required
locale
nullable string required
min length: 2
theme
nullable object required
Show child attributes
icon
object
Show child attributes
borderColor
string required
width
string required
banner
object
Show child attributes
fontSize
string required
backgroundColor
string required
textColor
string required
backgroundOpacity
number
unseenBadge
object
Show child attributes
backgroundColor
string required
header
object
Show child attributes
textColor
string required
borderRadius
string required
fontFamily
string required
fontSize
string required
backgroundColor
string required
footer
object
Show child attributes
fontSize
string required
backgroundColor
string required
textColor
string required
borderRadius
string required
notification
object
Show child attributes
default
object required
Show child attributes
state
object
Show child attributes
color
string required
margin
string required
fontFamily
string required
fontSize
string required
textColor
string required
borderRadius
string required
backgroundColor
string required
hover
object
Show child attributes
backgroundColor
string required
unseen
object required
Show child attributes
textColor
string required
backgroundColor
string required
hover
object
Show child attributes
backgroundColor
string required
state
object
Show child attributes
color
string required
unread
object required
Show child attributes
state
object
Show child attributes
color
string required
textColor
string required
backgroundColor
string required
hover
object
Show child attributes
backgroundColor
string required
dialog
object
Show child attributes
backgroundColor
string required
textColor
string required
accentColor
string required
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/inbox/installations' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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"}}}'
Response
{
  "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" }
  }
}

Start an Inbox installation

POST/integrations/inbox/installations/start
User JWT
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/integrations/inbox/installations/start' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "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" }
  }
}

Save an Inbox integration

PUT/integrations/inbox
Project JWT

Request body

images
nullable object required
Show child attributes
emptyInboxUrl
string required
locale
nullable string required
min length: 2
theme
nullable object required
Show child attributes
dialog
object
Show child attributes
backgroundColor
string required
textColor
string required
accentColor
string required
icon
object
Show child attributes
width
string required
borderColor
string required
banner
object
Show child attributes
fontSize
string required
backgroundColor
string required
textColor
string required
backgroundOpacity
number
unseenBadge
object
Show child attributes
backgroundColor
string required
header
object
Show child attributes
fontFamily
string required
fontSize
string required
backgroundColor
string required
textColor
string required
borderRadius
string required
footer
object
Show child attributes
fontSize
string required
backgroundColor
string required
textColor
string required
borderRadius
string required
notification
object
Show child attributes
default
object required
Show child attributes
hover
object
Show child attributes
backgroundColor
string required
state
object
Show child attributes
color
string required
margin
string required
fontFamily
string required
fontSize
string required
textColor
string required
borderRadius
string required
backgroundColor
string required
unseen
object required
Show child attributes
backgroundColor
string required
hover
object
Show child attributes
backgroundColor
string required
state
object
Show child attributes
color
string required
textColor
string required
unread
object required
Show child attributes
hover
object
Show child attributes
backgroundColor
string required
state
object
Show child attributes
color
string required
textColor
string required
backgroundColor
string required
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/inbox' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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"}}}'
Response
{
  "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" }
  }
}

Delete an Inbox integration

DELETE/integrations/inbox
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/inbox' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all Inbox integrations

GET/integrations/inbox
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/inbox' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "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" }
  }
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Magicbell Slackbot

ENDPOINTS
   PUT /integrations/magicbell_slackbot/installations
  POST /integrations/magicbell_slackbot/installations/start
  POST /integrations/magicbell_slackbot/installations/finish
   PUT /integrations/magicbell_slackbot
DELETE /integrations/magicbell_slackbot
   GET /integrations/magicbell_slackbot

The Magicbell Slackbot object

Attributes

data
array
Show child attributes
(array item)
links
The Magicbell Slackbot object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "enabled": true
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a MagicBell SlackBot installation

PUT/integrations/magicbell_slackbot/installations
User JWT

Request body

access_token
string required
app_id
string required
authed_user
object required
Show child attributes
access_token
string
refresh_token
string
id
string required
token_type
string
expires_in
integer
scope
string
bot_user_id
string
enterprise
object
Show child attributes
name
string required
id
string required
expires_in
integer
id
string
pattern: ^[A-Z0-9]+-.*$
incoming_webhook
object
Show child attributes
channel
string required
configuration_url
string required
url
string required
is_enterprise_install
boolean
refresh_token
string
scope
string
team
object required
Show child attributes
name
string
id
string required
token_type
string
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/magicbell_slackbot/installations' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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"}}'
Response
{
  "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"
  }
}

Start a MagicBell SlackBot installation

POST/integrations/magicbell_slackbot/installations/start
User JWT

Request body

app_id
string required
auth_url
string
extra_scopes
array
Show child attributes
(array item)
string
redirect_url
string
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/integrations/magicbell_slackbot/installations/start' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"app_id":"12345678901","auth_url":"https://example.com/auth","redirect_url":"https://example.com/redirect","extra_scopes":["scope1","scope2"]}'
Response
{
    "app_id": "app-id",
    "auth_url": "https://slack.com/oauth/v2/authorize?client_id=app-id&scope=channels:read,chat:write",
    "scopes": [
      "channels:read",
      "chat:write"
    ]
  }

Finish a MagicBell SlackBot installation

POST/integrations/magicbell_slackbot/installations/finish
User JWT

Request body

app_id
string required
code
string required
redirect_url
string
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/integrations/magicbell_slackbot/installations/finish' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"app_id":"12345678901","code":"string","redirect_url":"string"}'
Response
{
  "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"
  }
}

Save a MagicBell SlackBot integration

PUT/integrations/magicbell_slackbot
Project JWT

Request body

enabled
boolean required
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/magicbell_slackbot' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"enabled":true}'
Response
{
    "enabled": true
  }

Delete a MagicBell SlackBot integration

DELETE/integrations/magicbell_slackbot
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/magicbell_slackbot' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all MagicBell SlackBot integrations

GET/integrations/magicbell_slackbot
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/magicbell_slackbot' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
    "enabled": true
  }
  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Mailgun

ENDPOINTS
   PUT /integrations/mailgun
DELETE /integrations/mailgun
   GET /integrations/mailgun

The Mailgun object

Attributes

data
array
Show child attributes
(array item)
links
The Mailgun object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "from": {
          "name": "Example",
          "email": "hello@example.com"
        },
        "api_key": "key-3ax6xnjp29jd6fds4gc373sgvjxteol0",
        "region": "us",
        "domain": "example.com"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a Mailgun integration

PUT/integrations/mailgun
Project JWT

Request body

api_key
string required
min length: 1
domain
string required
min length: 1
from
object
Show child attributes
email
string required
format: email
name
nullable string
region
string required
Possible enum values:
us
eu
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/mailgun' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"from":{"name":"Example","email":"hello@example.com"},"api_key":"key-3ax6xnjp29jd6fds4gc373sgvjxteol0","region":"us","domain":"example.com"}'
Response
{
  "from": {
    "name": "Example",
    "email": "hello@example.com"
  },
  "api_key": "key-3ax6xnjp29jd6fds4gc373sgvjxteol0",
  "region": "us",
  "domain": "example.com"
}

Delete a Mailgun integration

DELETE/integrations/mailgun
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/mailgun' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all Mailgun integrations

GET/integrations/mailgun
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/mailgun' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "from": {
    "name": "Example",
    "email": "hello@example.com"
  },
  "api_key": "key-3ax6xnjp29jd6fds4gc373sgvjxteol0",
  "region": "us",
  "domain": "example.com"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Ping Email

ENDPOINTS
   PUT /integrations/ping_email
DELETE /integrations/ping_email
   GET /integrations/ping_email

The Ping Email object

Attributes

data
array
Show child attributes
(array item)
links
The Ping Email object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "url": "https://example.com/webhook"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a Ping Email integration

PUT/integrations/ping_email
Project JWT

Request body

url
string required
format: uri
min length: 1
max length: 100
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/ping_email' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"url":"https://example.com/webhook"}'
Response
{
  "url": "https://example.com/webhook"
}

Delete a Ping Email integration

DELETE/integrations/ping_email
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/ping_email' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all Ping Email integrations

GET/integrations/ping_email
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/ping_email' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "url": "https://example.com/webhook"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

SendGrid

ENDPOINTS
   PUT /integrations/sendgrid
DELETE /integrations/sendgrid
   GET /integrations/sendgrid

The SendGrid object

Attributes

data
array
Show child attributes
(array item)
links
The SendGrid object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "api_key": "SG.1234567890",
        "from": {
          "email": "company@example.com",
          "name": "Company Name"
        },
        "reply_to": {
          "email": "reply-to@example.com",
          "name": "Reply to Company"
        }
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a SendGrid integration

PUT/integrations/sendgrid
Project JWT

Request body

api_key
string required
from
object
Show child attributes
name
nullable string
email
string required
format: email
reply_to
object
Show child attributes
email
string required
format: email
name
nullable string
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/sendgrid' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"api_key":"SG.1234567890","from":{"email":"company@example.com","name":"Company Name"},"reply_to":{"email":"reply-to@example.com","name":"Reply to Company"}}'
Response
{
  "api_key": "SG.1234567890",
  "from": {
    "email": "company@example.com",
    "name": "Company Name"
  },
  "reply_to": {
    "email": "reply-to@example.com",
    "name": "Reply to Company"
  }
}

Delete a SendGrid integration

DELETE/integrations/sendgrid
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/sendgrid' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all SendGrid integrations

GET/integrations/sendgrid
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/sendgrid' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "api_key": "SG.1234567890",
  "from": {
    "email": "company@example.com",
    "name": "Company Name"
  },
  "reply_to": {
    "email": "reply-to@example.com",
    "name": "Reply to Company"
  }
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Amazon SES

ENDPOINTS
   PUT /integrations/ses
DELETE /integrations/ses
   GET /integrations/ses

The Amazon SES object

Attributes

data
array
Show child attributes
(array item)
links
The Amazon SES object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "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"
        }
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save an Amazon SES integration

PUT/integrations/ses
Project JWT

Request body

from
object
Show child attributes
email
string required
format: email
name
nullable string
key_id
string required
min length: 1
region
string required
min length: 1
secret_key
string required
min length: 1
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/ses' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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"}}'
Response
{
  "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"
  }
}

Delete an Amazon SES integration

DELETE/integrations/ses
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/ses' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all Amazon SES integrations

GET/integrations/ses
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/ses' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "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"
  }
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Slack

ENDPOINTS
   PUT /integrations/slack/installations
  POST /integrations/slack/installations/start
  POST /integrations/slack/installations/finish
   PUT /integrations/slack
DELETE /integrations/slack
   GET /integrations/slack

The Slack object

Attributes

data
array
Show child attributes
(array item)
links
The Slack object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "app_id": "12345678901",
        "client_id": "1.0",
        "client_secret": "12345678901234567890123456789012",
        "signing_secret": "12345678901234567890123456789012"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a Slack installation

PUT/integrations/slack/installations
User JWT

Request body

access_token
string required
app_id
string required
authed_user
object required
Show child attributes
token_type
string
expires_in
integer
scope
string
access_token
string
refresh_token
string
id
string required
bot_user_id
string
enterprise
object
Show child attributes
name
string required
id
string required
expires_in
integer
id
string
pattern: ^[A-Z0-9]+-.*$
incoming_webhook
object
Show child attributes
channel
string required
configuration_url
string required
url
string required
is_enterprise_install
boolean
refresh_token
string
scope
string
team
object required
Show child attributes
name
string
id
string required
token_type
string
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/slack/installations' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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"}}'
Response
{
  "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"
  }
}

Start a Slack installation

POST/integrations/slack/installations/start
User JWT

Request body

app_id
string required
auth_url
string
extra_scopes
array
Show child attributes
(array item)
string
redirect_url
string
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/integrations/slack/installations/start' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"app_id":"12345678901","auth_url":"https://example.com/auth","redirect_url":"https://example.com/redirect","extra_scopes":["scope1","scope2"]}'
Response
{
    "app_id": "app-id",
    "auth_url": "https://slack.com/oauth/v2/authorize?client_id=app-id&scope=channels:read,chat:write",
    "scopes": [
      "channels:read",
      "chat:write"
    ]
  }

Finish a Slack installation

POST/integrations/slack/installations/finish
User JWT

Request body

app_id
string required
code
string required
redirect_url
string
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/integrations/slack/installations/finish' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"app_id":"12345678901","code":"string","redirect_url":"string"}'
Response
{
  "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"
  }
}

Save a Slack integration

PUT/integrations/slack
Project JWT

Request body

app_id
string required
pattern: ^[0-9A-Z]+$
client_id
string required
pattern: ^[0-9]+\.[0-9]+$
client_secret
string required
min length: 32
max length: 32
signing_secret
string required
min length: 32
max length: 32
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/slack' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"app_id":"12345678901","client_id":"1.0","client_secret":"12345678901234567890123456789012","signing_secret":"12345678901234567890123456789012"}'
Response
{
  "app_id": "12345678901",
  "client_id": "1.0",
  "client_secret": "12345678901234567890123456789012",
  "signing_secret": "12345678901234567890123456789012"
}

Delete a Slack integration

DELETE/integrations/slack
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/slack' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all Slack integrations

GET/integrations/slack
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/slack' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "app_id": "12345678901",
  "client_id": "1.0",
  "client_secret": "12345678901234567890123456789012",
  "signing_secret": "12345678901234567890123456789012"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

SMTP

ENDPOINTS
   PUT /integrations/smtp
DELETE /integrations/smtp
   GET /integrations/smtp

The SMTP object

Attributes

data
array
Show child attributes
(array item)
links
The SMTP object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "host": "smtp.gmail.com",
        "port": 587,
        "username": "user@example.com",
        "password": "your-app-password",
        "from": {
          "email": "notifications@example.com",
          "name": "Example Notifications"
        },
        "reply_to": {
          "email": "support@example.com",
          "name": "Example Support"
        },
        "security": "starttls"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a SMTP integration

PUT/integrations/smtp
Project JWT

Request body

from
object required
Show child attributes
email
string required
format: email
name
string
host
string required
password
string required
port
integer required
min: 1
max: 65535
reply_to
object
Show child attributes
name
string
email
string required
format: email
security
string
Possible enum values:
none
ssl
starttls
username
string required
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/smtp' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"host":"smtp.gmail.com","port":587,"username":"user@example.com","password":"your-app-password","from":{"email":"notifications@example.com","name":"Example Notifications"},"reply_to":{"email":"support@example.com","name":"Example Support"},"security":"starttls"}'
Response
{
  "host": "smtp.gmail.com",
  "port": 587,
  "username": "user@example.com",
  "password": "your-app-password",
  "from": {
    "email": "notifications@example.com",
    "name": "Example Notifications"
  },
  "reply_to": {
    "email": "support@example.com",
    "name": "Example Support"
  },
  "security": "starttls"
}

Delete a SMTP integration

DELETE/integrations/smtp
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/smtp' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all SMTP integrations

GET/integrations/smtp
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/smtp' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "host": "smtp.gmail.com",
  "port": 587,
  "username": "user@example.com",
  "password": "your-app-password",
  "from": {
    "email": "notifications@example.com",
    "name": "Example Notifications"
  },
  "reply_to": {
    "email": "support@example.com",
    "name": "Example Support"
  },
  "security": "starttls"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Twilio

ENDPOINTS
   PUT /integrations/twilio
DELETE /integrations/twilio
   GET /integrations/twilio

The Twilio object

Attributes

data
array
Show child attributes
(array item)
links
The Twilio object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "account_sid": "ACXXXXXXXX",
        "api_key": "SKXXXXXXXX",
        "api_secret": "your_api_secret",
        "from": "+15017122661"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a Twilio integration

PUT/integrations/twilio
Project JWT

Request body

account_sid
string required
min length: 1
max length: 100
api_key
string required
min length: 1
max length: 100
api_secret
string required
min length: 1
max length: 100
from
string required
min length: 1
max length: 100
pattern: ^\+[0-9]{1,14}$
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/twilio' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"account_sid":"ACXXXXXXXX","api_key":"SKXXXXXXXX","api_secret":"your_api_secret","from":"+15017122661"}'
Response
{
  "account_sid": "ACXXXXXXXX",
  "api_key": "SKXXXXXXXX",
  "api_secret": "your_api_secret",
  "from": "+15017122661"
}

Delete a Twilio integration

DELETE/integrations/twilio
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/twilio' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all Twilio integrations

GET/integrations/twilio
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/twilio' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "account_sid": "ACXXXXXXXX",
  "api_key": "SKXXXXXXXX",
  "api_secret": "your_api_secret",
  "from": "+15017122661"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Web Push

ENDPOINTS
   PUT /integrations/web_push/installations
  POST /integrations/web_push/installations/start
   PUT /integrations/web_push
DELETE /integrations/web_push
   GET /integrations/web_push

The Web Push object

Attributes

data
array
Show child attributes
(array item)
links
The Web Push object
{
  "data": [
    {
      "name": "<provider-name>",
      "id": "123",
      "config": {
        "public_key": "BNKZeSrRX_c3QfqzOvv1oshpj1qPbDcUJHKET6Ahs2u9-F4HgllPYxtgaGvGSqfytuALumX5NYZPLD8YmCwBxcw",
        "private_key": "y56TIPdEzrQ0Ku_uQbGGkB84mYdF9pJl5IHvmAZ_fVs"
      }
    }
  ],
  "links": {
    "first": "https://api.magicbell.com/v1/example",
    "next": "https://api.magicbell.com/v1/example?page_next=abc",
    "prev": null
  }
}

Save a Web Push installation

PUT/integrations/web_push/installations
User JWT

Request body

endpoint
string required
format: uri
keys
object required
Show child attributes
p256dh
string required
auth
string required
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/web_push/installations' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $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"}}'
Response
{
  "endpoint": "https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN",
  "keys": {
    "p256dh": "BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0",
    "auth": "GoIO2ulhtQuyBM64lZuFuw"
  }
}

Start a Web Push installation

POST/integrations/web_push/installations/start
User JWT
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/integrations/web_push/installations/start' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "public_key": "BHaJd...gRHDk",
  "auth_token": "eyGhb...GA2Bw"
}

Save a Web Push integration

PUT/integrations/web_push
Project JWT

Request body

private_key
string required
min length: 8
max length: 128
public_key
string required
min length: 8
max length: 128
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/integrations/web_push' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"public_key":"BNKZeSrRX_c3QfqzOvv1oshpj1qPbDcUJHKET6Ahs2u9-F4HgllPYxtgaGvGSqfytuALumX5NYZPLD8YmCwBxcw","private_key":"y56TIPdEzrQ0Ku_uQbGGkB84mYdF9pJl5IHvmAZ_fVs"}'
Response
{
  "public_key": "BNKZeSrRX_c3QfqzOvv1oshpj1qPbDcUJHKET6Ahs2u9-F4HgllPYxtgaGvGSqfytuALumX5NYZPLD8YmCwBxcw",
  "private_key": "y56TIPdEzrQ0Ku_uQbGGkB84mYdF9pJl5IHvmAZ_fVs"
}

Delete a Web Push integration

DELETE/integrations/web_push
Project JWT

Query parameters

id
string
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/integrations/web_push' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all Web Push integrations

GET/integrations/web_push
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/integrations/web_push' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "name": "<provider-name>",
    "id": "123",
    "config": {
  "public_key": "BNKZeSrRX_c3QfqzOvv1oshpj1qPbDcUJHKET6Ahs2u9-F4HgllPYxtgaGvGSqfytuALumX5NYZPLD8YmCwBxcw",
  "private_key": "y56TIPdEzrQ0Ku_uQbGGkB84mYdF9pJl5IHvmAZ_fVs"
}

  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Notifications

ENDPOINTS
  POST /notifications/archive
  POST /notifications/read
   GET /notifications/{notification_id}
  POST /notifications/{notification_id}/archive
  POST /notifications/{notification_id}/unarchive
  POST /notifications/{notification_id}/read
  POST /notifications/{notification_id}/unread
   GET /notifications

The Notifications object

Attributes

action_url
nullable string
max length: 2048
archived_at
nullable string
format: date-time
category
nullable string
max length: 100
content
nullable string
max length: 10485760
created_at
string required
format: date-time
custom_attributes
nullable object
discarded_at
nullable string
format: date-time
id
string required
format: uuid
read_at
nullable string
format: date-time
seen_at
nullable string
format: date-time
sent_at
nullable string
format: date-time
title
string required
min length: 1
max length: 255
topic
nullable string
max length: 100
updated_at
string required
format: date-time
user_id
string required
format: uuid
The Notifications object
{
  "id": "4b6efd21-f0f6-4051-8922-cc8c90a3dc5d",
  "title": "Example Notification",
  "action_url": null,
  "seen_at": null,
  "read_at": null,
  "project_id": 7,
  "user_id": "d4121424-097e-40b0-9cc8-357060d004b2",
  "created_at": "2024-09-11T11:14:42.165Z",
  "updated_at": "2024-09-11T11:14:42.165Z",
  "custom_attributes": {
    "key": "value",
    "obj_key": {
      "one": "two"
    }
  },
  "metadata": {},
  "category_id": null,
  "notification_broadcast_id": "6a8b1e23-f54b-4c65-95b2-78f288d7f247",
  "in_app": true,
  "discarded_at": null,
  "overrides": {},
  "aasm_state": "unseen",
  "archived_at": null,
  "topic_id": null
}

Archive all notifications

POST/notifications/archive
User JWT

Query parameters

category
nullable string
topic
nullable string
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/notifications/archive' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

Mark all notifications read

POST/notifications/read
User JWT

Query parameters

category
nullable string
topic
nullable string
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/notifications/read' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

Fetch a notification

GET/notifications/{notification_id}
User JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/notifications/{notification_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "id": "4b6efd21-f0f6-4051-8922-cc8c90a3dc5d",
  "title": "Example Notification",
  "action_url": null,
  "seen_at": null,
  "read_at": null,
  "project_id": 7,
  "user_id": "d4121424-097e-40b0-9cc8-357060d004b2",
  "created_at": "2024-09-11T11:14:42.165Z",
  "updated_at": "2024-09-11T11:14:42.165Z",
  "custom_attributes": { "key": "value", "obj_key": { "one": "two" } },
  "metadata": {},
  "category_id": null,
  "notification_broadcast_id": "6a8b1e23-f54b-4c65-95b2-78f288d7f247",
  "in_app": true,
  "discarded_at": null,
  "overrides": {},
  "aasm_state": "unseen",
  "archived_at": null,
  "topic_id": null
}

Archive a notification

POST/notifications/{notification_id}/archive
User JWT
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/notifications/{notification_id}/archive' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

Unarchive a notification

POST/notifications/{notification_id}/unarchive
User JWT
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/notifications/{notification_id}/unarchive' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

Mark a notification read

POST/notifications/{notification_id}/read
User JWT
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/notifications/{notification_id}/read' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

Mark a notification unread

POST/notifications/{notification_id}/unread
User JWT
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/notifications/{notification_id}/unread' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

List all notifications

GET/notifications
User JWT

Query parameters

category
nullable string
ending_before
nullable string
limit
integer
starting_after
nullable string
status
nullable string
topic
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/notifications' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "id": "4b6efd21-f0f6-4051-8922-cc8c90a3dc5d",
  "title": "Example Notification",
  "action_url": null,
  "seen_at": null,
  "read_at": null,
  "project_id": 7,
  "user_id": "d4121424-097e-40b0-9cc8-357060d004b2",
  "created_at": "2024-09-11T11:14:42.165Z",
  "updated_at": "2024-09-11T11:14:42.165Z",
  "custom_attributes": { "key": "value", "obj_key": { "one": "two" } },
  "metadata": {},
  "category_id": null,
  "notification_broadcast_id": "6a8b1e23-f54b-4c65-95b2-78f288d7f247",
  "in_app": true,
  "discarded_at": null,
  "overrides": {},
  "aasm_state": "unseen",
  "archived_at": null,
  "topic_id": null
}
],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Users

ENDPOINTS
   PUT /users
DELETE /users/{user_id}
   GET /users/{user_id}/channels/mobile_push/apns/tokens/{token_id}
DELETE /users/{user_id}/channels/mobile_push/apns/tokens/{token_id}
   GET /users/{user_id}/channels/mobile_push/apns/tokens
   GET /users/{user_id}/channels/mobile_push/expo/tokens/{token_id}
DELETE /users/{user_id}/channels/mobile_push/expo/tokens/{token_id}
   GET /users/{user_id}/channels/mobile_push/expo/tokens
   GET /users/{user_id}/channels/mobile_push/fcm/tokens/{token_id}
DELETE /users/{user_id}/channels/mobile_push/fcm/tokens/{token_id}
   GET /users/{user_id}/channels/mobile_push/fcm/tokens
   GET /users/{user_id}/channels/in_app/inbox/tokens/{token_id}
DELETE /users/{user_id}/channels/in_app/inbox/tokens/{token_id}
   GET /users/{user_id}/channels/in_app/inbox/tokens
   GET /users/{user_id}/channels/slack/magicbell_slackbot/tokens/{token_id}
DELETE /users/{user_id}/channels/slack/magicbell_slackbot/tokens/{token_id}
   GET /users/{user_id}/channels/slack/magicbell_slackbot/tokens
   GET /users/{user_id}/channels/slack/tokens/{token_id}
DELETE /users/{user_id}/channels/slack/tokens/{token_id}
   GET /users/{user_id}/channels/slack/tokens
   GET /users/{user_id}/channels/teams/tokens/{token_id}
DELETE /users/{user_id}/channels/teams/tokens/{token_id}
   GET /users/{user_id}/channels/teams/tokens
   GET /users/{user_id}/channels/web_push/tokens/{token_id}
DELETE /users/{user_id}/channels/web_push/tokens/{token_id}
   GET /users/{user_id}/channels/web_push/tokens
   GET /users

The Users object

Attributes

app_id
string
pattern: ^[a-zA-Z0-9]+(.[a-zA-Z0-9]+)*$
created_at
string required
format: date-time
device_token
string required
min length: 64
discarded_at
nullable string
format: date-time
id
string required
installation_id
string
Possible enum values:
development
production
updated_at
nullable string
format: date-time
The Users object
{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}

Save a user

PUT/users
Project JWT

Request body

created_at
nullable string
format: date-time
custom_attributes
nullable object
email
nullable string
external_id
nullable string
first_name
nullable string
id
string
format: uuid
last_name
nullable string
last_notified_at
nullable string
format: date-time
last_seen_at
nullable string
format: date-time
updated_at
nullable string
format: date-time
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/users' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --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"}}'
Response
{
  "id": "8a038704-acc1-47f9-81b0-7523886cbeae",
  "external_id": "external-id",
  "email": "dan@example.com",
  "first_name": "Dan",
  "last_name": "Example",
  "custom_attributes": {
    "key": "value"
  }
}

Delete a user

DELETE/users/{user_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{}

Fetch a user's APNs token

GET/users/{user_id}/channels/mobile_push/apns/tokens/{token_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/apns/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an user's APNs token

DELETE/users/{user_id}/channels/mobile_push/apns/tokens/{token_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/apns/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List an user's APNs tokens

GET/users/{user_id}/channels/mobile_push/apns/tokens
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/apns/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Fetch a user's Expo token

GET/users/{user_id}/channels/mobile_push/expo/tokens/{token_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/expo/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an user's Expo token

DELETE/users/{user_id}/channels/mobile_push/expo/tokens/{token_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/expo/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List an user's Expo tokens

GET/users/{user_id}/channels/mobile_push/expo/tokens
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/expo/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Fetch a user's FCM token

GET/users/{user_id}/channels/mobile_push/fcm/tokens/{token_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/fcm/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an user's FCM token

DELETE/users/{user_id}/channels/mobile_push/fcm/tokens/{token_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/fcm/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List an user's FCM tokens

GET/users/{user_id}/channels/mobile_push/fcm/tokens
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/mobile_push/fcm/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "device_token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "installation_id": "development",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Fetch a user's Inbox token

GET/users/{user_id}/channels/in_app/inbox/tokens/{token_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/in_app/inbox/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an user's Inbox token

DELETE/users/{user_id}/channels/in_app/inbox/tokens/{token_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/in_app/inbox/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List an user's Inbox tokens

GET/users/{user_id}/channels/in_app/inbox/tokens
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/in_app/inbox/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "token": "eH0fLhuiRj2Np7UQ-opXAm:APA91bGtC-wH4sgW1jWkMKIZf7FYkm_RTQb7Jid7DfSJnCgivGYoRzhLrGxpcIF6yPjmbzAr6CKF-6phZkBasFUUfZmfdgcqfA_ZlZdVk6pSnon3LGzMumCzEJE0zgWoo_RUmVUVJUAt",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Fetch a user's MagicBell SlackBot token

GET/users/{user_id}/channels/slack/magicbell_slackbot/tokens/{token_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/slack/magicbell_slackbot/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}

Delete an user's MagicBell SlackBot token

DELETE/users/{user_id}/channels/slack/magicbell_slackbot/tokens/{token_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/slack/magicbell_slackbot/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List an user's MagicBell SlackBot tokens

GET/users/{user_id}/channels/slack/magicbell_slackbot/tokens
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/slack/magicbell_slackbot/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Fetch a user's Slack token

GET/users/{user_id}/channels/slack/tokens/{token_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/slack/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}

Delete an user's Slack token

DELETE/users/{user_id}/channels/slack/tokens/{token_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/slack/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List an user's Slack tokens

GET/users/{user_id}/channels/slack/tokens
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/slack/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z",
  "webhook": {
    "url": "https://example.com/webhook"
  }
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Fetch a user's Teams token

GET/users/{user_id}/channels/teams/tokens/{token_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/teams/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an user's Teams token

DELETE/users/{user_id}/channels/teams/tokens/{token_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/teams/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List an user's Teams tokens

GET/users/{user_id}/channels/teams/tokens
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/teams/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "id": "123",
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Fetch a user's Web Push token

GET/users/{user_id}/channels/web_push/tokens/{token_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/web_push/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "endpoint": "https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN",
  "id": "123",
  "keys": {
    "auth": "GoIO2ulhtQuyBM64lZuFuw",
    "p256dh": "BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0"
  },
  "updated_at": "2021-01-01T00:00:00Z"
}

Delete an user's Web Push token

DELETE/users/{user_id}/channels/web_push/tokens/{token_id}
Project JWT
Request
curl --request DELETE \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/web_push/tokens/{token_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "123",
    "discarded_at": "2021-01-01T00:00:00Z"
  }

List an user's Web Push tokens

GET/users/{user_id}/channels/web_push/tokens
Project JWT

Query parameters

ending_before
nullable string
limit
integer
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users/{user_id}/channels/web_push/tokens' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
  "created_at": "2021-01-01T00:00:00Z",
  "discarded_at": "2021-01-01T00:00:00Z",
  "endpoint": "https://fcm.googleapis.com/fcm/send/fZhR0fsr0zw:APA91bE4pM-qo1KBJDU_Zp2N9nDP-Jdmwugm-v4KNL_NlJvYCrJeJUzPXmMyAXqAE0m6BFOrkSWT0ArGbUjEEpxQEYZLado8JeW1PZA5CHB8R6C7HT6-MD6Qs8ZaCn8_ffLGGU7WuvtN",
  "id": "123",
  "keys": {
    "auth": "GoIO2ulhtQuyBM64lZuFuw",
    "p256dh": "BICAe4KtLhhPNFvynlqMRxjvpRnr94881QeuTCr8kCwJf-Fssj3FLIlnfFMjj7T1yNg5l6cn14350323_NSGZh0"
  },
  "updated_at": "2021-01-01T00:00:00Z"
}],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

List all users

GET/users
Project JWT

Query parameters

ending_before
nullable string
limit
integer
query
nullable string
starting_after
nullable string
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/users' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "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"
  }
}
],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

Workflows

ENDPOINTS
   PUT /workflows
   GET /workflows/*
  POST /workflows/runs
   GET /workflows/runs/{run_id}
   GET /workflows/{workflow_key}/runs
   GET /workflows

The Workflows object

Attributes

disabled
boolean
key
string required
min length: 3
pattern: ^[A-Za-z0-9\_\.\-\:]+$
steps
array required
Show child attributes
(array item)
object
Show child attributes
if
nullable string
input
nullable object
command
string required
pattern: ^[a-z_]+$
The Workflows object
{
  "steps": [
    {
      "command": "broadcast",
      "input": {
        "channel": "in_app"
      }
    },
    {
      "command": "broadcast",
      "if": "{{data.paying}} == true",
      "input": {
        "channel": "email"
      }
    }
  ],
  "key": "project"
}

Save workflow definition

PUT/workflows
Project JWT

Request body

disabled
boolean
key
string required
min length: 3
pattern: ^[A-Za-z0-9\_\.\-\:]+$
steps
array required
Show child attributes
(array item)
object
Show child attributes
command
string required
pattern: ^[a-z_]+$
if
nullable string
input
nullable object
Request
curl --request PUT \
  --url 'https://api.magicbell.com/v2/workflows' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"steps":[{"command":"broadcast","input":{"channel":"in_app"}},{"command":"broadcast","if":"{{data.paying}} == true","input":{"channel":"email"}}],"key":"project"}'
Response
{
  "steps": [
    {
      "command": "broadcast",
      "input": {
        "channel": "in_app"
      }
    },
    {
      "command": "broadcast",
      "if": "{{data.paying}} == true",
      "input": {
        "channel": "email"
      }
    }
  ],
  "key": "project"
}

Fetch workflow definition

GET/workflows/*
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/workflows/*' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
  "steps": [
    {
      "command": "broadcast",
      "input": {
        "channel": "in_app"
      }
    },
    {
      "command": "broadcast",
      "if": "{{data.paying}} == true",
      "input": {
        "channel": "email"
      }
    }
  ],
  "key": "project"
}

Execute workflow

POST/workflows/runs
Project JWT

Request body

input
nullable object
key
string required
pattern: ^[A-Za-z0-9\_\.\-\:]+$
Request
curl --request POST \
  --url 'https://api.magicbell.com/v2/workflows/runs' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN" \
  --data '{"key":"magicbell:signup","input":{"user":{"id":"123","name":"John Doe"}}}'
Response
{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Get workflow run status

GET/workflows/runs/{run_id}
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/workflows/runs/{run_id}' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "id": "01234567-89ab-cdef-0123-456789abcdef",
    "workflow_key": "integration.stripe.charge.succeeded",
    "status": {
      "state": 2,
      "next_step": 1,
      "started_at": "2024-01-01T00:00:00Z"
    },
    "created_at": "2024-01-01T00:00:00Z",
    "input": {
      "description": "",
      "payload": {
        "action": "in_progress"
      },
      "type": "workflow_job"
    }
  }

List workflow runs

GET/workflows/{workflow_key}/runs
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/workflows/{workflow_key}/runs' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "data":[{
    "id": "01234567-89ab-cdef-0123-456789abcdef",
    "workflow_key": "integration.stripe.charge.succeeded",
    "status": {
      "state": 2,
      "next_step": 1,
      "started_at": "2024-01-01T00:00:00Z"
    },
    "created_at": "2024-01-01T00:00:00Z"
  }],
    "links": {
      "first":"https://api.magicbell.com/v1/example",
      "next":"https://api.magicbell.com/v1/example?page_next=abc",
      "prev":null
    }
  }

List workflow definitions

GET/workflows
Project JWT
Request
curl --request GET \
  --url 'https://api.magicbell.com/v2/workflows' \
  --header 'content-type: application/json' \
  --header "authorization: Bearer $TOKEN"
Response
{
    "items": [
      {
        "key": "integration.stripe.charge.succeeded",
        "disabled": false,
        "steps": [
          {
            "command": "broadcast",
            "if": "event.amount > 1000",
            "input": {
              "category": "billing",
              "template": "payment_received"
            }
          }
        ]
      }
    ]
  }