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

# Route Agent



## OpenAPI

````yaml /api-reference/connectors/openapi.yaml post /v1/routing/route-agent
openapi: 3.0.3
info:
  title: Integration Connector API
  version: 0.0.1
servers: []
security: []
tags:
  - name: CalendarService
  - name: CrmService
  - name: InventoryService
  - name: RoutingService
  - name: TicketsService
paths:
  /v1/routing/route-agent:
    post:
      tags:
        - RoutingService
      summary: Route Agent
      operationId: routeAgent
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouteAgentRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteAgentResponse'
        default:
          description: Default error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Status'
components:
  schemas:
    RouteAgentRequest:
      type: object
      properties:
        source:
          type: string
          description: >-
            System or integration that initiated the routing request. E.g:
            "chat", "inbound_phone", or "email".
        source_id:
          type: string
          description: >-
            Source-system identifier for the entity being routed. Typically the
            "Dialogue" integer ID.
        reason:
          type: string
          description: Human-readable reason or context for routing.
        routing_policy:
          type: string
          description: The strategy to do routing with.
        routable_entities:
          type: array
          items:
            $ref: '#/components/schemas/RoutableEntity'
          description: A list of all routable entities.
        metadata:
          type: object
          description: Additional routing context for provider-specific decisions.
    RouteAgentResponse:
      type: object
      properties:
        routed_agents:
          type: array
          items:
            $ref: '#/components/schemas/RoutedAgent'
          description: |-
            Agents that were routed, if any. Teams are converted to agents.
             These agents must represent Atonom agent/user IDs.
        status:
          type: string
          description: >-
            The status of the route. Can be useful for communicating queued, etc
            statuses.
    Status:
      type: object
      properties:
        code:
          type: integer
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          format: int32
        message:
          type: string
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
        details:
          type: array
          items:
            $ref: '#/components/schemas/GoogleProtobufAny'
          description: >-
            A list of messages that carry the error details.  There is a common
            set of message types for APIs to use.
      description: >-
        The `Status` type defines a logical error model that is suitable for
        different programming environments, including REST APIs and RPC APIs. It
        is used by [gRPC](https://github.com/grpc). Each `Status` message
        contains three pieces of data: error code, error message, and error
        details. You can find out more about this error model and how to work
        with it in the [API Design
        Guide](https://cloud.google.com/apis/design/errors).
    RoutableEntity:
      type: object
      properties:
        type:
          enum:
            - ROUTABLE_ENTITY_TYPE_UNSPECIFIED
            - ROUTABLE_ENTITY_TYPE_AGENT
            - ROUTABLE_ENTITY_TYPE_TEAM
          type: string
          description: The type of entity.
          format: enum
        id:
          type: string
          description: Unique identifier of the entity.
        name:
          type: string
      description: Represents an entity that can be routed to.
    RoutedAgent:
      type: object
      properties:
        name:
          type: string
        email:
          type: string
        phone:
          type: string
          description: Phone number in E.164 format (e.g. +14155552671).
    GoogleProtobufAny:
      type: object
      properties:
        '@type':
          type: string
          description: The type of the serialized message.
      additionalProperties: true
      description: >-
        Contains an arbitrary serialized message along with a @type that
        describes the type of the serialized message.

````