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

# Enqueue Job

> Enqueue a job against an ACE. Today: `regenerate` (playbook [re-]generation from the linked workforce's agent code file; the current playbook stays usable until the job commits a new one). The kind vocabulary grows server-side — future kinds include usage-driven adaptation.



## OpenAPI

````yaml POST /ace/{ace_uid}/jobs
openapi: 3.1.0
info:
  title: Timbal Platform API
  description: Public API documentation for the Timbal platform
  license:
    name: ''
  version: 2.0.0
servers:
  - url: https://api.timbal.ai
    description: Production
  - url: https://api.dev.timbal.ai
    description: Development
security: []
tags:
  - name: ace
    description: Action Control Engine (ACE) operations
  - name: analytics
    description: Org and project analytics
  - name: billing
    description: Subscriptions, usage, and payment-related operations
  - name: content
    description: Re-sign stored content URLs
  - name: files
    description: File operations
  - name: iam
    description: IAM — actions, roles, users, and authorization introspection
  - name: k2
    description: Knowledge Bases v2 operations
  - name: orgs
    description: Organization operations
  - name: projects
    description: Project operations
  - name: runs
    description: Execution operations
  - name: templates
    description: Public project template catalog
  - name: users
    description: Authenticated user profile
paths:
  /ace/{ace_uid}/jobs:
    post:
      tags:
        - ace
      description: >-
        Enqueue a job against an ACE. Today: `regenerate` (playbook
        [re-]generation from the linked workforce's agent code file; the current
        playbook stays usable until the job commits a new one). The kind
        vocabulary grows server-side — future kinds include usage-driven
        adaptation.
      operationId: enqueue
      parameters:
        - name: ace_uid
          in: path
          description: ACE uid (UUID).
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnqueueAceJobReqBody'
        required: true
      responses:
        '202':
          description: Job enqueued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnqueueJobResBody'
        '400':
          description: Bad request (e.g. unknown or non-enqueuable kind, unknown branch)
        '403':
          description: Forbidden
        '404':
          description: ACE not found, or no workforce linked
        '409':
          description: >-
            ACE already has a queued or running job, or multiple linked
            workforces and no app_id
      security:
        - bearer_auth: []
components:
  schemas:
    EnqueueAceJobReqBody:
      type: object
      description: |-
        Request body for `POST /ace/{ace_uid}/jobs`. `kind` selects the work;
        the vocabulary lives in [`AceJobKind`] and grows server-side without
        new endpoints (usage-window adaptation, policy scaffolding, ...).
      properties:
        app_id:
          type:
            - integer
            - 'null'
          format: int64
          description: |-
            Disambiguates which linked workforce (`OrgsApps.id`) supplies the
            agent source when the ACE is attached to more than one. Optional
            when exactly one workforce is linked.
        kind:
          type:
            - string
            - 'null'
          description: |-
            Job kind. Defaults to `"regenerate"` (playbook [re-]generation
            from the linked workforce's agent code file).
        rev:
          type:
            - string
            - 'null'
          description: |-
            Git branch to read the agent source from. Defaults to the
            project repository's HEAD branch.
    EnqueueJobResBody:
      type: object
      description: |-
        Response body returned by any endpoint that enqueues a new job. The
        HTTP status is `202 Accepted` — poll `GET /ace/{ace_uid}/jobs/{job_uid}`
        for terminal state.
      required:
        - ace_uid
        - job_uid
        - kind
      properties:
        ace_uid:
          type: string
          format: uuid
        job_uid:
          type: string
          format: uuid
        kind:
          type: string
          description: Job kind (e.g. `"generate_initial"`, `"regenerate"`).
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: >-
        Timbal API key. Obtain your API key from the Timbal platform settings.
        See [Authentication](/api-reference/authentication) for more
        information.

````