> ## 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.

# Get action

> Get the current state and required next step for an action.

<Card title="Get your Darwin API key here" icon="key" horizontal href="https://darwin.so/settings?tab=developer">
  Create a key in Developer settings.
</Card>


## OpenAPI

````yaml openapi-v2.json GET /actions/{actionId}
openapi: 3.1.0
info:
  title: Darwin API
  version: 2.0.0
  description: >-
    Search for executable capabilities, then manage durable work through six
    explicit Action operations.
servers:
  - url: https://api.darwin.so/api/v2
security:
  - DeveloperBearer: []
paths:
  /actions/{actionId}:
    get:
      summary: Get action
      description: >-
        Get the truthful current status and required next step for one action.
        Requires agent:write.
      operationId: get_action
      parameters:
        - name: actionId
          in: path
          required: true
          description: The Action identifier returned by Start action or List actions.
          schema:
            type: string
            minLength: 1
            maxLength: 200
      responses:
        '200':
          description: The current truthful state of the action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActGetActionResponse'
                example:
                  type: status
                  actionId: action_01J9Y8M4Z7B9R6K2X3C5V1N0PQ
                  status: running
                  result: {}
                  actionRequired: null
                  availableActions:
                    - status
                    - update
                    - stop
              example:
                type: status
                actionId: action_01J9Y8M4Z7B9R6K2X3C5V1N0PQ
                status: running
                result: {}
                actionRequired: null
                availableActions:
                  - status
                  - update
                  - stop
        '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:
    ActGetActionResponse:
      title: Action status
      allOf:
        - $ref: '#/components/schemas/ActActionResponse'
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              const: status
    Error:
      type: object
      additionalProperties: true
      properties:
        error:
          type: string
        message:
          type: string
        fields:
          type: array
          items:
            type: object
            additionalProperties: true
    ActActionResponse:
      title: Action
      type: object
      additionalProperties: false
      required:
        - type
        - actionId
        - status
        - result
        - actionRequired
        - availableActions
      properties:
        type:
          type: string
          enum:
            - start
            - status
            - update
            - approve
            - stop
        actionId:
          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
            enum:
              - status
              - update
              - approve
              - stop
        interaction:
          oneOf:
            - $ref: '#/components/schemas/ConnectionInteraction'
              title: Connection
            - $ref: '#/components/schemas/PaymentInteraction'
              title: Payment
          discriminator:
            propertyName: kind
        webLink:
          type: string
          format: uri
    ConnectionInteraction:
      title: Connection
      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:
      title: Payment
      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

````