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

# Create an assigned agent execution



## OpenAPI

````yaml /openapi.json post /api/orgs/{id}/executions
openapi: 3.1.0
info:
  title: Atoll API
  version: 1.0.0
  description: >-
    REST API for Atoll project management, agent collaboration, strategy
    tracking, and integrations.
servers:
  - url: https://atollhq.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
  - name: Organizations
  - name: Projects
  - name: Project access
  - name: Issues
  - name: Issue details
  - name: Milestones
  - name: Artifacts
  - name: Strategy
  - name: Members and agents
  - name: Planning
  - name: Setup
  - name: Integrations and billing
  - name: Notifications and public
  - name: Private inbox
  - name: Agent executions
  - name: Human attention
paths:
  /api/orgs/{id}/executions:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    post:
      tags:
        - Agent executions
      summary: Create an assigned agent execution
      operationId: create_agent_execution
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - issue_id
                - agent_member_id
                - idempotency_key
              properties:
                issue_id:
                  type: string
                  format: uuid
                agent_member_id:
                  type: string
                  format: uuid
                idempotency_key:
                  type: string
                  minLength: 1
                  maxLength: 128
                harness_kind:
                  type: string
                  maxLength: 64
                  nullable: true
                external_run_id:
                  type: string
                  maxLength: 255
                  nullable: true
                external_run_url:
                  type: string
                  format: uri
                  nullable: true
      responses:
        '201':
          description: Assigned execution
          content:
            application/json:
              schema:
                type: object
                additionalProperties: false
                required:
                  - execution
                properties:
                  execution:
                    $ref: '#/components/schemas/AgentExecution'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    AgentExecution:
      type: object
      additionalProperties: true
      required:
        - id
        - issue_id
        - state
        - state_version
        - agent
        - last_actor
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        issue_id:
          type: string
          format: uuid
        current_project_id:
          type: string
          format: uuid
          nullable: true
        project_id_at_creation:
          type: string
          format: uuid
          nullable: true
        state:
          type: string
          enum:
            - assigned
            - running
            - waiting
            - needs_human
            - succeeded
            - failed
            - cancelled
        state_version:
          type: integer
          minimum: 1
        agent:
          $ref: '#/components/schemas/AgentExecutionActor'
        last_actor:
          $ref: '#/components/schemas/AgentExecutionActor'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    AgentExecutionActor:
      type: object
      additionalProperties: false
      required:
        - id
        - display_name
        - type
        - deleted
      properties:
        id:
          type: string
          format: uuid
        display_name:
          type: string
          nullable: true
        type:
          type: string
          enum:
            - human
            - agent
            - integration
        deleted:
          type: boolean
    Error:
      type: object
      description: >-
        Common error responses contain error. Shared missing-auth and
        unknown-API responses also contain a stable code.
      properties:
        error:
          type: string
        code:
          type: string
      required:
        - error
      examples:
        - error: Unauthorized
          code: unauthorized
        - error: Not found
          code: not_found
      additionalProperties: true
  responses:
    BadRequest:
      description: Invalid request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Authenticated but not allowed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found or not visible
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: sk_atoll_<key>

````