samva-dev Agents API

Agents that answer conversations on your mailbox endpoints, with a draft, published versions, and rules for supervision, hours, and staff takeover

Operations 9

GET /v1/agents List agents #
POST /v1/agents Create an agent #
GET /v1/agents/{id} Get an agent #
PATCH /v1/agents/{id} Rename an agent #
DELETE /v1/agents/{id} Delete an agent #
PUT /v1/agents/{id}/draft Replace an agent draft #
POST /v1/agents/{id}/publish Publish an agent #
GET /v1/agents/{id}/versions List published agent versions #
GET /v1/agents/{id}/versions/{version} Get a published agent version #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/samva-dev:samva-dev-agents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

samva-dev-agents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Samva Agents API
  version: 1.0.0
  description: Samva is the email API for your app. Send transactional email in one typed call. Delivery events and customer replies come back as signed webhooks, and replies thread to the email they answer.
servers:
- url: https://api.samva.dev
security: []
tags:
- name: Agents
  description: Agents that answer conversations on your mailbox endpoints, with a draft, published versions, and rules for supervision, hours, and staff takeover
paths:
  /v1/agents:
    get:
      tags:
      - Agents
      operationId: agents.list
      parameters:
      - name: limit
        in: query
        schema:
          anyOf:
          - type: integer
            maximum: 100
            exclusiveMinimum: 0
            description: Items per page, at most 100.
          - type: 'null'
        required: false
      - name: cursor
        in: query
        schema:
          anyOf:
          - $ref: '#/components/schemas/Cursor'
          - type: 'null'
        required: false
      security:
      - apiKey: []
      responses:
        '200':
          description: AgentPage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentPage'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Returns the agents the caller can reach, newest first, without their drafts. Pass nextCursor back as cursor for the next page.
      summary: List agents
      x-samva-scope: agents:read
    post:
      tags:
      - Agents
      operationId: agents.create
      parameters: []
      security:
      - apiKey: []
      responses:
        '201':
          description: Agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Creates an agent with a draft and returns it with status 201. The agent answers nothing until its draft is published. A new agent starts in supervised mode, so each reply waits for a person to approve it. The namespace is set at creation and cannot change.
      summary: Create an agent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentPayload'
        required: true
      x-samva-scope: agents:create
  /v1/agents/{id}:
    get:
      tags:
      - Agents
      operationId: agents.get
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AgentId'
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: Agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Returns an agent with its draft, its current revision, and its newest published version number.
      summary: Get an agent
      x-samva-scope: agents:read
    patch:
      tags:
      - Agents
      operationId: agents.update
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AgentId'
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: Agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Renames an agent.
      summary: Rename an agent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentPayload'
        required: true
      x-samva-scope: agents:update
    delete:
      tags:
      - Agents
      operationId: agents.remove
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AgentId'
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: DeleteAgentResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteAgentResponse'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Deletes an agent with its draft and published versions. The endpoints it answered on stop being answered by an agent. A reply already running finishes on the version it started on.
      summary: Delete an agent
      x-samva-scope: agents:delete
  /v1/agents/{id}/draft:
    put:
      tags:
      - Agents
      operationId: agents.replaceDraft
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AgentId'
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: Agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '409':
          description: ConflictError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: 'Replaces the whole draft and returns the agent with a new revision. The request names the revision it read; a stale revision returns 409. Published versions, and the conversations answered on them, do not change. An endpoint answers for one agent at a time: a draft that names an endpoint another agent answers on returns 409.'
      summary: Replace an agent draft
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReplaceAgentDraftPayload'
        required: true
      x-samva-scope: agents:update
  /v1/agents/{id}/publish:
    post:
      tags:
      - Agents
      operationId: agents.publish
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AgentId'
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: PublishAgentResponse
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishAgentResponse'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '409':
          description: ConflictError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConflictError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: 'Publishes the draft as the next immutable version. Each conversation moves to it from its next agent reply; a reply already running finishes on the version it started on. The request names the revision it read; a stale revision returns 409. Publishing a draft identical to the newest version changes nothing and answers published false. An endpoint answers for one agent at a time: publishing a draft whose endpoint another agent answers on returns 409. In supervised mode each reply waits for a person to approve it.'
      summary: Publish an agent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublishAgentPayload'
        required: true
      x-samva-scope: agents:update
  /v1/agents/{id}/versions:
    get:
      tags:
      - Agents
      operationId: agents.listVersions
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AgentId'
        required: true
      - name: limit
        in: query
        schema:
          anyOf:
          - type: integer
            maximum: 100
            exclusiveMinimum: 0
            description: Items per page, at most 100.
          - type: 'null'
        required: false
      - name: cursor
        in: query
        schema:
          anyOf:
          - $ref: '#/components/schemas/VersionCursor'
          - type: 'null'
        required: false
      security:
      - apiKey: []
      responses:
        '200':
          description: AgentVersionPage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersionPage'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Returns an agent's published versions, newest first, without their definitions. Pass nextCursor back as cursor for the next page.
      summary: List published agent versions
      x-samva-scope: agents:read
  /v1/agents/{id}/versions/{version}:
    get:
      tags:
      - Agents
      operationId: agents.getVersion
      parameters:
      - name: id
        in: path
        schema:
          $ref: '#/components/schemas/AgentId'
        required: true
      - name: version
        in: path
        schema:
          type: string
        required: true
      security:
      - apiKey: []
      responses:
        '200':
          description: AgentVersion
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentVersion'
        '401':
          description: UnauthorizedError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: ForbiddenError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '404':
          description: ResourceNotFoundError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFoundError'
        '422':
          description: ValidationError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: InternalError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalError'
        '504':
          description: GatewayTimeoutError
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayTimeoutError'
      description: Returns the immutable definition of one published version.
      summary: Get a published agent version
      x-samva-scope: agents:read
