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

# Act with Darwin

> Start work from an exact Search result, check its status, respond with more information, decide an exact reviewed approval, or stop the current Turn. Requires agent:write.



## OpenAPI

````yaml /openapi-v2.json post /act
openapi: 3.1.0
info:
  title: Darwin API
  version: 2.0.0
  description: >-
    Darwin has two public operations: Search for an executable capability, then
    Act to move it toward an outcome. Granular domain routes remain
    compatibility APIs and are not part of this primary contract.
servers:
  - url: https://api.darwin.so/api/v2
    description: Production — use live `darwin_…` keys.
  - url: https://api.dev.darwin.so/api/v2
    description: Sandbox — use isolated `darwin_test_…` keys.
security:
  - DeveloperBearer: []
paths:
  /act:
    post:
      summary: Act with Darwin
      description: >-
        Start work from an exact Search result, check its status, respond with
        more information, decide an exact reviewed approval, or stop the current
        Turn. Requires agent:write.
      operationId: act
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/ActStartRequest'
                - $ref: '#/components/schemas/ActStatusRequest'
                - $ref: '#/components/schemas/ActRespondRequest'
                - $ref: '#/components/schemas/ActApproveRequest'
                - $ref: '#/components/schemas/ActStopRequest'
              discriminator:
                propertyName: type
      responses:
        '200':
          description: The current truthful state of the requested work.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActResponse'
        '400':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: The request failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ActStartRequest:
      type: object
      additionalProperties: false
      required:
        - type
        - capabilityId
        - capabilityRevision
        - requestId
      properties:
        type:
          type: string
          const: start
        capabilityId:
          type: string
          minLength: 1
          maxLength: 200
        capabilityRevision:
          type: integer
          minimum: 1
        inputs:
          type: object
          additionalProperties: true
          default: {}
        intent:
          type: string
          minLength: 1
          maxLength: 20000
        actingAiId:
          type: string
          minLength: 1
          maxLength: 200
        targetAiId:
          type: string
          minLength: 1
          maxLength: 200
        requestId:
          type: string
          minLength: 1
          maxLength: 160
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9._:-]*$
    ActStatusRequest:
      type: object
      additionalProperties: false
      required:
        - type
        - goalId
      properties:
        type:
          type: string
          const: status
        goalId:
          type: string
          minLength: 1
          maxLength: 200
    ActRespondRequest:
      type: object
      additionalProperties: false
      required:
        - type
        - goalId
        - message
        - requestId
      properties:
        type:
          type: string
          const: respond
        goalId:
          type: string
          minLength: 1
          maxLength: 200
        message:
          type: string
          minLength: 1
          maxLength: 20000
        requestId:
          type: string
          minLength: 1
          maxLength: 160
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9._:-]*$
    ActApproveRequest:
      type: object
      additionalProperties: false
      required:
        - type
        - goalId
        - approvalId
        - decision
        - expectedRevision
        - reviewedPayloadDigest
        - requestId
      properties:
        type:
          type: string
          const: approve
        goalId:
          type: string
          minLength: 1
          maxLength: 200
        approvalId:
          type: string
          minLength: 1
          maxLength: 200
        decision:
          type: string
          enum:
            - approve
            - reject
            - request_changes
        expectedRevision:
          type: string
          format: date-time
        reviewedPayloadDigest:
          type: string
          pattern: ^sha256:[a-f0-9]{64}$
        reason:
          type: string
          minLength: 1
          maxLength: 2000
        requestId:
          type: string
          minLength: 1
          maxLength: 160
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9._:-]*$
    ActStopRequest:
      type: object
      additionalProperties: false
      required:
        - type
        - goalId
        - requestId
      properties:
        type:
          type: string
          const: stop
        goalId:
          type: string
          minLength: 1
          maxLength: 200
        requestId:
          type: string
          minLength: 1
          maxLength: 160
          pattern: ^[a-zA-Z0-9][a-zA-Z0-9._:-]*$
    ActResponse:
      type: object
      additionalProperties: false
      required:
        - type
        - goalId
        - status
        - result
        - actionRequired
        - availableActions
      properties:
        type:
          type: string
          enum:
            - start
            - status
            - respond
            - approve
            - stop
        goalId:
          type: string
        status:
          type: string
          enum:
            - completed
            - running
            - awaiting_user
            - approval_required
            - connection_required
            - payment_required
            - insufficient_authority
            - provider_unavailable
            - stopped
        result:
          type: object
          additionalProperties: true
        actionRequired:
          type:
            - string
            - 'null'
        availableActions:
          type: array
          items:
            type: string
        interaction:
          oneOf:
            - $ref: '#/components/schemas/ConnectionInteraction'
            - $ref: '#/components/schemas/PaymentInteraction'
          discriminator:
            propertyName: kind
        webLink:
          type: string
          format: uri
    Error:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        message:
          type: string
        fields:
          type: array
          items:
            type: object
            additionalProperties: true
    ConnectionInteraction:
      type: object
      additionalProperties: false
      required:
        - id
        - kind
        - state
        - displayName
        - hostname
        - expiresAt
        - retentionChoices
        - scopeDescriptions
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 200
        kind:
          type: string
          const: connection
        state:
          type: string
          enum:
            - required
            - pending
            - complete
            - declined
            - expired
            - failed
        displayName:
          type: string
          minLength: 1
          maxLength: 200
        hostname:
          type: string
          minLength: 1
          maxLength: 253
        expiresAt:
          type: string
          format: date-time
        retentionChoices:
          type: array
          maxItems: 2
          items:
            type: string
            enum:
              - temporary
              - saved
        scopeDescriptions:
          type: array
          maxItems: 12
          items:
            type: string
    PaymentInteraction:
      type: object
      additionalProperties: false
      required:
        - id
        - kind
        - state
        - displayName
        - hostname
        - expiresAt
        - payment
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 200
        kind:
          type: string
          const: payment
        state:
          type: string
          enum:
            - required
            - pending
            - complete
            - declined
            - expired
            - failed
        displayName:
          type: string
          minLength: 1
          maxLength: 200
        hostname:
          type: string
          minLength: 1
          maxLength: 253
        expiresAt:
          type: string
          format: date-time
        payment:
          type: object
          additionalProperties: false
          required:
            - amountMinor
            - currency
            - items
            - feesMinor
            - protocol
            - checkoutRevision
            - checkoutDigest
          properties:
            amountMinor:
              type: integer
              minimum: 0
            currency:
              type: string
              pattern: ^[A-Z]{3}$
            items:
              type: array
              maxItems: 100
              items:
                type: object
                additionalProperties: false
                required:
                  - id
                  - label
                  - quantity
                  - amountMinor
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 200
                  label:
                    type: string
                    minLength: 1
                    maxLength: 240
                  quantity:
                    type: integer
                    minimum: 1
                  amountMinor:
                    type: integer
                    minimum: 0
            feesMinor:
              type: integer
              minimum: 0
            protocol:
              type: string
              enum:
                - DARWIN_WALLET
                - HOSTED_CHECKOUT
                - UCP_SPT
                - ACP_SPT
                - MPP_SPT
                - X402
            checkoutRevision:
              type: string
              minLength: 1
              maxLength: 200
            checkoutDigest:
              type: string
              pattern: ^sha256:[a-f0-9]{64}$
  securitySchemes:
    DeveloperBearer:
      type: http
      scheme: bearer
      bearerFormat: Darwin API key or OAuth access token

````