---
title: "Create a new A2A task for an agent"
method: POST
path: "/a2a/agents/{agentId}/tasks"
tags: ["a2a"]
---

# Create a new A2A task for an agent

`POST /a2a/agents/{agentId}/tasks`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/a2a/agents/{agentId}/tasks`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

## Path parameters

- `agentId` string, required

## Request body

- object
  - `input` object, required
    - `query` string, required
    - `context` object
    - `preferredOutputMode` string
  - `callerAgentId` string
  - `callerPlatform` string

## Response `202`

Task accepted

- A2ATask
  - `taskId` string
  - `agentId` string
  - `status` 'pending' | 'running' | 'completed' | 'failed'
  - `input` object
  - `output` string, nullable
  - `error` string, nullable
  - `callerAgentId` string, nullable
  - `callerPlatform` string, nullable
  - `createdAt` string, date-time
  - `completedAt` string, date-time, nullable

## Other responses

- `400`: Bad Request
- `404`: Not Found

## Changes

- **2026-04-18** `518dcf68679a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/changes/a2a/agents/:agentId/tasks/post.md)

---

[API](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api.md) - [All operations](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/llms.txt) - [OpenAPI document](https://skmtc.dev/szl-holdings/apis/szl-holdings-dreamstack-api/revisions/6ad730b13e59?raw)
