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

# Trigger a job execution

> Triggers an execution of an agent job. The execution runs asynchronously in the background.



## OpenAPI

````yaml https://interact.turntwo.com/api/openapi.json post /api/agents/jobs/{job_id}/trigger
openapi: 3.0.0
info:
  title: Turntwo Interact API
  description: API for managing agent jobs, chats, and triggering job executions
  version: 1.0.0
servers:
  - url: https://interact.turntwo.com
    description: Production server
security: []
tags:
  - name: Jobs
    description: Agent job management endpoints
  - name: Chats
    description: Agent chat endpoints
paths:
  /api/agents/jobs/{job_id}/trigger:
    post:
      tags:
        - Jobs
      summary: Trigger a job execution
      description: >-
        Triggers an execution of an agent job. The execution runs asynchronously
        in the background.
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
          description: Job ID to trigger
      responses:
        '200':
          description: Job triggered successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerResponse'
        '400':
          description: Bad request - Job is not active or missing parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden - Missing required permission or access denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found - Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict - Job is currently running
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
          OrganizationId: []
components:
  schemas:
    TriggerResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the trigger was successful
        chat:
          type: object
          properties:
            id:
              type: string
              description: Chat ID created for this execution
          required:
            - id
        job:
          type: object
          properties:
            id:
              type: string
              description: Job ID that was triggered
          required:
            - id
      required:
        - success
        - chat
        - job
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication
    OrganizationId:
      type: apiKey
      in: header
      name: X-Organization-Id
      description: Organization ID associated with the API key

````