Creates the carrier and WorkItem offer atomically without changing ownership.
const url = 'https://example.com/v1/m/sessions/handoffs';const options = { method: 'POST', headers: { 'If-Match': 'example', 'Idempotency-Key': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"ack_deadline":"2026-04-15T12:00:00Z","channel_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","expected_owner_epoch":1,"handoff":{"artifact_refs":[{"hash":"example","kind":"example","ref":"example"}],"branch":"example","next_action":"example","risk":"example","sha":"example","summary":"example"},"recipient":{"kind":"user","ref":"example"},"work_item_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/m/sessions/handoffs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Idempotency-Key: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --header 'If-Match: example' \ --data '{ "ack_deadline": "2026-04-15T12:00:00Z", "channel_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "expected_owner_epoch": 1, "handoff": { "artifact_refs": [ { "hash": "example", "kind": "example", "ref": "example" } ], "branch": "example", "next_action": "example", "risk": "example", "sha": "example", "summary": "example" }, "recipient": { "kind": "user", "ref": "example" }, "work_item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Creates the carrier and WorkItem offer atomically without changing ownership.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “ Header Parameters ”Target tenant id; required when the principal can act in more than one tenant.
Current strong WorkItem ETag.
Canonical UUID binding the atomic offer and carrier creation.
Request Body required
Section titled “ Request Body required ”object
object
object
Optional. The git branch the handed-over work is on. A label the sender wrote; the receiver may open a session worktree from it.
Optional. The full git commit id the handed-over work is at (40 or 64 lowercase hex digits). The receiver may open a session worktree at it.
object
Responses
Section titled “ Responses ”Exact handoff offer receipt replay
object
Example generated
{ "audit_seq": 1, "command_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "delivery_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "etag": "example", "event_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "handoff_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "message_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "replayed": true, "state": "example", "version": 1, "work_item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Handoff carrier and offer created
object
Example generated
{ "audit_seq": 1, "command_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "delivery_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "etag": "example", "event_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "handoff_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "message_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "replayed": true, "state": "example", "version": 1, "work_item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Bad request
object
Example generated
{}Unauthenticated
object
Example generated
{}Forbidden
object
Example generated
{}Not found
object
Example generated
{}Conflict
object
Example generated
{}Precondition failed
object
Example generated
{}Required precondition missing
object
Example generated
{}Rate limited
object
Example generated
{}Current authority, custody or store evidence is unavailable; or, with code commit_outcome_unknown, the write was issued and its outcome was never learned, so it may be durable and must not be retried automatically
object
Example generated
{}