---
openapi: 3.0.3
info:
  title: Braze REST API – Update scheduled messages
  description: |
    ## Prerequisites

    To use this endpoint, you'll need an [API key]({{site.baseurl}}/api/basics#rest-api-key-permissions) with the `messages.schedule.update` 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:
  "/messages/schedule/update":
    post:
      summary: Update scheduled messages
      operationId: post_messages_schedule_update_post_update_scheduled_messages
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateScheduledMessagesRequest'
            examples:
              schedule_and_messages:
                summary: Update the schedule and messages
                value:
                  schedule_id: schedule_identifier
                  schedule:
                    time: '2030-05-24T20:30:36Z'
                  messages:
                    apple_push:
                      alert: Updated Message!
                      badge: 1
                    android_push:
                      title: Updated title!
                      alert: Updated message!
                    sms:
                      subscription_group_id: subscription_group_identifier
                      body: This is my SMS body.
                      app_id: app_identifier
      responses:
        "201":
          description: The request was accepted and the scheduled message was updated. No action needed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateScheduledMessagesResponse'
              examples:
                success:
                  summary: Schedule updated
                  value:
                    message: success
        "400":
          description: |
            Bad request. To resolve it:

            - **The `schedule_id` is missing or invalid:** Pass the `schedule_id` returned when you created the schedule.
            - **The request doesn't include a `schedule` or `messages` object to update:** Include a `schedule` or `messages` object in the request.
            - **The `schedule.time` is missing, malformed, or in the past:** Pass `schedule.time` as a future ISO 8601 UTC datetime.
            - **For local or optimal delivery, the `time` is in the past:** Pass a future `schedule.time` for local or optimal delivery.
            - **Both `in_local_time` and `at_optimal_time` are `true`:** Set only one of `in_local_time` or `at_optimal_time`.
            - **The request updates `messages`, but no scheduled message matches the `schedule_id`:** Pass the `schedule_id` returned when you created the schedule.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_schedule_id:
                  summary: The schedule_id is missing or invalid
                  value:
                    message: "'schedule_id' must be a valid identifier of a schedule message"
                nothing_to_update:
                  summary: The request doesn't include a schedule or messages object
                  value:
                    message: "schedule updates must update the 'schedule' or 'messages'"
                invalid_time:
                  summary: The time is missing, malformed, or in the past
                  value:
                    message: "'time' must be an ISO 8601 time in UTC that has not passed"
                local_time_in_past:
                  summary: The local or optimal time is in the past
                  value:
                    message: "'time' must be an ISO 8601 time in UTC that is not in the past"
                local_and_optimal:
                  summary: Both in_local_time and at_optimal_time are true
                  value:
                    message: "only one of 'in_local_time' and 'at_optimal_time' can be true"
                schedule_not_found:
                  summary: No scheduled message matches the schedule_id
                  value:
                    message: Unable to find schedule
        "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 `messages.schedule.update` 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 `messages.schedule.update` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    Schedule:
      title: Schedule object
      type: object
      required: [time]
      description: |
        See [schedule object]({{site.baseurl}}/api/objects_filters/schedule_object). For the fields, see the [create schedule documentation]({{site.baseurl}}/api/endpoints/messaging/schedule_messages/post_schedule_messages).
      properties:
        time:
          type: string
          description: Time to send the message, as an ISO 8601 datetime string.
          example: '2030-05-24T20:30:36Z'
        in_local_time:
          type: boolean
          example: false
        at_optimal_time:
          type: boolean
          example: false
    Messages:
      title: Messaging objects
      type: object
      additionalProperties: true
      description: |
        See [available messaging objects]({{site.baseurl}}/api/objects_filters#messaging-objects).
    UpdateScheduledMessagesRequest:
      title: Update scheduled messages request
      type: object
      required: [schedule_id]
      properties:
        schedule_id:
          type: string
          description: The `schedule_id` to update (obtained from the response to create schedule).
          example: schedule_identifier
        schedule:
          $ref: '#/components/schemas/Schedule'
        messages:
          $ref: '#/components/schemas/Messages'
    UpdateScheduledMessagesResponse:
      title: Update scheduled messages response
      type: object
      properties:
        message:
          type: string
          description: Returns `success` when the request completes without errors.
          example: success
    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.
