POST

/api/pass

Hand off context to another agent.

Request body

task
string

What the next agent should do.

output
object

The result from the previous agent.

context
object

Additional metadata or history.

constraints
string

Rules or boundaries for the next agent.

require_human
boolean

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"
}