Building a webhook integration? Read the webhook guide for signatures, retries, event schemas, and troubleshooting.
apiHosted AI, explicit consent

Send agent chat message

POST /api/agents/conversations

Attach bounded page IDs with surfaceContext for contextual work. Context is validated at acceptance and inherited by delegated work. Send a message to an exact private Agent Teams chat from list-agent-chats. Defaults to external_agent: claim the returned turn, reason with your current coding-agent model, use Pipeline tools for real work, then complete-agent-chat-turn to save the reply in the UI. No workspace model key or hosted inference is required. Explicit pipeline_hosted mode uses chat model settings and requires hosted-AI consent. Reuse the idempotencyKey only for retries of the same message. Read get-agent-chat for progress and results.

Parameters

workspaceId
string
No description.
action
string
No description.
send
conversationIdrequired
string
No description.
textrequired
string
No description.
idempotencyKeyrequired
string
No description.
executionMode
string
No description.
external_agent | pipeline_hosted
references
object[]
No description.
surfaceContext
unknown
No description.
planIntent
object
No description.
selectedSkill
object
No description.
allowHostedAi
boolean
Must be true when this operation uses Pipeline hosted inference.

Example

REST requestbash
curl -X POST "https://app.pipeline.help/api/agents/conversations" \
-H "Authorization: Bearer $PIPELINE_API_KEY" \
-H "X-Pipeline-Execution-Policy: hosted-enabled" \
-H "Content-Type: application/json" \
-d '{"conversationId":"00000000-0000-4000-8000-000000000000","text":"example","idempotencyKey":"example1","allowHostedAi":true}'

Response

Success response schemajson schema
{
"type": "object",
"properties": {
"message": {
"type": "object"
},
"turns": {
"type": "array",
"items": {
"type": "object"
}
}
},
"required": [
"message",
"turns"
]
}

HTTP errors

401
Missing or invalid API key.
403
Authenticated but not permitted for the workspace or resource.
404
The requested resource was not found.
Pipeline REST API reference | Pipeline