handoff
POST /handoff
Put an item in another studio's inbox.
R39, Q23. The item must be readable by the caller, else 404. `to_studio` must be a studio the daemon knows (404) and not the caller (422 `self_handoff`). Writes an inbox row and an `inbox` event to the target; the row lets the target read that item and its asset (Q9). The target need not be installed or running.
Needs the handoff.send capability.
| Go | Send(ctx context.Context, body HandoffRequest) (*Handoff, error) |
|---|---|
| Python | def send(self, body: Dict[str, Any]) -> Any |
| JavaScript | send(body) |
Request body: HandoffRequest (application/json)
| Status | Body | Means |
|---|---|---|
| 201 | Handoff | Delivered to the inbox. |
| 400 | Error | The request is malformed. Codes: `bad_request`, `bad_filter`, `bad_cursor`, `invalid_document`. |
| 401 | Error | No studio token, or a revoked or unknown one. Code `unauthenticated`. |
| 403 | Error | The token lacks a capability (`capability_required`, with `details.capability`), the job is not a task the studio may change (`not_a_task`), or the request came from another origin (`bad_origin`). |
| 404 | Error | Absent, deleted, or not the caller's to see. Code `not_found`. |
| 422 | Error | Well-formed but refused. Codes: `outside_roots`, `cross_device`, `not_a_file`, `unknown_session`, `self_handoff`, `not_launchable`, `blocked`, `not_linkable`. |