Authentication
Requires an API key.
Path parameters
The ID of the session to update.
Query parameters
The ID of the organization the session belongs to. Optional when using an API key.
Request body
All fields are optional — only include the fields you want to update.
New title for the session.
New status. One of active, completed, or failed.
Response
The updated session object. See List Sessions for the full schema.
Example
curl -X PATCH "https://magnet.run/api/sessions/cm3abc123def" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Signup form validation (email + password)"
}'
Response
{
"session": {
"id": "cm3abc123def",
"title": "Signup form validation (email + password)",
"status": "completed",
"createdAt": "2026-02-10T14:30:00.000Z",
"updatedAt": "2026-02-11T09:15:00.000Z",
"model": "claude-opus-4-6",
"author": {
"id": "user_123",
"name": "Alice Chen"
},
"metadata": {
"repository": "acme/web-app",
"prNumber": 42,
"prUrl": "https://github.com/acme/web-app/pull/42",
"prStatus": "open"
},
"messageCount": 12
}
}
Errors
| Status | Description |
|---|
400 | Invalid request body |
401 | Invalid or missing authentication |
403 | No access to the specified organization |
404 | Session not found |
500 | Server error |