MagicBell channels API

The channels API from MagicBell — 25 operation(s) for channels.

OpenAPI Specification

magicbell-channels-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: MagicBell apns channels API
  description: OpenAPI 3.0.3 Specification for MagicBell API.
  contact:
    name: MagicBell
    url: https://magicbell.com
    email: hello@magicbell.com
  version: 2.0.0
servers:
- url: https://api.magicbell.com/v2
  description: MagicBell REST API Base URL
tags:
- name: channels
paths:
  /channels/deliveryconfig:
    get:
      tags:
      - channels
      description: ''
      operationId: get_project_deliveryconfig
      parameters:
      - name: key
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryDeliveryConfig'
    put:
      tags:
      - channels
      description: ''
      operationId: save_project_deliveryconfig
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CategoryDeliveryConfig'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryDeliveryConfig'
  /channels/mobile_push/apns/tokens:
    get:
      tags:
      - channels
      description: Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
      operationId: get_mobile_push_apns_tokens
      parameters:
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfAPNSTokenResponses'
    post:
      tags:
      - channels
      description: Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
      operationId: save_mobile_push_apns_token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/APNSToken'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APNSToken'
  /channels/mobile_push/apns/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
      operationId: discard_mobile_push_apns_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
      operationId: get_mobile_push_apns_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APNSTokenResponse'
  /channels/mobile_push/expo/tokens:
    get:
      tags:
      - channels
      description: Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
      operationId: get_mobile_push_expo_tokens
      parameters:
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfExpoTokenResponses'
    post:
      tags:
      - channels
      description: Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
      operationId: save_mobile_push_expo_token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpoToken'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpoToken'
  /channels/mobile_push/expo/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
      operationId: discard_mobile_push_expo_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
      operationId: get_mobile_push_expo_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpoTokenResponse'
  /channels/mobile_push/fcm/tokens:
    get:
      tags:
      - channels
      description: Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
      operationId: get_mobile_push_fcm_tokens
      parameters:
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfFCMTokenResponses'
    post:
      tags:
      - channels
      description: Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
      operationId: save_mobile_push_fcm_token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FCMToken'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FCMToken'
  /channels/mobile_push/fcm/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
      operationId: discard_mobile_push_fcm_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
      operationId: get_mobile_push_fcm_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FCMTokenResponse'
  /channels/slack/tokens:
    get:
      tags:
      - channels
      description: Lists all slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
      operationId: get_slack_tokens
      parameters:
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfSlackTokenResponses'
    post:
      tags:
      - channels
      description: Saves a slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
      operationId: save_slack_token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SlackToken'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackToken'
      x-forbid-unknown-cookie: true
      x-forbid-unknown-header: true
      x-forbid-unknown-path: true
      x-forbid-unknown-query: true
  /channels/slack/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes one of the authenticated user's slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
      operationId: discard_slack_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves details of a specific slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
      operationId: get_slack_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackTokenResponse'
  /channels/teams/tokens:
    get:
      tags:
      - channels
      description: Lists all teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
      operationId: get_teams_tokens
      parameters:
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfTeamsTokenResponses'
    post:
      tags:
      - channels
      description: Saves a teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
      operationId: save_teams_token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamsToken'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamsToken'
  /channels/teams/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes one of the authenticated user's teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
      operationId: discard_teams_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves details of a specific teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
      operationId: get_teams_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamsTokenResponse'
  /channels/web_push/tokens:
    get:
      tags:
      - channels
      description: Lists all web_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata.
      operationId: get_web_push_tokens
      parameters:
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfWebPushTokenResponses'
    post:
      tags:
      - channels
      description: Saves a web_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel.
      operationId: save_web_push_token
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebPushToken'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebPushToken'
  /channels/web_push/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes one of the authenticated user's web_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens.
      operationId: discard_web_push_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves details of a specific web_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens.
      operationId: get_web_push_token
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebPushTokenResponse'
  /users/{user_id}/channels/mobile_push/apns/tokens:
    get:
      tags:
      - channels
      description: Lists all mobile_push tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
      operationId: get_mobile_push_apns_user_tokens
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfAPNSTokenResponses'
  /users/{user_id}/channels/mobile_push/apns/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes a specific user's mobile_push token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
      operationId: discard_mobile_push_apns_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves a specific mobile_push token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
      operationId: get_mobile_push_apns_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APNSTokenResponse'
  /users/{user_id}/channels/mobile_push/expo/tokens:
    get:
      tags:
      - channels
      description: Lists all mobile_push tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
      operationId: get_mobile_push_expo_user_tokens
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfExpoTokenResponses'
  /users/{user_id}/channels/mobile_push/expo/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes a specific user's mobile_push token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
      operationId: discard_mobile_push_expo_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves a specific mobile_push token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
      operationId: get_mobile_push_expo_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExpoTokenResponse'
  /users/{user_id}/channels/mobile_push/fcm/tokens:
    get:
      tags:
      - channels
      description: Lists all mobile_push tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
      operationId: get_mobile_push_fcm_user_tokens
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfFCMTokenResponses'
  /users/{user_id}/channels/mobile_push/fcm/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes a specific user's mobile_push token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
      operationId: discard_mobile_push_fcm_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves a specific mobile_push token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
      operationId: get_mobile_push_fcm_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FCMTokenResponse'
  /users/{user_id}/channels/slack/tokens:
    get:
      tags:
      - channels
      description: Lists all slack tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
      operationId: get_slack_user_tokens
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfSlackTokenResponses'
  /users/{user_id}/channels/slack/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes a specific user's slack token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
      operationId: discard_slack_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves a specific slack token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
      operationId: get_slack_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackTokenResponse'
  /users/{user_id}/channels/teams/tokens:
    get:
      tags:
      - channels
      description: Lists all teams tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
      operationId: get_teams_user_tokens
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfTeamsTokenResponses'
  /users/{user_id}/channels/teams/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes a specific user's teams token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
      operationId: discard_teams_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscardResult'
    get:
      tags:
      - channels
      description: Retrieves a specific teams token by its ID for a given user. This endpoint is available to project administrators and requires project-level authentication. Use this to inspect token details including its status, creation date, and associated metadata.
      operationId: get_teams_user_token
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: token_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamsTokenResponse'
  /users/{user_id}/channels/web_push/tokens:
    get:
      tags:
      - channels
      description: Lists all web_push tokens associated with a specific user. This endpoint is available to project administrators and returns a paginated list of tokens, including both active and revoked tokens.
      operationId: get_web_push_user_tokens
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
      - name: page[after]
        in: query
        required: false
        schema:
          type: string
      - name: page[before]
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArrayOfWebPushTokenResponses'
  /users/{user_id}/channels/web_push/tokens/{token_id}:
    delete:
      tags:
      - channels
      description: Revokes a specific user's web_push token. This endpoint is available to project administrators and permanently invalidates the specified token. Once revoked, the token can no longer be used to access channel features. This action cannot be undone.
      operationId: discard_web_push_user_token
      parameters:
      - name: user_id


# --- truncated at 32 KB (47 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/magicbell/refs/heads/main/openapi/magicbell-channels-api-openapi.yml