# Retrieve job status

`GET /jobs/status/{job_id}`

> This is a subset of the full specification, limited to the `GET /jobs/status/{job_id}` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `GET /jobs/status/{job_id}` operation.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Jobs
    description: Everything about jobs
paths:
  /jobs/status/{job_id}:
    get:
      summary: Retrieve job status
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: job_id
          in: path
          required: true
          description: The unique identifier for the job which is given by Intercom
          schema:
            type: string
      tags:
        - Jobs
      operationId: jobsStatus
      description: Retrieve the status of job execution.
      responses:
        '200':
          description: Job execution status
          content:
            application/json:
              examples:
                job status retrieved:
                  value:
                    type: job
                    id: '2'
                    status: success
                    resource_type: ticket
                    resource_id: '20'
                    resource_url: https://api.intercom.io/tickets/20
              schema:
                $ref: '#/components/schemas/jobs'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: 2c8a20ee-ed09-42c0-a31d-a1b4f5d2742d
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Job not found
          content:
            application/json:
              examples:
                Job not found:
                  value:
                    type: error.list
                    request_id: 123e4567-e89b-12d3-a456-426614174000
                    errors:
                      - code: job_not_found
                        message: Job Not Found
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    jobs:
      title: Jobs
      type: object
      x-tags:
        - Jobs
      description: Jobs are tasks that are processed asynchronously by the Intercom system after being enqueued via the API. This allows for efficient handling of operations that may take time to complete, such as data imports or exports. You can check the status of your jobs to monitor their progress and ensure they are completed successfully.
      properties:
        type:
          type: string
          description: The type of the object
          enum:
            - job
        id:
          type: string
          description: The id of the job that's currently being processed or has completed.
          example: 20
        url:
          type: string
          description: API endpoint URL to check the job status.
          example: https://api.intercom.io/jobs/status/20
        status:
          type: string
          description: The status of the job execution.
          enum:
            - pending
            - success
            - failed
        resource_type:
          type: string
          description: The type of resource created during job execution.
          example: ticket
        resource_id:
          type: string
          description: The id of the resource created during job execution (e.g. ticket id)
          example: 123
          nullable: true
        resource_url:
          type: string
          description: The url of the resource created during job exeuction. Use this url to fetch the resource.
          example: http://api.intercom.io/tickets/123
          nullable: true
      required:
        - id
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.15'
      default: '2.15'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
