> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Job status

> The last known state of a background job (a carousel build or change, an infographic version). Poll this, or use the event stream, instead of polling the carousel or infographic.

What `result` holds depends on the job and on `status`:
- Carousel build or change (`carousel-build:…`): while `running`, `{ done, total }` (slides drawn so far); when `done`, `{ carouselId, pages, postsUpdated }`. `percent` and `message` describe the current step. A `failed` job has a `message` and no result.
- Infographic (`infographic:…`): `running` carries only a `message` (`Writing the content`, then `Drawing`); when `done`, `{ infographicId, versionId }`. A `failed` job has a `message`.
After `done`, read the full object with `GET /carousels/{id}` or `GET /infographics/{id}`. `status` is one of `queued`, `running`, `progress`, `done`, `failed`; a job nobody has reported on yet is `queued`.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/jobs/{jobId}
openapi: 3.1.0
info:
  title: PostChamp API
  version: 1.0.0
  description: >-
    Write, schedule and manage LinkedIn posts, content styles, carousels and
    infographics from your own tools. Calls run as the key's creator with their
    current role and use the organization's credits. Lists are `{ items,
    nextCursor }`; errors are `{ error: { code, message, details } }`. Every
    response carries `X-Request-Id`, `RateLimit-Limit`, `RateLimit-Remaining`
    and `RateLimit-Reset`; a 429 adds `Retry-After`. Calls that spend credits
    require an `Idempotency-Key` header, and a replayed answer carries
    `Idempotent-Replayed: true`.
servers:
  - url: https://api.postchampai.com
security: []
tags:
  - name: Account
  - name: Posts
  - name: Scheduling
  - name: Content styles
  - name: Carousels
  - name: Infographics
  - name: Jobs
paths:
  /api/v1/jobs/{jobId}:
    get:
      tags:
        - Jobs
      summary: Job status
      description: >-
        The last known state of a background job (a carousel build or change, an
        infographic version). Poll this, or use the event stream, instead of
        polling the carousel or infographic.


        What `result` holds depends on the job and on `status`:

        - Carousel build or change (`carousel-build:…`): while `running`, `{
        done, total }` (slides drawn so far); when `done`, `{ carouselId, pages,
        postsUpdated }`. `percent` and `message` describe the current step. A
        `failed` job has a `message` and no result.

        - Infographic (`infographic:…`): `running` carries only a `message`
        (`Writing the content`, then `Drawing`); when `done`, `{ infographicId,
        versionId }`. A `failed` job has a `message`.

        After `done`, read the full object with `GET /carousels/{id}` or `GET
        /infographics/{id}`. `status` is one of `queued`, `running`, `progress`,
        `done`, `failed`; a job nobody has reported on yet is `queued`.
      operationId: getJobStatus
      parameters:
        - schema:
            type: string
            minLength: 1
            maxLength: 200
            pattern: ^[A-Za-z0-9:_\-.]+$
            description: >-
              The `jobId` an answer gave you (for example from creating a
              carousel or an infographic). It is an opaque string of letters,
              digits and `: _ - .` (at most 200 characters): use it exactly as
              given, do not build or parse it. A job of another workspace, or
              one that is unknown, is 404.
            example: carousel-build:5f6a7b8c-9d0e-4f1a-8b2c-3d4e5f6a7b8c:0
          required: true
          description: >-
            The `jobId` an answer gave you (for example from creating a carousel
            or an infographic). It is an opaque string of letters, digits and `:
            _ - .` (at most 200 characters): use it exactly as given, do not
            build or parse it. A job of another workspace, or one that is
            unknown, is 404.
          name: jobId
          in: path
      responses:
        '200':
          description: The last known state.
          headers:
            X-Request-Id:
              description: >-
                Id of this request. Quote it when you contact support; 5xx
                bodies repeat it as `details.requestId`.
              schema:
                type: string
                example: req_8f3a2c1e9b7d4a60
            RateLimit-Limit:
              description: >-
                Calls allowed in the current per-minute window (the window with
                the fewest calls left).
              schema:
                type: integer
                example: 120
            RateLimit-Remaining:
              description: Calls left in the current window.
              schema:
                type: integer
                example: 117
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
                example: 42
          content:
            application/json:
              example:
                jobRef: carousel-build:5f6a7b8c-9d0e-4f1a-8b2c-3d4e5f6a7b8c:0
                status: done
                percent: 100
                result:
                  carouselId: 5f6a7b8c-9d0e-4f1a-8b2c-3d4e5f6a7b8c
                  pages: 2
                  postsUpdated: 0
                at: '2026-03-10T10:02:41.000Z'
              schema:
                $ref: '#/components/schemas/JobStatus'
        '401':
          description: >-
            `api_key_required` (no `x-api-key`) or `api_key_invalid` (unknown,
            revoked or expired key, or its creator left the organization).
          headers:
            X-Request-Id:
              description: >-
                Id of this request. Quote it when you contact support; 5xx
                bodies repeat it as `details.requestId`.
              schema:
                type: string
                example: req_8f3a2c1e9b7d4a60
            RateLimit-Limit:
              description: >-
                Calls allowed in the current per-minute window (the window with
                the fewest calls left).
              schema:
                type: integer
                example: 120
            RateLimit-Remaining:
              description: Calls left in the current window.
              schema:
                type: integer
                example: 117
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
                example: 42
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            `subscription_required` (trial ended or no live subscription) or
            `insufficient_credits`.
          headers:
            X-Request-Id:
              description: >-
                Id of this request. Quote it when you contact support; 5xx
                bodies repeat it as `details.requestId`.
              schema:
                type: string
                example: req_8f3a2c1e9b7d4a60
            RateLimit-Limit:
              description: >-
                Calls allowed in the current per-minute window (the window with
                the fewest calls left).
              schema:
                type: integer
                example: 120
            RateLimit-Remaining:
              description: Calls left in the current window.
              schema:
                type: integer
                example: 117
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
                example: 42
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            `plan_limit` (the plan lacks `api_access`, or a daily cap was
            reached) or `forbidden` (the key's role can't do this).
          headers:
            X-Request-Id:
              description: >-
                Id of this request. Quote it when you contact support; 5xx
                bodies repeat it as `details.requestId`.
              schema:
                type: string
                example: req_8f3a2c1e9b7d4a60
            RateLimit-Limit:
              description: >-
                Calls allowed in the current per-minute window (the window with
                the fewest calls left).
              schema:
                type: integer
                example: 120
            RateLimit-Remaining:
              description: Calls left in the current window.
              schema:
                type: integer
                example: 117
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
                example: 42
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: '`not_found`: the id does not exist or the key can''t reach it.'
          headers:
            X-Request-Id:
              description: >-
                Id of this request. Quote it when you contact support; 5xx
                bodies repeat it as `details.requestId`.
              schema:
                type: string
                example: req_8f3a2c1e9b7d4a60
            RateLimit-Limit:
              description: >-
                Calls allowed in the current per-minute window (the window with
                the fewest calls left).
              schema:
                type: integer
                example: 120
            RateLimit-Remaining:
              description: Calls left in the current window.
              schema:
                type: integer
                example: 117
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
                example: 42
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            `rate_limited`; see `Retry-After`. The body's `error.details` is `{
            retryAfterSeconds, scope? }`: `retryAfterSeconds` is the wait in
            seconds (same as the `Retry-After` header) and `scope` names the
            limit that tripped (`api_global`, `api_apiKey`,
            `api_apiKeyGenerate`, …).
          headers:
            X-Request-Id:
              description: >-
                Id of this request. Quote it when you contact support; 5xx
                bodies repeat it as `details.requestId`.
              schema:
                type: string
                example: req_8f3a2c1e9b7d4a60
            RateLimit-Limit:
              description: >-
                Calls allowed in the current per-minute window (the window with
                the fewest calls left).
              schema:
                type: integer
                example: 120
            RateLimit-Remaining:
              description: Calls left in the current window.
              schema:
                type: integer
                example: 117
            RateLimit-Reset:
              description: Seconds until the window resets.
              schema:
                type: integer
                example: 42
            Retry-After:
              description: >-
                Seconds to wait before retrying (same value as
                `error.details.retryAfterSeconds`).
              schema:
                type: integer
                example: 12
          content:
            application/json:
              example:
                error:
                  code: rate_limited
                  message: Too many requests. Try again soon.
                  details:
                    retryAfterSeconds: 12
                    scope: api_apiKey
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    JobStatus:
      type: object
      properties:
        jobRef:
          type: string
        status:
          type: string
          enum:
            - queued
            - running
            - progress
            - done
            - failed
        percent:
          type: number
          minimum: 0
          maximum: 100
        message:
          type: string
        result:
          type: object
          additionalProperties: {}
        at:
          type: string
          format: date-time
      required:
        - jobRef
        - status
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: not_found
            message:
              type: string
              example: Workspace not found.
            details: {}
          required:
            - code
            - message
      required:
        - error
      description: >-
        Every error has this shape. 5xx answers carry `details.requestId`; every
        answer has an `X-Request-Id` header.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Send your API key in the `x-api-key` header on every request.


        - Create a key in PostChamp under **Settings → API keys**. API access
        needs the Studio plan.

        - Keys start with `pc_live_`. The full key is shown **once**, when you
        create it: copy it then. Afterwards only its prefix is shown; lost keys
        are revoked and replaced.

        - Calls run as the person who created the key, with their current role,
        and spend the organization's credits.

        - Limits per key: 120 requests per minute, 20 generation calls per
        minute. Keep the key on your server, never in a browser or app.

````