SuprSend Broadcast Run API

The Broadcast Run API from SuprSend — 1 operation(s) for broadcast run.

OpenAPI Specification

suprsend-broadcast-run-api-openapi.yml Raw ↑
openapi: 3.1.1
info:
  title: SuprSend Broadcast Broadcast Run API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
- url: https://hub.suprsend.com
security:
- sec0: []
- BearerAuth: []
tags:
- name: Broadcast Run
paths:
  /v1/broadcast_run/cancel/:
    post:
      summary: Cancel Broadcast
      security:
      - BearerAuth: []
      description: 'API to cancel a running broadcast execution. You can cancel a broadcast by passing any combination of filters in the request body. When multiple parameters are provided, they are **ANDed** together to narrow down the matching broadcast runs.


        For example, passing both `list_id` and `idempotency_key` will cancel only the broadcast runs that match both the given list and idempotency key.

        '
      operationId: cancel-broadcast
      x-codeSamples:
      - lang: cURL
        label: Cancel by execution_id
        source: "curl --request POST \\\n  --url 'https://hub.suprsend.com/v1/broadcast_run/cancel/' \\\n  --header 'Authorization: Bearer __your_api_key__' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"execution_id\": \"broadcast_xxxx-xxxx-xxxx-xxxx\"\n  }'\n"
      - lang: cURL
        label: Cancel by multiple filters
        source: "curl --request POST \\\n  --url 'https://hub.suprsend.com/v1/broadcast_run/cancel/' \\\n  --header 'Authorization: Bearer __your_api_key__' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n    \"list_id\": \"my_user_list\"\n  }'\n"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: 'Filter parameters to identify broadcast runs to cancel. At least one parameter must be provided. When multiple parameters are passed, they are **ANDed** together.

                '
              properties:
                execution_id:
                  type: string
                  description: Unique execution identifier of the broadcast run to cancel. You can find this in the broadcast logs on the SuprSend dashboard.
                  example: broadcast_xxxx-xxxx-xxxx-xxxx
                list_id:
                  type: string
                  description: Identifier of the user list whose broadcast runs should be cancelled.
                  example: my_user_list
                idempotency_key:
                  type: string
                  description: Idempotency key that was passed when triggering the broadcast. Use this to cancel a specific broadcast triggered with a known idempotency key.
                  example: a1b2c3d4-xxxx-xxxx-xxxx-ef0123456789
      responses:
        '200':
          description: 200 - OK
          content:
            application/json:
              examples:
                Cancelled:
                  summary: Broadcast runs cancelled
                  value:
                    execution_ids:
                    - broadcast_xxxx-xxxx-xxxx-xxxx
                NoMatch:
                  summary: No matching broadcast runs found
                  value:
                    execution_ids: []
              schema:
                type: object
                properties:
                  execution_ids:
                    type: array
                    description: List of broadcast execution IDs that were successfully cancelled. Empty array if no matching broadcast runs were found.
                    items:
                      type: string
                      description: Unique execution identifier of the cancelled broadcast run.
                    example:
                    - broadcast_xxxx-xxxx-xxxx-xxxx
        '400':
          description: 400 - Bad Request
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 400
                    message: 'at least one filter is required: execution_id, list_id, idempotency_key'
              schema:
                type: object
                description: Returned when the request body does not include at least one valid filter parameter.
                properties:
                  code:
                    type: integer
                    description: HTTP status code of the error.
                    example: 400
                  message:
                    type: string
                    description: Human-readable error message describing the issue.
                    example: 'at least one filter is required: execution_id, list_id, idempotency_key'
      deprecated: false
      tags:
      - Broadcast Run
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard Developers -> API Keys section.
    ServiceTokenAuth:
      type: apiKey
      in: header
      name: ServiceToken <token>
      description: You can get Service Token from [SuprSend dashboard -> Account Settings -> Service Tokens](https://app.suprsend.com/en/account-settings/service-tokens) section.
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: Bearer authentication header of the form `Bearer <token>`, where <token> is your auth token.
x-readme:
  headers: []
  explorer-enabled: true
  proxy-enabled: true
x-readme-fauxas: true