Zuse

Send message

POST/v1/api/workspaces/{workspaceId}/messages

Sends a message to the workspace's agent. A paused workspace resumes automatically. Messages are queued while the agent is busy and handled in order.

AuthorizationBearer <token>

An API key that starts with zk_. Create one in the Zuse app.

In: header

Path Parameters

workspaceId*string

Workspace ID.

Header Parameters

Idempotency-Key?string

Retrying with the same key returns the original result instead of repeating the action. Up to 200 characters.

Lengthlength <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A message for the workspace's agent.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/api/workspaces/workspace_Q2x8mN4pR7sT1vWz/messages" \  -H "Content-Type: application/json" \  -d '{    "text": "Also add a test for the 400 response."  }'
{  "messageId": "msg_k3Jd9sLq2Pz8xVb1Nm4Tr7",  "seq": 5,  "status": "queued",  "resumeTriggered": true}
{  "error": "invalid_api_key",  "detail": "string"}
{  "error": "invalid_api_key",  "detail": "string"}
{  "error": "invalid_api_key",  "detail": "string"}
{  "error": "invalid_api_key",  "detail": "string"}
{  "error": "invalid_api_key",  "detail": "string"}
{  "error": "invalid_api_key",  "detail": "string"}