POST
/api/pass
Hand off context to another agent.
Request body
taskstring
What the next agent should do.
outputobject
The result from the previous agent.
contextobject
Additional metadata or history.
constraintsstring
Rules or boundaries for the next agent.
require_humanboolean
Require human approval before catch. Defaults to false.
Example
Code
curl -X POST https://b4ton.sh/api/pass \
-H "Authorization: Bearer baton_abc123..." \
-H "Content-Type: application/json" \
-d '{
"task": "Review this draft email",
"output": { "draft": "Hello..." },
"context": { "tone": "professional" }
}'Response
Code
{
"baton_id": "abc-123",
"pickup_url": "https://b4ton.sh/api/catch/abc-123",
"status": "pending",
"created_at": "2026-03-17T12:00:00Z",
"expires_at": "2026-03-18T12:00:00Z"
}