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

# Continue a conversation

> Send a conversation its next message, or answer what its latest turn is
waiting for. Send exactly one of `message` and `input_responses`.

<Note>
Billed as Specter Agent usage: the credits the turn cost, charged when the turn completes. A failed or cancelled turn is free.
</Note>

- `message` starts a new turn, and the agent sees everything said before. A
  conversation takes one turn at a time: a message sent while the latest turn
  is working is a `409 TURN_IN_PROGRESS`. A message sent while the conversation
  is `input_required` starts a new turn and leaves the pending requests
  unanswered; the earlier turn then reads `completed`.
- `input_responses` answers the latest turn's `input_requests`, and **the same
  turn continues**: it keeps its `id`, and its `credits_used` adds up what the
  work before and after the answers cost.

The call returns as [Start a conversation](/api-reference/agent/start-a-conversation)
does: at once by default, or after up to `wait_seconds`, with `202` while the
conversation is working and `200` otherwise.

## Answering the agent

A turn whose `status` is `input_required` stopped for you. Read
`turn.input_requests`: each entry is a write the agent held (an `approval`) or a
question it asked. Answer every one in a single call, in `input_responses` keyed
by the request's `id`.

The requests and answers follow [MCP
elicitation](https://modelcontextprotocol.io/specification/2025-11-25/client/elicitation),
in snake_case. They are shaped after it rather than byte-for-byte the same.
Each request has an `id`, a `type`, a `message` and a `requested_schema`; an
`approval` also has a `tool_call` naming the held write. Each answer has an
`action` and, to accept a question, `content`, which must match the request's
`requested_schema`.

| Request | `accept` | `decline` | `cancel` |
| --- | --- | --- | --- |
| `approval` | The write is performed. | The write is not performed, and the agent is told it was declined. | The write is not performed, and the agent is told it was cancelled. |
| `question` | `content.reply` is your answer. | The agent is told you will not answer. | The agent is told you dismissed the question. |

Declining or cancelling a write costs no tool credits.

A question can also be answered with a plain `message`. That starts a new turn
instead of continuing this one, and the earlier turn reads `completed`.

## Rules

- Answer every request together. A call that leaves one out, or accepts a
  question with no `content.reply`, is a `422 INPUT_RESPONSES_INCOMPLETE`. An
  `id` the turn does not wait on is a `422 UNKNOWN_INPUT_REQUEST`.
- Only the latest turn can be answered, and only while its `status` is
  `input_required`. Otherwise it is a `409 NOT_AWAITING_INPUT`.
- When a turn holds writes, only those are listed. A question it asked in the
  same turn stays in `answer`, and the agent can ask it again after the
  writes are answered.
- The call counts toward your 5 turns working, is billed for its own work, and
  is refused with a `402` when the allowance is spent.
- You cannot edit the arguments of a held write.
- Send an `Idempotency-Key` header to repeat a call that timed out without
  starting a second turn.



## OpenAPI

````yaml /api-ref/openapi.json post /agent/conversations/{conversationId}
openapi: 3.1.0
info:
  title: Specter API
  termsOfService: https://tryspecter.com/terms/
  contact:
    name: API support
    email: api-support@tryspecter.com
  version: 1.0.0
servers:
  - url: https://app.tryspecter.com/api/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Enrich
    description: >-
      Look up a company, person, or investor and, if Specter does not already
      hold it, fetch it on demand. Includes email-based person enrichment.
  - name: Search
    description: Find records across every product from a single plain-English query.
  - name: Agent
    description: >-
      Start a conversation with the Specter Agent, send it messages, answer what
      it asks, and read or cancel its turns.
  - name: Companies
    description: >-
      Company profiles, funding, headcount, traction, the per-company signals
      and sub-resources attached to a single company, and identifier resolution.
  - name: People
    description: >-
      Specter people records: profile data, contact details, and per-person
      lookups for a known person ID.
  - name: Investors
    description: >-
      Specter investor records: profile, activity, targeting, funds, portfolio
      companies, and the funding rounds they have participated in.
  - name: Transactions
    description: 'Transaction detail by ID: funding rounds, acquisitions, and IPOs.'
  - name: Revenue Signals
    description: >-
      Revenue and profitability signals: by ID, by date, and for a saved list or
      company search.
  - name: Talent Signals
    description: 'Talent signals: by ID and in bulk by ID.'
  - name: Investor Interest Signals
    description: 'Investor interest signals: by ID and in bulk by ID.'
  - name: Company Lists
    description: Create, query, and maintain lists of companies, including their results.
  - name: Investor Lists
    description: Create, query, and maintain lists of investors, including their results.
  - name: People Lists
    description: Create, query, and maintain lists of people, including their results.
  - name: Saved Searches
    description: List and delete searches saved via tryspecter.com.
  - name: Company Saved Searches
    description: Details and results for saved company searches.
  - name: People Saved Searches
    description: Details and results for saved people searches.
  - name: Investor Saved Searches
    description: Details and results for saved investor searches.
  - name: Talent Signals Saved Searches
    description: Details and results for saved Talent Signals searches.
  - name: Investor Interest Saved Searches
    description: Details and results for saved Investor Interest Signals searches.
  - name: Funding Rounds Saved Searches
    description: Details and results for saved funding-round searches.
  - name: Acquisitions Saved Searches
    description: Details and results for saved acquisition searches.
  - name: IPOs Saved Searches
    description: Details and results for saved IPO searches.
  - name: Network
    description: >-
      Your team's LinkedIn network: the people and companies your teammates are
      connected to, and your reach into a given company.
  - name: Account
    description: >-
      Organisation-level resources: your team's members, API call logs, and
      credit balance.
paths:
  /agent/conversations/{conversationId}:
    post:
      tags:
        - Agent
      summary: Continue a conversation
      description: >-
        Send a conversation its next message, or answer what its latest turn is

        waiting for. Send exactly one of `message` and `input_responses`.


        <Note>

        Billed as Specter Agent usage: the credits the turn cost, charged when
        the turn completes. A failed or cancelled turn is free.

        </Note>


        - `message` starts a new turn, and the agent sees everything said
        before. A
          conversation takes one turn at a time: a message sent while the latest turn
          is working is a `409 TURN_IN_PROGRESS`. A message sent while the conversation
          is `input_required` starts a new turn and leaves the pending requests
          unanswered; the earlier turn then reads `completed`.
        - `input_responses` answers the latest turn's `input_requests`, and
        **the same
          turn continues**: it keeps its `id`, and its `credits_used` adds up what the
          work before and after the answers cost.

        The call returns as [Start a
        conversation](/api-reference/agent/start-a-conversation)

        does: at once by default, or after up to `wait_seconds`, with `202`
        while the

        conversation is working and `200` otherwise.


        ## Answering the agent


        A turn whose `status` is `input_required` stopped for you. Read

        `turn.input_requests`: each entry is a write the agent held (an
        `approval`) or a

        question it asked. Answer every one in a single call, in
        `input_responses` keyed

        by the request's `id`.


        The requests and answers follow [MCP

        elicitation](https://modelcontextprotocol.io/specification/2025-11-25/client/elicitation),

        in snake_case. They are shaped after it rather than byte-for-byte the
        same.

        Each request has an `id`, a `type`, a `message` and a
        `requested_schema`; an

        `approval` also has a `tool_call` naming the held write. Each answer has
        an

        `action` and, to accept a question, `content`, which must match the
        request's

        `requested_schema`.


        | Request | `accept` | `decline` | `cancel` |

        | --- | --- | --- | --- |

        | `approval` | The write is performed. | The write is not performed, and
        the agent is told it was declined. | The write is not performed, and the
        agent is told it was cancelled. |

        | `question` | `content.reply` is your answer. | The agent is told you
        will not answer. | The agent is told you dismissed the question. |


        Declining or cancelling a write costs no tool credits.


        A question can also be answered with a plain `message`. That starts a
        new turn

        instead of continuing this one, and the earlier turn reads `completed`.


        ## Rules


        - Answer every request together. A call that leaves one out, or accepts
        a
          question with no `content.reply`, is a `422 INPUT_RESPONSES_INCOMPLETE`. An
          `id` the turn does not wait on is a `422 UNKNOWN_INPUT_REQUEST`.
        - Only the latest turn can be answered, and only while its `status` is
          `input_required`. Otherwise it is a `409 NOT_AWAITING_INPUT`.
        - When a turn holds writes, only those are listed. A question it asked
        in the
          same turn stays in `answer`, and the agent can ask it again after the
          writes are answered.
        - The call counts toward your 5 turns working, is billed for its own
        work, and
          is refused with a `402` when the allowance is spent.
        - You cannot edit the arguments of a held write.

        - Send an `Idempotency-Key` header to repeat a call that timed out
        without
          starting a second turn.
      operationId: continueAgentConversation
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: The ID of the agent conversation, from its `id`.
            examples:
              - 3f6c8f0e-2c1a-4b5e-9d7a-1b2c3d4e5f60
            title: Conversationid
          description: The ID of the agent conversation, from its `id`.
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                minLength: 1
                maxLength: 255
              - type: 'null'
            description: >-
              A value you choose, up to 255 characters, that names this request
              for 24 hours. Repeat the call with the same key and the same body
              and you get the same turn back instead of a second paid one. The
              same key with another body is a `409`.
            examples:
              - 0b9c3a1e-77d4-4d8e-8d3a-6f5a2c1b9e11
            title: Idempotency-Key
          description: >-
            A value you choose, up to 255 characters, that names this request
            for 24 hours. Repeat the call with the same key and the same body
            and you get the same turn back instead of a second paid one. The
            same key with another body is a `409`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContinueConversationRequest'
            examples:
              approve_a_held_write:
                summary: Approve a held write
                description: >-
                  The turn holds a write, listed in `input_requests` with the id
                  `int-call_abc`. `accept` performs it.
                value:
                  input_responses:
                    int-call_abc:
                      action: accept
              decline_a_held_write:
                summary: Decline a held write
                description: >-
                  `decline` leaves the write undone and tells the agent you
                  refused it.
                value:
                  input_responses:
                    int-call_abc:
                      action: decline
              answer_a_question:
                summary: Answer a question
                description: >-
                  The turn asked a question, listed in `input_requests` with the
                  id `call_def`. `accept` sends your reply as `content.reply`.
                value:
                  input_responses:
                    call_def:
                      action: accept
                      content:
                        reply: The fintech one in San Francisco
              decline_to_answer_a_question:
                summary: Decline to answer a question
                description: >-
                  `decline` needs no `content`. The agent continues with its
                  best reading of your request.
                value:
                  input_responses:
                    call_def:
                      action: decline
              send_a_message:
                summary: Send a message
                description: >-
                  A plain follow-up. It starts a new turn. When the latest turn
                  waits on a question, this answers it in your own words; the
                  earlier turn then reads `completed`.
                value:
                  message: And in Paris?
                  wait_seconds: 30
      responses:
        '200':
          description: >-
            The conversation is not working: it needs your input, or its latest
            turn has ended.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
          headers:
            Location:
              description: The absolute URL that reads the conversation.
              schema:
                type: string
        '202':
          description: >-
            The conversation is still working. Read it again with [Get a
            conversation](/api-reference/agent/get-a-conversation).
          headers:
            Location:
              description: The absolute URL that reads the conversation.
              schema:
                type: string
            Retry-After:
              description: >-
                Seconds to wait before reading the conversation again. Sent
                while it is working.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conversation'
        '401':
          $ref: '#/components/responses/ApiKeyMissingOrApiKeyNotValid'
        '402':
          $ref: '#/components/responses/AgentCreditsRefused'
        '403':
          $ref: '#/components/responses/NotPermitted'
        '404':
          $ref: '#/components/responses/NotFound404_2'
        '409':
          $ref: >-
            #/components/responses/NoApiUserOrTurnInProgressOrNotAwaitingInputOrIdempotencyKeyReused
        '422':
          $ref: >-
            #/components/responses/ValidationFailedOrEmptyMessageOrInputResponsesIncompleteOrUnknownInputRequest
        '429':
          $ref: '#/components/responses/RateLimitedOrTooManyActiveConversations'
        '503':
          $ref: '#/components/responses/KeyVerificationUnavailable'
components:
  schemas:
    ContinueConversationRequest:
      oneOf:
        - required:
            - message
        - required:
            - input_responses
      properties:
        message:
          anyOf:
            - type: string
              maxLength: 8000
              minLength: 1
            - type: 'null'
          title: Message
          description: >-
            A new message, which starts a new turn. Up to 8,000 characters. Send
            either this or `input_responses`.
          examples:
            - And in Paris?
        input_responses:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/AgentInputResponse'
              type: object
            - type: 'null'
          title: Input Responses
          description: >-
            Your answer to every entry of the latest turn's `input_requests`,
            keyed by the request's `id`. Answer all of them in one call; the
            same turn continues. Send either this or `message`.
        wait_seconds:
          type: integer
          maximum: 60
          minimum: 0
          title: Wait Seconds
          description: >-
            How long to hold the request open for the conversation to stop
            working, from 0 to 60 seconds. The call returns as soon as the
            conversation is no longer `working`, or with the conversation as it
            stands when the wait ends. With `0`, the default, it returns at
            once.
          default: 0
          examples:
            - 30
      additionalProperties: false
      type: object
      title: ContinueConversationRequest
      description: Exactly one of `message` and `input_responses`.
      examples:
        - input_responses:
            int-call_abc:
              action: accept
        - input_responses:
            int-call_abc:
              action: decline
        - input_responses:
            call_def:
              action: accept
              content:
                reply: The fintech one in San Francisco
        - input_responses:
            call_def:
              action: decline
        - message: And in Paris?
          wait_seconds: 30
    Conversation:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The conversation's ID. Pass it to the other conversation endpoints.
          examples:
            - 3f6c8f0e-2c1a-4b5e-9d7a-1b2c3d4e5f60
        state:
          $ref: '#/components/schemas/ConversationState'
          description: >-
            `working` while the latest turn is `queued` or `running`.
            `input_required` while it waits for you. `idle` once it has
            `completed`, `failed` or been `cancelled`: a conversation never
            reads as failed, and is ready for another message.
          examples:
            - idle
        turn:
          $ref: '#/components/schemas/Turn'
          description: >-
            The conversation's latest turn. Read an earlier one with [Get a
            turn](/api-reference/agent/get-a-turn).
        web_url:
          type: string
          title: Web Url
          description: >-
            A link to the conversation in the Specter web app. It opens for
            anyone who can see the conversation there.
          examples:
            - >-
              https://app.tryspecter.com/agent/3f6c8f0e-2c1a-4b5e-9d7a-1b2c3d4e5f60
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the conversation started.
          examples:
            - '2026-12-01T09:30:00Z'
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the conversation last changed.
          examples:
            - '2026-12-01T09:30:48Z'
      type: object
      required:
        - id
        - state
        - turn
        - web_url
        - created_at
        - updated_at
      title: Conversation
      description: A conversation with the Specter Agent and its latest turn.
    AgentInputResponse:
      properties:
        action:
          type: string
          enum:
            - accept
            - decline
            - cancel
          title: Action
          description: >-
            What you do with the request. For an approval, `accept` performs the
            held write, `decline` refuses it and tells the agent so, and
            `cancel` withdraws without a decision. For a question, `accept`
            sends `content.reply` as your answer, `decline` tells the agent you
            will not answer, and `cancel` tells it you dismissed the question.
            See the table in [Continue a
            conversation](/api-reference/agent/continue-a-conversation).
          examples:
            - accept
            - decline
            - cancel
        content:
          anyOf:
            - additionalProperties:
                anyOf:
                  - type: string
                  - type: integer
                  - type: number
                  - type: boolean
                  - type: 'null'
              type: object
            - type: 'null'
          title: Content
          description: >-
            Your reply to a question, as an object with the text under `reply`.
            Needed only when you `accept` a question; leave it out for an
            approval and for `decline` and `cancel`, where it is ignored.
          examples:
            - reply: The fintech one in San Francisco
      additionalProperties: false
      type: object
      required:
        - action
      title: AgentInputResponse
      description: Your answer to one input request, after an MCP elicitation result.
    ConversationState:
      type: string
      enum:
        - working
        - input_required
        - idle
      title: ConversationState
      description: >-
        What a conversation is doing. A failed or cancelled turn leaves it
        `idle`.
    Turn:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: >-
            The turn's ID. It does not change when the turn is answered after
            stopping for input.
          examples:
            - 9b1d7c52-6f0e-4a8b-8d3f-5e2a1c7b9d40
        status:
          $ref: '#/components/schemas/TurnStatus'
          description: >-
            `queued` and `running` mean the agent is still working. `completed`
            means it answered. `input_required` means the turn stopped for you,
            to approve a write it held or to answer a question: `input_requests`
            says what it waits for, and you answer through [Continue a
            conversation](/api-reference/agent/continue-a-conversation).
            `failed` and `cancelled` are final and free.
          examples:
            - completed
        message:
          type: string
          title: Message
          description: The message that started the turn.
          examples:
            - Which Berlin fintechs raised a Series A in the last year?
        answer:
          anyOf:
            - type: string
            - type: 'null'
          title: Answer
          description: >-
            The agent's reply in Markdown, with links to Specter pages. For a
            question it is the question. `null` until the turn is `completed` or
            `input_required`, and `null` for held writes the agent said nothing
            about.
          examples:
            - >-
              Three Berlin fintechs raised a Series A in the last year:
              [Hedgehog
              Payments](https://app.tryspecter.com/companies/5e3bc2b700c8f4c966ad2bbd).
        follow_ups:
          items:
            type: string
          type: array
          title: Follow Ups
          description: >-
            Up to three questions the agent suggests asking next. Empty when it
            has none.
          examples:
            - - Compare their funding
              - Who invested in them?
        input_requests:
          items:
            $ref: '#/components/schemas/AgentInputRequest'
          type: array
          title: Input Requests
          description: >-
            What the turn waits for when `status` is `input_required`: the
            writes it holds, or else its question. Empty in every other state,
            and once a later turn exists.
          examples:
            - []
        credits_used:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Used
          description: >-
            Credits the turn cost, summed over the work it took, and 0 for a
            turn that failed or was cancelled before it cost anything. `null`
            while the turn is going: the cost is known only when it ends.
          examples:
            - 7
        error:
          anyOf:
            - $ref: '#/components/schemas/TurnError'
            - type: 'null'
          description: Why the turn failed. `null` unless `status` is `failed`.
          examples:
            - null
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the turn started.
          examples:
            - '2026-12-01T09:30:00Z'
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: >-
            When the turn last stopped: it finished, failed, was cancelled, or
            is waiting for input. `null` while it is going.
          examples:
            - '2026-12-01T09:30:48Z'
      type: object
      required:
        - id
        - status
        - message
        - answer
        - follow_ups
        - input_requests
        - credits_used
        - error
        - created_at
        - completed_at
      title: Turn
      description: One message you sent and everything the agent did about it.
    ApiKeyMissing:
      properties:
        errorCode:
          type: string
          const: API_KEY_MISSING
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - No API Key was presented on the header X-API-KEY
      type: object
      required:
        - errorCode
        - message
      title: ApiKeyMissing
    ApiKeyNotValid:
      properties:
        errorCode:
          type: string
          enum:
            - API_KEY_NOT_VALID
            - key_from_another_org
          title: Errorcode
          description: >-
            `key_from_another_org` when an `ak_` key was issued for an
            organization its owner no longer belongs to.
        message:
          type: string
          title: Message
          examples:
            - API key present, but not valid
      type: object
      required:
        - errorCode
        - message
      title: ApiKeyNotValid
    AgentCreditsRefused:
      properties:
        errorCode:
          type: string
          enum:
            - OUT_OF_CREDITS
            - CREDIT_LIMIT_REACHED
          title: Errorcode
          description: >-
            `OUT_OF_CREDITS` when the Specter Agent's allowance is spent and the
            organization has no credits to pay for another turn;
            `CREDIT_LIMIT_REACHED` when a limit set on the person or the API key
            is reached.
        message:
          type: string
          title: Message
          examples:
            - There are no more credits available to complete the request
        scope:
          anyOf:
            - type: string
              enum:
                - member
                - key
            - type: 'null'
          title: Scope
          description: >-
            Sent with `CREDIT_LIMIT_REACHED`: whether the person's or the key's
            limit was reached.
        period:
          anyOf:
            - type: string
              enum:
                - day
                - week
                - month
            - type: 'null'
          title: Period
          description: 'Sent with `CREDIT_LIMIT_REACHED`: the period of the limit.'
      type: object
      required:
        - errorCode
        - message
      title: AgentCreditsRefused
    NotPermitted:
      properties:
        errorCode:
          type: string
          enum:
            - NOT_PERMITTED
            - user_suspended
            - api_access_not_granted
            - org_key_disabled
            - member_keys_disabled
            - member_keys_admins_only
          title: Errorcode
          description: >-
            `NOT_PERMITTED` for a team key; the other codes are the reasons an
            `ak_` key is refused.
        message:
          type: string
          title: Message
          examples:
            - API key present, but you are not permitted
      type: object
      required:
        - errorCode
        - message
      title: NotPermitted
    NotFound:
      properties:
        errorCode:
          type: string
          const: NOT_FOUND
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - Not Found
      type: object
      required:
        - errorCode
        - message
      title: NotFound
    NoApiUser:
      properties:
        errorCode:
          type: string
          const: NO_API_USER
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - >-
              Your organization's API user is not set up yet, so there is no
              owner for this item. Contact support.
      type: object
      required:
        - errorCode
        - message
      title: NoApiUser
    TurnInProgress:
      properties:
        errorCode:
          type: string
          const: TURN_IN_PROGRESS
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - >-
              This conversation is still working on its latest turn. Wait for it
              to finish, or cancel it, before sending anything else.
      type: object
      required:
        - errorCode
        - message
      title: TurnInProgress
    NotAwaitingInput:
      properties:
        errorCode:
          type: string
          const: NOT_AWAITING_INPUT
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - >-
              This conversation is not waiting for input. Only its latest turn
              can be answered, and only while its status is input_required.
      type: object
      required:
        - errorCode
        - message
      title: NotAwaitingInput
    IdempotencyKeyReused:
      properties:
        errorCode:
          type: string
          const: IDEMPOTENCY_KEY_REUSED
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - This idempotency key was already used with a different request.
      type: object
      required:
        - errorCode
        - message
      title: IdempotencyKeyReused
    ValidationFailed:
      properties:
        errorCode:
          type: string
          const: VALIDATION_ERROR
          title: Errorcode
        message:
          type: string
          title: Message
          description: >-
            Why the request was rejected: each invalid field, with the path to
            it.
          examples:
            - Field required (body.name)
      type: object
      required:
        - errorCode
        - message
      title: ValidationFailed
    EmptyMessage:
      properties:
        errorCode:
          type: string
          const: EMPTY_MESSAGE
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - The message is empty.
      type: object
      required:
        - errorCode
        - message
      title: EmptyMessage
    InputResponsesIncomplete:
      properties:
        errorCode:
          type: string
          const: INPUT_RESPONSES_INCOMPLETE
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - >-
              Every pending input request must be answered together. Unanswered:
              int-call_abc.
      type: object
      required:
        - errorCode
        - message
      title: InputResponsesIncomplete
    UnknownInputRequest:
      properties:
        errorCode:
          type: string
          const: UNKNOWN_INPUT_REQUEST
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - 'The turn is not waiting on these input requests: int-call_xyz.'
      type: object
      required:
        - errorCode
        - message
      title: UnknownInputRequest
    RateLimited:
      properties:
        errorCode:
          type: string
          const: RATE_LIMITED
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - You have been rate-limited
      type: object
      required:
        - errorCode
        - message
      title: RateLimited
    TooManyActiveConversations:
      properties:
        errorCode:
          type: string
          const: TOO_MANY_ACTIVE_CONVERSATIONS
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - >-
              You already have 5 conversations working. Wait for one to finish,
              or cancel one, before starting more work.
      type: object
      required:
        - errorCode
        - message
      title: TooManyActiveConversations
    KeyVerificationUnavailable:
      properties:
        errorCode:
          type: string
          const: clerk_unavailable
          title: Errorcode
        message:
          type: string
          title: Message
          examples:
            - Key verification is temporarily unavailable
      type: object
      required:
        - errorCode
        - message
      title: KeyVerificationUnavailable
    TurnStatus:
      type: string
      enum:
        - queued
        - running
        - completed
        - input_required
        - failed
        - cancelled
      title: TurnStatus
      description: >-
        Where a turn stands. `queued` and `running` are in progress; the rest
        are final.
    AgentInputRequest:
      properties:
        id:
          type: string
          title: Id
          description: Identifies the request. Key your answer by it in `input_responses`.
          examples:
            - int-call_abc
        type:
          type: string
          enum:
            - approval
            - question
          title: Type
          description: >-
            `approval` asks you to approve a write the agent held. `question`
            asks you something.
          examples:
            - approval
            - question
        message:
          type: string
          title: Message
          description: What is asked, in a sentence fit to show a person.
          examples:
            - Create the list "Berlin fintech"?
            - Which of the two companies named Hedgehog do you mean?
        requested_schema:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          type: object
          title: Requested Schema
          description: >-
            A flat JSON Schema of the reply `content`. Empty for an approval.
            For a question, a `reply` string. The `content` of your answer must
            match this schema. The `enum` on `reply`, when present, lists the
            agent's suggested answers; any text is accepted.
          examples:
            - properties: {}
              type: object
            - properties:
                reply:
                  enum:
                    - The Berlin fintech
                    - The fintech in San Francisco
                  title: Your answer
                  type: string
              required:
                - reply
              type: object
        tool_call:
          anyOf:
            - $ref: '#/components/schemas/AgentToolCall'
            - type: 'null'
          description: For an `approval`, the write that is held. `null` for a question.
          examples:
            - arguments:
                name: Berlin fintech
                product_type: company
              name: create_list
            - null
      type: object
      required:
        - id
        - type
        - message
        - requested_schema
        - tool_call
      title: AgentInputRequest
      description: One thing a turn is waiting for, after an MCP elicitation request.
    TurnError:
      properties:
        code:
          type: string
          title: Code
          description: A stable code for why the turn failed.
          examples:
            - TURN_FAILED
        message:
          type: string
          title: Message
          description: What happened, in a sentence fit to show a person.
          examples:
            - >-
              The agent could not finish this request. The failed attempt was
              not charged; send the message again.
      type: object
      required:
        - code
        - message
      title: TurnError
    JsonValue: {}
    AgentToolCall:
      properties:
        name:
          type: string
          title: Name
          description: The tool the agent wants to call.
          examples:
            - create_list
        arguments:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          type: object
          title: Arguments
          description: The arguments it would call the tool with.
          examples:
            - name: Berlin fintech
              product_type: company
      type: object
      required:
        - name
        - arguments
      title: AgentToolCall
  responses:
    ApiKeyMissingOrApiKeyNotValid:
      description: Unauthorized
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/ApiKeyMissing'
              - $ref: '#/components/schemas/ApiKeyNotValid'
    AgentCreditsRefused:
      description: >-
        The turn cannot start: the Specter Agent's allowance is spent and there
        are no credits to pay for it, or a limit on the person or the key is
        reached. The `X-CreditLimit-*` headers are not sent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AgentCreditsRefused'
    NotPermitted:
      description: Forbidden - There is no permissions to use the endpoint
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotPermitted'
    NotFound404_2:
      description: >-
        Not Found - the conversation does not exist or was not started with the
        API.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/NotFound'
    NoApiUserOrTurnInProgressOrNotAwaitingInputOrIdempotencyKeyReused:
      description: >-
        Conflict - your organization has no API user yet (`NO_API_USER`), the
        conversation is still working on its latest turn (`TURN_IN_PROGRESS`),
        `input_responses` were sent and the latest turn is not waiting for input
        (`NOT_AWAITING_INPUT`), or the `Idempotency-Key` was used with a
        different request (`IDEMPOTENCY_KEY_REUSED`).
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/NoApiUser'
              - $ref: '#/components/schemas/TurnInProgress'
              - $ref: '#/components/schemas/NotAwaitingInput'
              - $ref: '#/components/schemas/IdempotencyKeyReused'
    ValidationFailedOrEmptyMessageOrInputResponsesIncompleteOrUnknownInputRequest:
      description: >-
        Validation Error - a field is invalid, or the body does not hold exactly
        one of `message` and `input_responses`; the message is empty once
        trimmed (`EMPTY_MESSAGE`); `input_responses` leaves a request unanswered
        or accepts a question without a reply (`INPUT_RESPONSES_INCOMPLETE`); or
        it names a request the turn is not waiting on (`UNKNOWN_INPUT_REQUEST`).
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/ValidationFailed'
              - $ref: '#/components/schemas/EmptyMessage'
              - $ref: '#/components/schemas/InputResponsesIncomplete'
              - $ref: '#/components/schemas/UnknownInputRequest'
    RateLimitedOrTooManyActiveConversations:
      description: >-
        Too Many Requests - the API rate limit is exceeded (`RATE_LIMITED`), or
        the caller already has 5 turns working
        (`TOO_MANY_ACTIVE_CONVERSATIONS`).
      headers:
        X-RateLimit-Limit:
          description: The total rate limit allowed for this endpoint
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: The number of requests remaining
          schema:
            type: integer
        X-RateLimit-Reset:
          description: The number of seconds until the rate limit resets
          schema:
            type: number
            format: float
      content:
        application/json:
          schema:
            anyOf:
              - $ref: '#/components/schemas/RateLimited'
              - $ref: '#/components/schemas/TooManyActiveConversations'
    KeyVerificationUnavailable:
      description: >-
        Key verification is temporarily unavailable, so an `ak_` key could not
        be checked. Retry after the interval in `Retry-After`.
      headers:
        Retry-After:
          description: The number of seconds to wait before retrying
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/KeyVerificationUnavailable'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.