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

# Get Scenario job status

> Returns the current status and result of a scenario creation job.

Poll this endpoint to check job progress. Typical job duration is about 5 minutes.

**Job statuses:**
- `queued`: Job is waiting to be processed
- `processing`: AI agent is actively creating the scenario
- `completed`: Scenario created successfully (check `scenario` field)
- `failed`: Job failed (check `error` field for details)
- `cancelled`: Job was cancelled via DELETE




## OpenAPI

````yaml /api-reference/openapi.yaml get /scenario-studio/jobs/{job_id}
openapi: 3.0.3
info:
  title: Exec API
  version: '1.0'
  description: >
    REST API for programmatic access to your Exec workspace.


    Use the Exec API to read workspace data, list members, retrieve group
    information,

    and create interactive scenario creation sessions.


    ## Authentication

    All requests require a valid API key passed in the Authorization header:

    ```

    Authorization: Bearer exec_live_...

    ```


    Create API keys in your workspace settings under **Settings > API**.
servers:
  - url: https://api.exec.com/rest/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /scenario-studio/jobs/{job_id}:
    get:
      tags:
        - Scenario Studio
      summary: Get Scenario job status
      description: >
        Returns the current status and result of a scenario creation job.


        Poll this endpoint to check job progress. Typical job duration is about
        5 minutes.


        **Job statuses:**

        - `queued`: Job is waiting to be processed

        - `processing`: AI agent is actively creating the scenario

        - `completed`: Scenario created successfully (check `scenario` field)

        - `failed`: Job failed (check `error` field for details)

        - `cancelled`: Job was cancelled via DELETE
      operationId: getScenarioJob
      parameters:
        - name: job_id
          in: path
          required: true
          description: The job ID returned from job creation
          schema:
            type: string
      responses:
        '200':
          description: Job status and result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScenarioJob'
              examples:
                queued:
                  summary: Job queued
                  value:
                    id: j1o2b3i4d5x6
                    status: queued
                    scenario: null
                    error: null
                    created_at: '2024-03-01T10:00:00Z'
                    started_at: null
                    completed_at: null
                    duration_seconds: null
                processing:
                  summary: Job processing
                  value:
                    id: j1o2b3i4d5x6
                    status: processing
                    scenario: null
                    error: null
                    created_at: '2024-03-01T10:00:00Z'
                    started_at: '2024-03-01T10:00:05Z'
                    completed_at: null
                    duration_seconds: null
                completed:
                  summary: Job completed
                  value:
                    id: j1o2b3i4d5x6
                    status: completed
                    scenario:
                      id: s1c2e3n4a5r6
                      name: Discovery Call with IT Director
                      url: >-
                        https://acme-corp.app.exec.com/scenarios/discovery-call-it-director
                    error: null
                    created_at: '2024-03-01T10:00:00Z'
                    started_at: '2024-03-01T10:00:05Z'
                    completed_at: '2024-03-01T10:00:45Z'
                    duration_seconds: 40
                failed:
                  summary: Job failed
                  value:
                    id: j1o2b3i4d5x6
                    status: failed
                    scenario: null
                    error:
                      code: GENERATION_ERROR
                      message: Unable to generate scenario from the provided prompt
                    created_at: '2024-03-01T10:00:00Z'
                    started_at: '2024-03-01T10:00:05Z'
                    completed_at: '2024-03-01T10:00:30Z'
                    duration_seconds: 25
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    ScenarioJob:
      type: object
      properties:
        id:
          type: string
          description: Job identifier
        status:
          type: string
          enum:
            - queued
            - processing
            - completed
            - failed
            - cancelled
          description: Current job status
        scenario:
          type: object
          nullable: true
          description: Created scenario details (only present when status is "completed")
          properties:
            id:
              type: string
              description: Scenario ID
            name:
              type: string
              description: Scenario name
            url:
              type: string
              format: uri
              description: Direct link to the scenario
        error:
          type: object
          nullable: true
          description: Error details (only present when status is "failed")
          properties:
            code:
              type: string
              description: Error code (e.g. GENERATION_ERROR, CONTENT_POLICY_VIOLATION)
            message:
              type: string
              description: Human-readable error message
        created_at:
          type: string
          format: date-time
          description: When the job was created
        started_at:
          type: string
          format: date-time
          nullable: true
          description: When the job started processing
        completed_at:
          type: string
          format: date-time
          nullable: true
          description: When the job finished (success, failure, or cancelled)
        duration_seconds:
          type: number
          nullable: true
          description: Processing duration in seconds (only present when job has completed)
    ValidationErrorDetail:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: Error category (e.g., "invalid_request")
            code:
              type: string
              description: Specific error code (e.g., "user_not_found")
            message:
              type: string
              description: Human-readable error message
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorDetail'
          example:
            error:
              type: authentication_error
              code: invalid_api_key
              message: Invalid or inactive API key
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorDetail'
          example:
            error:
              type: not_found
              message: 'Scenario not found: abc123'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |
        API key created in Settings > API.

        Format: `exec_live_` followed by 40 alphanumeric characters.

````