components:
  schemas:
    AgentToolScope:
      anyOf:
      - type: object
        properties:
          kind:
            type: string
            enum:
            - all
        required:
        - kind
        additionalProperties: false
      - type: object
        properties:
          kind:
            type: string
            enum:
            - readOnly
        required:
        - kind
        additionalProperties: false
      - type: object
        properties:
          kind:
            type: string
            enum:
            - selected
          names:
            type: array
            items:
              type: string
              pattern: ^[a-z][a-z0-9_.]{0,63}$
            minItems: 1
        required:
        - kind
        - names
        additionalProperties: false
    AgentMode:
      type: string
      enum:
      - live
      - supervised
    WorkingHoursRange:
      type: object
      properties:
        day:
          $ref: '#/components/schemas/Weekday'
        opens:
          $ref: '#/components/schemas/ClockTime'
        closes:
          $ref: '#/components/schemas/ClockTime'
      required:
      - day
      - opens
      - closes
      additionalProperties: false
    AgentVersionPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AgentVersionSummary'
        nextCursor:
          anyOf:
          - type: string
          - type: 'null'
      required:
      - items
      - nextCursor
      additionalProperties: false
    DeleteAgentResponse:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AgentId'
        deleted:
          type: boolean
          enum:
          - true
      required:
      - id
      - deleted
      additionalProperties: false
    AgentIntegrationGrant:
      type: object
      properties:
        integrationId:
          $ref: '#/components/schemas/IntegrationId'
        tools:
          $ref: '#/components/schemas/AgentToolScope'
        requireApproval:
          type: array
          items:
            type: string
            pattern: ^[a-z][a-z0-9_.]{0,63}$
      required:
      - integrationId
      - tools
      - requireApproval
      additionalProperties: false
    UnauthorizedError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - UnauthorizedError
        message:
          type: string
      required:
      - _tag
      - message
      additionalProperties: false
      x-category:
      - auth
      x-retryable: false
    ClockTime:
      type: string
      pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$
    AgentPage:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AgentListItem'
        nextCursor:
          anyOf:
          - type: string
          - type: 'null'
      required:
      - items
      - nextCursor
      additionalProperties: false
    UpdateAgentPayload:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/AgentName'
      required:
      - name
      additionalProperties: false
    AgentVersion:
      type: object
      properties:
        agentId:
          $ref: '#/components/schemas/AgentId'
        version:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        definition:
          $ref: '#/components/schemas/AgentDefinition'
        publishedAt:
          type: string
      required:
      - agentId
      - version
      - definition
      - publishedAt
      additionalProperties: false
    NamespaceId:
      type: string
      pattern: ^ns_[0-9a-hjkmnp-tv-z]{16,24}$
      x-samva-brand: NamespaceId
    PublishAgentResponse:
      type: object
      properties:
        agent:
          $ref: '#/components/schemas/Agent'
        version:
          $ref: '#/components/schemas/AgentVersion'
        published:
          type: boolean
      required:
      - agent
      - version
      - published
      additionalProperties: false
    InternalError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - InternalError
        message:
          type: string
      required:
      - _tag
      - message
      additionalProperties: false
      x-category:
      - transient
      x-retryable: true
    AgentName:
      type: string
      pattern: ^\S[\s\S]*\S$|^\S$|^$
      minLength: 1
      maxLength: 120
      x-samva-string-checks:
      - id: effect/schema/isMaxLength
        payload:
          maxLength: 120
    AgentListItem:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AgentId'
        name:
          type: string
        namespaceId:
          anyOf:
          - $ref: '#/components/schemas/NamespaceId'
          - type: 'null'
        publishedVersion:
          anyOf:
          - type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          - type: 'null'
        publishedAt:
          anyOf:
          - type: string
          - type: 'null'
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
      - id
      - name
      - namespaceId
      - publishedVersion
      - publishedAt
      - createdAt
      - updatedAt
      additionalProperties: false
    AgentId:
      type: string
      pattern: ^agt_[0-9a-hjkmnp-tv-z]{16,24}$
      x-samva-brand: AgentId
    WorkingHours:
      type: object
      properties:
        timeZone:
          $ref: '#/components/schemas/TimeZone'
        ranges:
          type: array
          items:
            $ref: '#/components/schemas/WorkingHoursRange'
          minItems: 1
          maxItems: 28
      required:
      - timeZone
      - ranges
      additionalProperties: false
    Weekday:
      type: string
      enum:
      - monday
      - tuesday
      - wednesday
      - thursday
      - friday
      - saturday
      - sunday
    Agent:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/AgentId'
        name:
          type: string
        namespaceId:
          anyOf:
          - $ref: '#/components/schemas/NamespaceId'
          - type: 'null'
        revision:
          type: string
        draft:
          $ref: '#/components/schemas/AgentDefinition'
        publishedVersion:
          anyOf:
          - type: integer
            minimum: -9007199254740991
            maximum: 9007199254740991
          - type: 'null'
        publishedAt:
          anyOf:
          - type: string
          - type: 'null'
        createdAt:
          type: string
        updatedAt:
          type: string
      required:
      - id
      - name
      - namespaceId
      - revision
      - draft
      - publishedVersion
      - publishedAt
      - createdAt
      - updatedAt
      additionalProperties: false
    VersionCursor:
      type: string
    TimeZone:
      type: string
    Cursor:
      type: string
    GatewayTimeoutError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - GatewayTimeoutError
        message:
          type: string
        retryAfterSeconds:
          type: number
      required:
      - _tag
      - message
      - retryAfterSeconds
      additionalProperties: false
      x-category:
      - transient
      x-retryable: true
    IntegrationId:
      type: string
      pattern: ^intg_[0-9a-hjkmnp-tv-z]{16,24}$
      x-samva-brand: IntegrationId
    AgentVersionSummary:
      type: object
      properties:
        agentId:
          $ref: '#/components/schemas/AgentId'
        version:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        publishedAt:
          type: string
      required:
      - agentId
      - version
      - publishedAt
      additionalProperties: false
    CreateAgentPayload:
      type: object
      properties:
        name:
          $ref: '#/components/schemas/AgentName'
        namespaceId:
          anyOf:
          - $ref: '#/components/schemas/NamespaceId'
          - type: 'null'
          description: The namespace the agent belongs to; it cannot move later. Omit for an organization-level agent. A namespace-scoped key always creates in its own namespace.
        definition:
          anyOf:
          - $ref: '#/components/schemas/AgentDefinition'
          - type: 'null'
          description: The first draft. Defaults to an agent with no instructions, knowledge, or endpoints, in supervised mode on the standard model.
          default:
            instructions: ''
            knowledge: ''
            endpointIds: []
            integrations: []
            mode: supervised
            model: standard
            workingHours: null
            takeoverTimeoutMinutes: 30
      required:
      - name
      additionalProperties: false
    AgentDefinition:
      type: object
      properties:
        instructions:
          type: string
          maxLength: 20000
          x-samva-string-checks:
          - id: effect/schema/isMaxLength
            payload:
              maxLength: 20000
        knowledge:
          type: string
          maxLength: 100000
          x-samva-string-checks:
          - id: effect/schema/isMaxLength
            payload:
              maxLength: 100000
        endpointIds:
          type: array
          items:
            $ref: '#/components/schemas/MailboxEndpointId'
          maxItems: 20
        integrations:
          type: array
          items:
            $ref: '#/components/schemas/AgentIntegrationGrant'
          maxItems: 20
        mode:
          $ref: '#/components/schemas/AgentMode'
        model:
          $ref: '#/components/schemas/AgentModel'
        workingHours:
          anyOf:
          - $ref: '#/components/schemas/WorkingHours'
          - type: 'null'
        takeoverTimeoutMinutes:
          type: integer
          minimum: 1
          maximum: 10080
      required:
      - instructions
      - knowledge
      - endpointIds
      - integrations
      - mode
      - model
      - workingHours
      - takeoverTimeoutMinutes
      additionalProperties: false
    AgentModel:
      type: string
      enum:
      - standard
      - max
    ValidationError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - ValidationError
        message:
          type: string
        fields:
          anyOf:
          - type: object
            additionalProperties:
              type: array
              items:
                type: string
          - type: 'null'
      required:
      - _tag
      - message
      additionalProperties: false
      x-category:
      - validation
      x-retryable: false
    ReplaceAgentDraftPayload:
      type: object
      properties:
        revision:
          type: string
          minLength: 1
        definition:
          $ref: '#/components/schemas/AgentDefinition'
      required:
      - revision
      - definition
      additionalProperties: false
    ConflictError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - ConflictError
        message:
          type: string
        resource:
          type: string
        id:
          anyOf:
          - type: string
          - type: 'null'
      required:
      - _tag
      - message
      - resource
      additionalProperties: false
      x-category:
      - conflict
      x-retryable: false
    PublishAgentPayload:
      type: object
      properties:
        revision:
          type: string
          minLength: 1
      required:
      - revision
      additionalProperties: false
    MailboxEndpointId:
      type: string
      pattern: ^mbxep_[0-9a-hjkmnp-tv-z]{16,24}$
      x-samva-brand: MailboxEndpointId
    ForbiddenError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - ForbiddenError
        message:
          type: string
      required:
      - _tag
      - message
      additionalProperties: false
      x-category:
      - auth
      x-retryable: false
    ResourceNotFoundError:
      type: object
      properties:
        _tag:
          type: string
          enum:
          - ResourceNotFoundError
        resource:
          type: string
        id:
          type: string
        message:
          type: string
      required:
      - _tag
      - resource
      - id
      - message
      additionalProperties: false
      x-category:
      - notFound
      x-retryable: false
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-api-key
      in: header