---
openapi: 3.0.3
info:
  title: Braze REST API – List job sync status
  description: 'Use this endpoint to return a list of past sync statuses for a given integration.

    '
  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:
  "/cdi/integrations/{integration_id}/job_sync_status":
    get:
      summary: List job sync status
      description: |
        > Use this endpoint to return a list of past sync statuses for a given integration.

        **Note:**
        To use this endpoint, you'll need to generate an API key with the `cdi.integration_job_status` permission.


        ## Rate limit

        For rate limit details, see [API rate limits]({{site.baseurl}}/api/api_limits/).

        ## Path parameters

        The following table lists the path parameters for this endpoint.

        | Parameter | Required | Data Type | Description |
        |---|---|---|---|
        | `integration_id` | Required | String | Integration ID. |


        ## Query parameters

        Each call to this endpoint will return 10 items. For an integration with more than 10 syncs, use the `Link` header to retrieve the data on the next page as shown in the following example response.

        | Parameter | Required | Data Type | Description |
        |---|---|---|---|
        | `cursor` | Optional | String | Determines the pagination of the sync status. |


        ## Example request

        ### Without cursor

        The following sample request shows an example without a cursor.

        ```
        curl --location --request GET 'https://rest.iad-03.braze.com/cdi/integrations/00000000-0000-0000-0000-000000000000/job_sync_status' \
        --header 'Content-Type: application/json' \
        --header 'Authorization: Bearer YOUR_REST_API_KEY'
        ```

        ### With cursor

        The following sample request shows an example with a cursor.

        ```
        curl --location --request GET 'https://rest.iad-03.braze.com/cdi/integrations/00000000-0000-0000-0000-000000000000/job_sync_status?cursor=c2tpcDow' \
        --header 'Content-Type: application/json' \
        --header 'Authorization: Bearer YOUR_REST_API_KEY'
        ```

        ## Response

        ### Example success response

        The status code `200` could return the following response body.

        **Note:**
        The `Link` header won't exist if there are less than or equal to 10 syncs in total. For calls without a cursor, `prev` will not show. When looking at the last page of items, `next` will not show.


        ```
        Link: </cdi/integrations/00000000-0000-0000-0000-000000000000/job_sync_status?cursor=c2tpcDow>; rel="prev",</cdi/integrations00000000-0000-0000-0000-000000000000/job_sync_status?cursor=c2tpcDoxMDA=>; rel="next"
        ```

        ```json
        {
          "results": [
            {
                "job_status": (string) status of the sync, see below for explanation of different statuses,
                "sync_start_time": (string) time the sync started in ISO 8601,
                "sync_finish_time": (string) time the sync finished in ISO 8601,
                "last_timestamp_synced": (string) last UPDATED_AT timestamp processed by the sync in ISO 8601,
                "rows_synced": (integer) number of rows successfully synced to Braze,
                "rows_failed_with_errors": (integer) number of rows failed because of errors
            }
          ],
          "message": "success"
        }
        ```

        | job_status | Explanation |
        | --- | --- |
        | `running` | The job is currently running. |
        | `success` | All rows synced successfully. |
        | `partial` | Some rows failed to sync due to errors. |
        | `error` | No rows were synced. |
        | `config_error` | There was an error in integration configuration. Check your integration setup. |

        ## Response status codes

        The following table lists the responses for this endpoint, the error message you may receive, and how to resolve it.

        | Status code | Meaning | Error message | How to resolve |
        | --- | --- | --- | --- |
        | `200 OK` | The request succeeded and the response body lists the job sync statuses. | `success` | No action needed. |
        | `400 Bad Request` | The `cursor` value isn't valid. | `Invalid cursor` | Pass a valid `cursor` from the `Link` header of a previous response, or omit it. |
        | `400 Bad Request` | The `integration_id` isn't valid. | `Invalid integration ID` | Pass a valid `integration_id`. Find it with the [List integrations endpoint]({{site.baseurl}}/api/endpoints/cdi/get_integration_list/). |
        | `404 Not Found` | No job status was found for the given integration. | `Job status not found` | Confirm the `integration_id` is correct and that syncs have run for it. |
        | `401 Unauthorized` | The REST API key is missing, malformed, or sent to the wrong REST endpoint. | `Invalid API key` | 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). |
        | `403 Access Denied` | The REST API key doesn't have the required permission. | `Access Denied` | Use a REST API key that has the `cdi.integration_job_status` permission. |
        | `429 Rate Limited` | You exceeded the rate limit for this endpoint. | `Over rate limit` | Slow your request rate and retry with exponential backoff. See [API rate limits]({{site.baseurl}}/api/api_limits/). |
        | `5XX Internal Server Error` | An unexpected error occurred on the Braze server. | `Internal Server Error` | Retry with exponential backoff. If the error persists, contact [Support]({{site.baseurl}}/braze_support/). |
      operationId: get_cdi_integrations_integration_id_job_sync_status_get_job_sync_status
      tags:
      - Cdi
      responses:
        '200':
          description: The request succeeded and the response body lists the job sync statuses.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobSyncStatusResponse'
        '400':
          description: |-
            Bad Request. Causes include:

            - `Invalid cursor` — The `cursor` value isn't valid.
            - `Invalid integration ID` — The `integration_id` isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: No job status was found for the given integration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The REST API key is missing, malformed, or sent to the wrong REST endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: The REST API key doesn't have the required permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: You exceeded the rate limit for this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '5XX':
          description: An unexpected error occurred on the Braze server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      parameters:
      - name: integration_id
        in: path
        required: true
        description: Path parameter `integration_id`.
        schema:
          type: string
      - name: cursor
        in: query
        required: false
        description: Determines the pagination of the sync status.
        schema:
          type: string
components:
  schemas:
    JobSyncStatusResponse:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              job_status:
                type: string
                description: Status of the sync, see below for explanation of different statuses.
              sync_start_time:
                type: string
                description: Time the sync started in ISO 8601.
              sync_finish_time:
                type: string
                description: Time the sync finished in ISO 8601.
              last_timestamp_synced:
                type: string
                description: Last UPDATED_AT timestamp processed by the sync in ISO 8601.
              rows_synced:
                type: integer
                description: Number of rows successfully synced to Braze.
              rows_failed_with_errors:
                type: integer
                description: Number of rows failed because of errors.
        message:
          type: string
    ErrorResponse:
      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.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: REST API key
