---
openapi: 3.0.3
info:
  title: Braze REST API – Delete scheduled API-triggered campaigns
  description: |
    ## Prerequisites

    To use this endpoint, you'll need an [API key]({{site.baseurl}}/api/basics#rest-api-key-permissions) with the `campaigns.trigger.schedule.delete` permission.

    ## Rate limit

    We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).
  version: 1.0.0
  contact:
    name: Braze Support
    url: https://www.braze.com/docs/braze_support/
  license:
    name: Braze Documentation
    url: https://www.braze.com/docs/api/home/
servers:
  - url: https://rest.iad-01.braze.com
    description: US-01
  - url: https://rest.iad-02.braze.com
    description: US-02
  - url: https://rest.iad-03.braze.com
    description: US-03
  - url: https://rest.iad-04.braze.com
    description: US-04
  - url: https://rest.iad-05.braze.com
    description: US-05
  - url: https://rest.iad-06.braze.com
    description: US-06
  - url: https://rest.iad-07.braze.com
    description: US-07
  - url: https://rest.iad-08.braze.com
    description: US-08
  - url: https://rest.us-10.braze.com
    description: US-10
  - url: https://rest.fra-01.braze.eu
    description: EU-01
  - url: https://rest.fra-02.braze.eu
    description: EU-02
  - url: https://rest.au-01.braze.com
    description: AU-01
  - url: https://rest.id-01.braze.com
    description: ID-01
  - url: https://rest.jp-01.braze.com
    description: JP-01
  - url: https://rest.kr-01.braze.com
    description: KR-01
security:
- BearerAuth: []
paths:
  "/campaigns/trigger/schedule/delete":
    post:
      summary: Delete scheduled API-triggered campaigns
      operationId: post_campaigns_trigger_schedule_delete_post_delete_scheduled_triggered_messages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteScheduledTriggeredMessagesRequest'
            examples:
              delete_schedule:
                summary: Delete a scheduled API-triggered campaign
                value:
                  campaign_id: campaign_identifier
                  schedule_id: schedule_identifier
      responses:
        "201":
          description: |
            The request was accepted and the scheduled triggered campaign was deleted. No action needed.

            If the campaign is archived or paused, the response also includes a `notice` field. If the campaign is archived, you see this `notice` message: "The campaign is archived. Unarchive the campaign to ensure trigger requests will take effect." If the campaign is paused, you see this `notice` message: "The campaign is paused. Resume the campaign to ensure trigger requests will take effect."
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteScheduledTriggeredMessagesResponse'
              examples:
                success:
                  summary: Schedule deleted
                  value:
                    message: success
                paused:
                  summary: Schedule deleted for a paused campaign
                  value:
                    notice: The campaign is paused. Resume the campaign to ensure trigger requests will take effect.
                    message: success
        "400":
          description: |
            Bad request. To resolve it:

            - **The `campaign_id` isn't valid:** Pass a valid `campaign_id`. Find it with the [Export campaign list endpoint]({{site.baseurl}}/api/endpoints/export/campaigns/get_campaigns/).
            - **The campaign can't be triggered by the API:** Set the campaign to **API-triggered** delivery, then retry.
            - **The `schedule_id` is missing or invalid:** Pass the `schedule_id` returned when you created the schedule.
            - **`segment_id` isn't supported on this endpoint:** Remove `segment_id` from the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_campaign_id:
                  summary: The campaign_id isn't valid
                  value:
                    message: campaign_id must be a valid campaign id
                campaign_not_api_triggered:
                  summary: The campaign can't be triggered by the API
                  value:
                    message: Campaign must be triggerable by API
                invalid_schedule_id:
                  summary: The schedule_id is missing or invalid
                  value:
                    message: "'schedule_id' must be a valid identifier of a schedule object"
                segment_id_not_supported:
                  summary: segment_id isn't supported
                  value:
                    message: "'segment_id' is not supported on this endpoint"
        "401":
          description: |
            Unauthorized. The REST API key is missing, malformed, or sent to the wrong REST endpoint. Send the key as `Authorization: Bearer YOUR_REST_API_KEY` to the correct [REST endpoint]({{site.baseurl}}/api/basics/#endpoints). For more causes, see [Errors and responses]({{site.baseurl}}/api/errors/#fatal-errors).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_api_key:
                  summary: Invalid API key
                  value:
                    message: 'Invalid API key: YOUR_REST_API_KEY'
        "403":
          description: Access denied. The REST API key doesn't have the required permission. Use a REST API key that has the `campaigns.trigger.schedule.delete` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                access_denied:
                  summary: Missing permission
                  value:
                    message: Access Denied
        "429":
          description: |
            Rate limited. You exceeded the rate limit for this endpoint. Slow your request rate and retry with exponential backoff. See [API rate limits]({{site.baseurl}}/api/api_limits/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                over_rate_limit:
                  summary: Over rate limit
                  value:
                    message: You have exceeded your limit of 250000 requests per hour. Please contact your account executive to increase your limit. If you do not have their info, you may contact Braze directly at https://www.braze.com/contact/.
        5XX:
          description: |
            Internal server error. An unexpected error occurred on the Braze server. Retry with exponential backoff. If the error persists, contact [Support]({{site.baseurl}}/braze_support/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: REST API key
      description: |
        REST API keys are created in the Braze dashboard at **Settings → APIs and
        Identifiers → API Keys**. The key must include the `campaigns.trigger.schedule.delete` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    DeleteScheduledTriggeredMessagesRequest:
      title: Delete scheduled API-triggered campaign request
      type: object
      required: [campaign_id, schedule_id]
      properties:
        campaign_id:
          type: string
          description: The campaign identifier. See [campaign identifier]({{site.baseurl}}/api/identifier_types/).
          example: campaign_identifier
        schedule_id:
          type: string
          description: The `schedule_id` to delete (obtained from the response to create schedule).
          example: schedule_identifier
    DeleteScheduledTriggeredMessagesResponse:
      title: Delete scheduled API-triggered campaign response
      type: object
      properties:
        message:
          type: string
          description: Returns `success` when the request completes without errors.
          example: success
        send_id:
          type: string
          description: The send identifier, returned when `send_id` was included in the request.
        notice:
          type: string
          description: A warning returned when the campaign is archived or paused, in which case trigger requests have no effect until it is unarchived or resumed.
          example: The campaign is paused. Resume the campaign to ensure trigger requests will take effect.
    ErrorResponse:
      title: Error
      type: object
      properties:
        message:
          type: string
          description: The error message describing why the request failed.
        errors:
          type: array
          description: Non-fatal errors encountered while processing the request. Data unaffected by these errors is still processed.
          items:
            type: object
            properties:
              type:
                type: string
                description: The error type.
