openapi: 3.1.0
info:
  title: Agentic Management
  description: Agentic Management for a next-gen Zap workflow — turn management on
    or off, read and update its modes and approval policy, list the runs it has taken,
    and record the owner-declared intent a version exists to serve.
  version: 1.0.0
  contact:
    url: https://docs.zapier.com
servers:
  - url: https://api.zapier.com
    description: Production
tags:
  - name: Automations
    description: Background automation lifecycle and run management
  - name: Harness
    description: 'The agent harness platform surface: chats, turns, tool-call resolution,
      events, files, and model discovery. The operations that carry this tag form
      the slice the Zapier agent harness client is generated from.'
security:
  - OAuth: []
paths:
  /agentic-management/v0/:
    post:
      operationId: createAgenticManagementConfig
      x-sdk-method: agma.enable
      summary: Enable Agentic Management for a workflow
      description: Turns on Agentic Management for one workflow. Agentic Management
        watches the workflow, diagnoses its failures, and proposes or applies fixes.
        The caller must be the workflow's creator. A workflow that was enabled before
        keeps its saved modes and its auto-approve choice unless you send new values.
      tags:
        - Automations
        - Harness
      x-zapier-rate-limit:
        timeWindow: 1 minute
        threshold:
          user: 20
      requestBody:
        required: true
        content:
          application/json:
            examples:
              default_modes:
                summary: Enable with the default heal and harden modes
                value:
                  workflow_id: 3f2b9c14-8a5e-4d17-9b02-6c1e7f4a8d33
              heal_and_expand_with_approval:
                summary: Enable two modes and require approval for each fix
                value:
                  workflow_id: 3f2b9c14-8a5e-4d17-9b02-6c1e7f4a8d33
                  modes:
                    - heal
                    - expand
                  auto_approve: false
            schema:
              type: object
              required:
                - workflow_id
              properties:
                workflow_id:
                  type: string
                  format: uuid
                  description: Workflow ID to enable.
                modes:
                  type: array
                  minItems: 1
                  uniqueItems: true
                  items:
                    type: string
                    enum:
                      - heal
                      - expand
                      - harden
                  description: Agentic modes to activate. When omitted, preserves
                    saved modes or defaults to `heal` and `harden` if no modes are
                    saved. `expand` is opt-in.
                auto_approve:
                  type: boolean
                  description: Whether Agentic Management applies its fixes without
                    asking the owner to approve each one. Omit to use the default.
                    The default is on for a workflow enabled for the first time, and
                    the prior choice for a workflow that is re-enabled. When false,
                    the owner approves each fix before it commits. A 200 response
                    means this setting is in force. If the setting cannot be applied,
                    the request returns 503 and leaves the workflow unchanged, so
                    retry the same request.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - manager_id
                properties:
                  manager_id:
                    type: string
                    format: uuid
                    description: ID of the manager automation provisioned for this
                      workflow.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '403':
          description: Forbidden. The caller is not the workflow's creator, Agentic
            Management is switched off for the account, or the caller is not an active
            member of the account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '429':
          description: Too Many Requests. The request exceeded the per-user enable
            rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '503':
          description: Service Unavailable, from one of two causes. Agentic Management
            could not confirm that this account is eligible. That is checked first,
            so nothing was provisioned. Or the `auto_approve` setting could not be
            applied. Either way the workflow is unchanged and no manager was created
            or resumed, so the same request is safe to retry. A `403` is different.
            It is a definite answer that this account cannot use Agentic Management.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
  /agentic-management/v0/{workflow_id}:
    delete:
      operationId: deleteAgenticManagementConfig
      x-sdk-method: agma.disable
      summary: Disable Agentic Management for a workflow
      description: Turns off Agentic Management for one workflow. The workflow keeps
        its saved modes and its auto-approve choice, so a later enable call restores
        them. The caller must be the workflow's creator.
      tags:
        - Automations
        - Harness
      x-zapier-rate-limit:
        timeWindow: 1 minute
        threshold:
          user: 60
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Workflow ID to disable.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                properties:
                  ok:
                    type: boolean
                    description: True when Agentic Management accepted the request.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '403':
          description: 'Forbidden. The caller is not the workflow''s creator, or Agentic
            Management is switched off for the account.

            An account that is no longer eligible for Agentic Management can still
            call this operation. Turning the feature off has to keep working for that
            account. Otherwise an owner is left with Agentic Management configured
            and no way to stop it. The GET and PATCH operations on this path do return
            403 in that case.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '429':
          description: Too Many Requests. The request exceeded the per-user rate limit
            for `/api/v0/agma/{workflow_id}`. This budget is shared with the GET and
            PATCH operations on the same path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '503':
          description: Service Unavailable. Agentic Management could not confirm that
            this account is eligible. Nothing was read or changed, so the same request
            is safe to retry. A `403` is different. It is a definite answer that this
            account cannot use Agentic Management.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
    get:
      operationId: getAgenticManagementConfig
      x-sdk-method: agma.getConfig
      summary: Get Agentic Management config for a workflow
      description: 'Returns the current Agentic Management state for one workflow:
        whether it is on, which modes are active, and whether fixes apply automatically.
        Modes are returned even when `enabled` is false, so you can show the owner
        their last choice when they turn Agentic Management back on. An empty `modes`
        array does not mean Agentic Management was never configured.'
      tags:
        - Automations
        - Harness
      x-zapier-rate-limit:
        timeWindow: 1 minute
        threshold:
          user: 60
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Workflow ID to query.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - workflow_id
                  - enabled
                  - modes
                  - auto_approve
                properties:
                  workflow_id:
                    type: string
                    format: uuid
                    description: The workflow this config describes.
                  enabled:
                    type: boolean
                    description: Whether Agentic Management is currently active for
                      this workflow.
                  auto_approve:
                    type: boolean
                    description: Whether Agentic Management applies its fixes without
                      asking the owner to approve each one. `false` when Agentic Management
                      is not set up for this workflow.
                  manager_id:
                    type: string
                    format: uuid
                    nullable: true
                    description: ID of the automation Agentic Management runs for
                      this workflow, or `null` when none exists yet. Use it to link
                      to that automation's run history.
                  modes:
                    type: array
                    items:
                      type: string
                      enum:
                        - heal
                        - expand
                        - harden
                    description: Active agentic modes. Returned even when `enabled`
                      is false.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '403':
          description: Forbidden. The caller is not the workflow's creator, Agentic
            Management is switched off for the account, or the caller is not an active
            member of the account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '429':
          description: Too Many Requests. The request exceeded the per-user rate limit
            for `/api/v0/agma/{workflow_id}`. This budget is shared with the PATCH
            and DELETE operations on the same path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '503':
          description: Service Unavailable. Agentic Management could not confirm that
            this account is eligible. Nothing was read or changed, so the same request
            is safe to retry. A `403` is different. It is a definite answer that this
            account cannot use Agentic Management.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
    patch:
      operationId: updateAgenticManagementConfig
      x-sdk-method: agma.updateConfig
      summary: Update Agentic Management config for a workflow
      description: 'Updates the active agentic modes, the auto-approve setting, or
        both, for a workflow. Send only the fields you want to change: `modes` replaces
        the current set atomically, and `auto_approve` can be flipped on its own without
        re-sending `modes`. At least one of the two must be present. To turn Agentic
        Management off, call `DELETE /api/v0/agma/{workflow_id}`. An empty `modes`
        array is rejected rather than treated as a clear-all.'
      tags:
        - Automations
        - Harness
      x-zapier-rate-limit:
        timeWindow: 1 minute
        threshold:
          user: 60
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Workflow ID to update.
      requestBody:
        required: true
        content:
          application/json:
            examples:
              replace_modes:
                summary: Replace the active mode set
                value:
                  modes:
                    - heal
                    - harden
              require_approval_only:
                summary: Require approval for each fix, leaving the active modes alone
                value:
                  auto_approve: false
              replace_modes_and_approval:
                summary: Replace the active mode set and set auto-approve together
                value:
                  modes:
                    - heal
                  auto_approve: false
            schema:
              type: object
              minProperties: 1
              additionalProperties: false
              properties:
                modes:
                  type: array
                  minItems: 1
                  uniqueItems: true
                  items:
                    type: string
                    enum:
                      - heal
                      - expand
                      - harden
                  description: Agentic modes to activate. Replaces the current set.
                    Omit to leave the active modes unchanged.
                auto_approve:
                  type: boolean
                  description: When true, Agentic Management applies its fixes without
                    asking the owner to approve each one. When false, the owner approves
                    each fix before it commits. Omit to leave the current setting
                    unchanged.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - workflow_id
                  - modes
                  - auto_approve
                properties:
                  workflow_id:
                    type: string
                    format: uuid
                    description: The workflow whose config was updated.
                  modes:
                    type: array
                    description: Active agentic modes after the update.
                    items:
                      type: string
                      enum:
                        - heal
                        - expand
                        - harden
                  auto_approve:
                    type: boolean
                    description: Auto-approve state after the update.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '403':
          description: Forbidden. The caller is not the workflow's creator, or Agentic
            Management is switched off for the account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '429':
          description: Too Many Requests. The request exceeded the per-user rate limit
            for `/api/v0/agma/{workflow_id}`. This budget is shared with the GET and
            DELETE operations on the same path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '503':
          description: Service Unavailable. Agentic Management could not confirm that
            this account is eligible. Nothing was read or changed, so the same request
            is safe to retry. A `403` is different. It is a definite answer that this
            account cannot use Agentic Management.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
  /agentic-management/v0/{workflow_id}/intent:
    get:
      operationId: getAgenticManagementIntent
      x-sdk-method: agma.getIntent
      summary: Get the declared intent for a workflow version
      description: 'Returns the natural-language intent that applies to one workflow
        version: what the owner said that version of the workflow is for. Intent belongs
        to the version it was recorded against, so a version with no intent of its
        own reads as `intent: null`. It never inherits the text of another version.
        A consumer can tell "never captured" apart from an error. Omit `workflow_version_id`
        to read the workflow''s current published version. A workflow with nothing
        published answers `200` with every field null rather than an error.'
      tags:
        - Automations
        - Harness
      x-zapier-rate-limit:
        timeWindow: 1 minute
        threshold:
          user: 60
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Workflow ID to query.
        - name: workflow_version_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: The workflow version to read the intent of. Intent belongs
            to one immutable version, not to the workflow as a whole. When omitted,
            the workflow's current published version is used, and the response reports
            which version answered. A version that belongs to a different workflow
            returns 404.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgenticManagementIntentResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '403':
          description: Forbidden. The caller cannot view the workflow (CSW `can_view`),
            or Agentic Management is switched off for the account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '404':
          description: Not Found. The requested `workflow_version_id` does not belong
            to this workflow. A workflow with nothing published is not an error on
            this operation. It answers `200` with null fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '429':
          description: Too Many Requests. The request exceeded the per-user rate limit
            for `/api/v0/agma/{workflow_id}/intent`. This budget is shared with the
            PUT operation on the same path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '503':
          description: Service Unavailable. Agentic Management could not confirm that
            this account is eligible. Nothing was read or changed, so the same request
            is safe to retry. A `403` is different. It is a definite answer that this
            account cannot use Agentic Management.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
    put:
      operationId: updateAgenticManagementIntent
      x-sdk-method: agma.updateIntent
      summary: Create or update the declared intent for a workflow version
      description: 'Upserts the natural-language intent for one workflow version.
        One row per version: a second call for the same version replaces the stored
        text, and a call for a different version records a separate intent. Agentic
        Management reads the intent of the version a failure happened on. It uses
        that text to judge whether a proposed change still serves what the workflow
        is for. Omit `workflow_version_id` to write against the workflow''s current
        published version.'
      tags:
        - Automations
        - Harness
      x-zapier-rate-limit:
        timeWindow: 1 minute
        threshold:
          user: 60
      parameters:
        - name: workflow_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Workflow ID to write intent for.
        - name: workflow_version_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: 'The workflow version the intent describes. Intent belongs
            to one immutable version, not to the workflow as a whole. When omitted,
            the workflow''s current published version is used, and the response reports
            which version was written. A version that belongs to a different workflow
            returns 404, as does a workflow with nothing published: there is no version
            to attach the text to.'
      requestBody:
        required: true
        content:
          application/json:
            examples:
              declare_intent:
                summary: Record what this workflow version is for
                value:
                  intent: When Stripe reports a new charge, add one row to the finance
                    sheet with the amount, the customer email, and the charge date.
                    Never write a row twice for the same charge.
            schema:
              type: object
              required:
                - intent
              properties:
                intent:
                  type: string
                  minLength: 1
                  maxLength: 8000
                  description: 'What this version of the workflow is for, in the owner''s
                    own terms: the outcome it exists to produce, the trigger it responds
                    to, and any constraint that must hold. Plain prose, not code.'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgenticManagementIntentResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '403':
          description: Forbidden. The caller cannot edit the workflow (CSW `can_edit`),
            or Agentic Management is switched off for the account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '404':
          description: Not Found. The workflow has no published version to attach
            intent to, or the requested version does not belong to it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '429':
          description: Too Many Requests. The request exceeded the per-user rate limit
            for `/api/v0/agma/{workflow_id}/intent`. This budget is shared with the
            GET operation on the same path.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
        '503':
          description: Service Unavailable. Agentic Management could not confirm that
            this account is eligible. Nothing was read or changed, so the same request
            is safe to retry. A `403` is different. It is a definite answer that this
            account cannot use Agentic Management.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorsResponse'
