---
title: "POST /agents/{fromAgentId}/a2a/dispatch"
method: POST
path: "/agents/{fromAgentId}/a2a/dispatch"
---

# POST /agents/{fromAgentId}/a2a/dispatch

`POST /agents/{fromAgentId}/a2a/dispatch`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/agents/{fromAgentId}/a2a/dispatch`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Path parameters

- `fromAgentId` string, required: ID of the sending agent (must belong to the caller's org)

## Request body

- object: Dispatch an A2A task from one of your agents to another agent by DID
  - `toDid` string, required: Recipient agent DID
  - `type` string, required: Task type
  - `input` object, required: Task input payload

## Response `200`

OK

- object: Full A2A task representation
  - `id` string, required: Unique task identifier
  - `agentId` string, required: ID of the receiving agent
  - `orgId` string, required: Organization that owns the receiving agent
  - `fromDid` string, required: Sender DID
  - `toDid` string, required: Receiver DID
  - `type` string, required: Task type
  - `status` 'submitted' | 'working' | 'input_required' | 'completed' | 'failed' | 'canceled', required: Current status of the A2A task
  - `input` object, required: Task input payload
  - `output` object, nullable, required: Task output payload
  - `error` object, nullable, required: Error details if task failed
    - `code` string, required: Error code
    - `message` string, required: Error message
  - `history` object[], required: Status change history
    - `status` 'submitted' | 'working' | 'input_required' | 'completed' | 'failed' | 'canceled', required: Current status of the A2A task
    - `message` string: Human-readable status message
    - `timestamp` string, date-time, required: ISO-8601 timestamp of the event
  - `createdAt` string, date-time, required: Task creation timestamp
  - `updatedAt` string, date-time, required: Last update timestamp

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
