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

# A2A JSON-RPC endpoint for an agent

> JSON-RPC 2.0 endpoint implementing the A2A methods `SendMessage`, `SendStreamingMessage`, `GetTask`,
`CancelTask` and `GetExtendedAgentCard`. `SendStreamingMessage` responds with `text/event-stream`; the others
with a single JSON-RPC response. `GetExtendedAgentCard` returns the authenticated, richer AgentCard.
Protocol errors are returned as JSON-RPC error objects with HTTP 200. The target namespace is supplied
in the message `metadata.namespace`; the acting user is taken from the bearer token.
Request and response bodies follow the A2A 1.0 spec (https://a2a-protocol.org).




## OpenAPI

````yaml /api-reference/openapi.yml post /a2a/{agentName}
openapi: 3.0.3
info:
  title: DataLinks
  version: 2.2.3
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /a2a/{agentName}:
    post:
      tags:
        - a2a
      summary: A2A JSON-RPC endpoint for an agent
      description: >
        JSON-RPC 2.0 endpoint implementing the A2A methods `SendMessage`,
        `SendStreamingMessage`, `GetTask`,

        `CancelTask` and `GetExtendedAgentCard`. `SendStreamingMessage` responds
        with `text/event-stream`; the others

        with a single JSON-RPC response. `GetExtendedAgentCard` returns the
        authenticated, richer AgentCard.

        Protocol errors are returned as JSON-RPC error objects with HTTP 200.
        The target namespace is supplied

        in the message `metadata.namespace`; the acting user is taken from the
        bearer token.

        Request and response bodies follow the A2A 1.0 spec
        (https://a2a-protocol.org).
      operationId: a2aJsonRpc
      parameters:
        - name: agentName
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
        required: true
      responses:
        '200':
          description: >-
            A JSON-RPC response, or (for SendStreamingMessage) an SSE stream of
            JSON-RPC responses.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
            text/event-stream:
              schema:
                type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: >-
        Unauthorized. This error occurs if the authentication token is missing
        or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      required:
        - error_code
        - message
      type: object
      properties:
        error_code:
          type: string
          example: UNAUTHORIZED
        error_message:
          type: string
          example: ''
        message:
          type: string
          example: Missing authentication token
        sub_errors:
          type: array
          items:
            required:
              - code
              - message
            type: object
            properties:
              code:
                type: string
              message:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      description: >
        Use a Bearer token for authentication. Submit the token using the
        `Authorization`

        header: `Authorization: Bearer <token>`.
      scheme: bearer
    openId:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth
          scopes:
            openid: openid

````