components:
  schemas:
    ErrorCode:
      type: string
      enum:
        - bad-request
        - unauthorized
        - forbidden
        - not-found
        - conflict
        - payload-too-large
        - unprocessable-entity
        - unexpected-error
        - unsupported-extension
        - not-executable-shape
        - describe-failed
        - bundling-failed
        - sandbox-runtime-error
        - component-not-executable
        - execution-permission-denied
        - cap-exceeded
        - failed-dependency
        - stale-version
        - gone
        - service-unavailable
        - queue-full
        - invitation-org-managed
        - event-stream-capacity
        - chat-too-large
        - chat-awaiting-approval
        - approval-attempt-mismatch
        - approval-generation-stale
        - approval-attempt-conflict
        - method-not-allowed
        - mention-not-member
        - mention-no-access
        - mention-limit-exceeded
      description: 'An application-specific error code, expressed as a string value.


        Error codes:

        - `bad-request`: Malformed request

        - `unauthorized`: Authentication required

        - `forbidden`: Permission denied

        - `not-found`: Resource not found

        - `conflict`: Resource conflict

        - `payload-too-large`: Request payload exceeds the allowed size

        - `unprocessable-entity`: Validation failed

        - `unexpected-error`: Internal server error

        - `unsupported-extension`: File extension not supported for execution

        - `not-executable-shape`: File structure not compatible with execution

        - `describe-failed`: Tool describe() method failed

        - `bundling-failed`: Code bundling failed

        - `sandbox-runtime-error`: Runtime execution error

        - `component-not-executable`: Component file requires render, not execute

        - `execution-permission-denied`: User lacks execute permission

        - `cap-exceeded`: Per-user usage cap exceeded; details in `meta`

        - `failed-dependency`: Required upstream prerequisite is unavailable

        - `stale-version`: Write rejected because the resource''s head version no
        longer matches the caller''s `expected_version`; details in `meta`

        - `gone`: Resource permanently removed or no longer accepting events

        - `service-unavailable`: A required backing service is unavailable or not
        configured

        - `queue-full`: The chat''s queued-message backlog is at its per-chat depth
        cap; wait for the active turn to finish (which drains the queue), then retry

        - `invitation-org-managed`: The account is an org-managed workspace; invitations
        must go through the Zapier organization admin center

        - `event-stream-capacity`: Too many concurrent event streams for this user;
        close one or retry shortly. Not a usage cap

        - `chat-too-large`: The chat holds too many events for the requested operation
        to copy. Retrying cannot succeed

        - `chat-awaiting-approval`: The named message waits on a tool approval, so
        a copy of it cannot carry the tool''s outcome. Answer the approval in the
        source chat first

        - `approval-attempt-mismatch`: The idempotency key was already accepted with
        a different decision or request body

        - `approval-generation-stale`: The request refers to a permission generation
        that is no longer current

        - `approval-attempt-conflict`: Another idempotency key already claimed this
        permission generation

        - `method-not-allowed`: The endpoint does not support this HTTP method

        - `mention-not-member`: A comment mentions a user who is not an active member
        of the item''s account

        - `mention-no-access`: A comment mentions a user who cannot open the item.
        An owner of the item can share it with that user first

        - `mention-limit-exceeded`: A comment mentions more users than the per-comment
        cap allows

        '
    ErrorSource:
      description: 'Identifies the source of the error within the request payload,
        if relevant.

        '
      oneOf:
        - type: 'null'
        - type: object
          properties:
            pointer:
              type: string
              description: 'A JSON Pointer [RFC6901](https://tools.ietf.org/html/rfc6901)
                to the associated entity in the request document

                [e.g. `/data` for a primary data object, or `/data/attributes/title`
                for a specific attribute].

                '
            parameter:
              type: string
              description: 'A string indicating which URI query parameter caused the
                error.

                '
            header:
              type: string
              description: 'A string indicating the header that caused the error.

                '
          additionalProperties: false
    CapExceededMeta:
      type: object
      description: 'Structured metadata returned in the 429 `cap-exceeded` error response.

        Identifies which usage cap was hit, current usage, the cap''s nominal

        value (soft cap, not hard cap × grace), and when the bucket resets.

        '
      required:
        - cap
        - used
        - cap_value
        - reset_at
      properties:
        cap:
          type: string
          enum:
            - messages_per_day
            - tool_calls_per_day
            - cost_per_day
            - cost_per_month
            - cost_burst
            - automation_runs_per_hour
          description: 'Which cap was hit. Closed enum so clients can dispatch on
            this

            without a translation table.

            '
        used:
          type: number
          description: 'Counter or USD value at the moment of rejection. Integer for

            count caps, USD float for cost caps.

            '
        cap_value:
          type: number
          description: 'Soft cap value (the cap before the 10% grace buffer). For
            cost

            caps, in USD.

            '
        reset_at:
          type: string
          format: date-time
          description: 'When the bucket clears. Daily caps reset at the next UTC midnight,

            monthly at the first of the next UTC month, burst at the next

            5-minute window boundary.

            '
      additionalProperties: false
    StaleVersionMeta:
      type: object
      description: 'Structured metadata returned in the 409 `stale-version` error
        response.

        Lets clients reconcile their cached view of a file against the server''s

        current head version without re-fetching the full content first.

        '
      required:
        - current_version
        - expected_version
      properties:
        current_version:
          type: integer
          description: 'The resource''s head version at the moment the write was rejected.

            Clients can re-read the resource at this version (or higher) to

            reconcile, then retry the write with an updated `expected_version`.

            '
        expected_version:
          type: integer
          description: 'The `expected_version` value the client supplied, echoed back
            so

            clients can detect duplicate or out-of-order failure handling.

            '
      additionalProperties: false
    QueueFullMeta:
      type: object
      description: 'Structured metadata returned in the 429 `queue-full` error response.
        Reports

        the chat''s queued-message backlog at the moment of rejection and the per-chat

        depth cap it hit. Unlike `CapExceededMeta`, there is no `reset_at`: the limit

        is structural, not time-based — the backlog drains when the active turn

        finishes, so a retry is gated on chat state, not a clock.

        '
      required:
        - queue_depth
        - limit
      properties:
        queue_depth:
          type: number
          description: 'Number of `queued` messages the chat held at the moment of
            rejection.

            '
        limit:
          type: number
          description: 'The per-chat queued-message depth cap that was hit.

            '
      additionalProperties: false
    ErrorObject:
      type: object
      properties:
        id:
          description: A unique identifier for a specific instance of an error
          oneOf:
            - type: 'null'
            - type: string
              format: uuid
              description: 'A unique identifier for this particular occurrence of
                the problem.

                '
        links:
          description: Relevant links about the error
          oneOf:
            - type: 'null'
            - type: object
              properties:
                about:
                  type: string
                  format: uri
                  description: 'A link that leads to further details about this particular
                    occurrence of the problem.

                    '
              additionalProperties: false
        status:
          type: string
          description: 'The HTTP status code applicable to this problem, expressed
            as a string value.

            '
        code:
          $ref: '#/components/schemas/ErrorCode'
        title:
          type: string
          description: 'A short, human-readable summary of the problem that SHOULD
            NOT change from occurrence to occurrence of the problem, except for purposes
            of localization.

            '
        detail:
          type: string
          description: 'A human-readable explanation specific to this occurrence of
            the problem. Like `title`, this field''s value can be localized.

            '
        source:
          $ref: '#/components/schemas/ErrorSource'
        meta:
          description: 'Optional structured metadata specific to the error code. For

            `cap-exceeded` this matches the `CapExceededMeta` schema; for

            `stale-version` it matches the `StaleVersionMeta` schema; for

            `queue-full` it matches the `QueueFullMeta` schema.

            '
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/CapExceededMeta'
            - $ref: '#/components/schemas/StaleVersionMeta'
            - $ref: '#/components/schemas/QueueFullMeta'
            - type: object
              additionalProperties: true
      additionalProperties: false
      required: []
      description: 'An error object provides additional information about problems
        encountered while performing an operation.

        Error objects MUST be returned as an array keyed by `errors` in the top level
        of a JSON:API document.

        '
    ErrorsResponse:
      type: object
      properties:
        errors:
          description: A collection of the errors returned.
          type: array
          items:
            $ref: '#/components/schemas/ErrorObject'
      required:
        - errors
      description: 'A JSON:API error response document containing an array of error
        objects.

        '
    AgenticManagementIntentResponse:
      type: object
      required:
        - workflow_id
        - workflow_version_id
        - intent
      properties:
        workflow_id:
          type: string
          format: uuid
          description: The workflow the intent belongs to.
        workflow_version_id:
          type: string
          format: uuid
          nullable: true
          description: The workflow version this read or write targeted, so a caller
            that omitted the parameter learns which version answered. `null` only
            on a read of a workflow that has nothing published yet.
        intent:
          type: string
          nullable: true
          description: 'The intent recorded against this version, or `null` when this
            version has none. Intent is never carried over from another version: text
            recorded against one version never answers a read of another.'
        updated_at:
          type: string
          format: date-time
          nullable: true
          description: When the intent was last written; `null` when never captured.
  securitySchemes:
    OAuth:
      type: oauth2
      description: OAuth 2.0 authentication.
      flows:
        authorizationCode:
          authorizationUrl: https://zapier.com/oauth/authorize
          tokenUrl: https://zapier.com/oauth/token
          scopes: {}
        clientCredentials:
          tokenUrl: https://zapier.com/oauth/token
          scopes: {}
