---
title: "Send a message or manage a task (A2A JSON-RPC 2.0)"
method: POST
path: "/api/a2a/tasks"
tags: ["Tasks"]
---

# Send a message or manage a task (A2A JSON-RPC 2.0)

`POST /api/a2a/tasks`

## Request

- Base URL: `https://api.andru-ai.com`
- URL: `https://api.andru-ai.com/api/a2a/tasks`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

The A2A JSON-RPC endpoint. A2A 1.0 (send the header A2A-Version: 1.0): SendMessage, GetTask, CancelTask. A2A 0.3 (no header): message/send, tasks/get, tasks/cancel. A message carries one data part naming a tool and its arguments, { tool, args }; the skill follows from the tool. Reuse a messageId to retry safely: the first task is returned and nothing is charged twice. The older tasks/send form ({ skill, input }) still works.

## Request body

- TaskSubmitRequest: A2A JSON-RPC 2.0 request. For SendMessage (1.0) and message/send (0.3), params.message is an A2A Message whose data part is { tool, args }: see the A2A specification and /.well-known/agent-card.json. The params below describe the older tasks/send form.
  - `jsonrpc` '2.0', required
  - `method` 'SendMessage' | 'GetTask' | 'CancelTask' | 'message/send' | 'tasks/get' | 'tasks/cancel' | 'tasks/send', required
  - `id` string
  - `params` object, required: Name the skill (skill or skillId), then give the tool and its arguments either in a data part of message.parts or in input. Text parts are accepted but are not used as product context.
    - `skill` string: Target skill ID
    - `skillId` string: Target skill ID (same as skill)
    - `taskId` string: Answer a task paused in input-required: send its taskId with the requested fields in a data part (for product context, just { website }). The task resumes and finishes.
    - `message` object
      - `role` 'user', required
      - `parts` object[], required
        - `kind` 'text' | 'data'
        - `type` string: Older name for kind
        - `text` string
        - `data` object
    - `input` object: Alternative to a data part: { tool, args }. Wins if both are given.
      - `tool` string
      - `args` object

## Response `200`

Task created and queued

- JsonRpcResponse
  - `jsonrpc` '2.0'
  - `result` object
  - `error` object
  - `id` string

---

[API](https://skmtc.dev/andru-ai/apis/andru.md) · [All operations](https://skmtc.dev/andru-ai/apis/andru/llms.txt) · [OpenAPI document](https://skmtc.dev/andru-ai/apis/andru/revisions/c2c34f598d13?raw)
