Delivery · setProjectRouting
Set who is notified of a project's asks
PUT /v1/projects/{id}/routing
Owners only. Routing: notify lists the Owners and Deciders (user ids) notified of the project's asks; null notifies every Owner and Decider (the default). It only changes who is notified: every member still sees the asks in the app and decides them per role. When an ask is sent, the routed members who can't be reached (no delivery on, or holding asks in their quiet hours) are skipped, and if none is left it goes to every Owner and Decider. Escalation: if an ask is still waiting afterMinutes after it was sent, also notify all Owners (to: "owners") or the listed Owners and Deciders (to: "members"), once; shown on the ask (escalation) and in the activity log. Both fields are required; null restores the default. Up to 50 members each.
- Who may call it
- humans: Owners and up
- Server
- https://api.logu.dev
Parameters#
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | required | The project's id (prj_…). · e.g. prj_01K7D9A1C3E5G7J9L1N3Q5S7U9 |
Logu-Workspace | header | string | optional | Humans only: the workspace to act in (default: your personal workspace). Agents always act in their API key's workspace. · e.g. wsp_01K7D7Y8Z0B2D4F6H8K0M2P4R6 |
Request body#
Content type application/json (required).
| Field | Type | Required | Notes |
|---|---|---|---|
notify | string[] | null | required | 1–50 items |
escalation | object | null | required |
{
"notify": [
"Hk9cW2vZpT4mQ6nJ"
],
"escalation": {
"afterMinutes": 30,
"to": "owners"
}
}
Example#
curl -s -X PUT "https://api.logu.dev/v1/projects/prj_01K7D9A1C3E5G7J9L1N3Q5S7U9/routing" \
-H "Authorization: Bearer $LOGU_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"notify":["Hk9cW2vZpT4mQ6nJ"],"escalation":{"afterMinutes":30,"to":"owners"}}'
Responses#
200
The project with its routing.
{
"id": "prj_01K7D9A1C3E5G7J9L1N3Q5S7U9",
"name": "shop",
"muted": false,
"routing": {
"notify": [
"Hk9cW2vZpT4mQ6nJ"
],
"escalation": {
"afterMinutes": 30,
"to": "owners"
}
}
}
Response fields
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | required | |
name | string | required | 1–64 chars · pattern ^[a-z0-9][a-z0-9._-]*$ |
muted | boolean | required | |
routing | object | optional | |
routing.notify | string[] | null | required | |
routing.escalation | object | null | required |
Errors#
Every error is {"error":{"code","message","hint","docUrl","requestId"}}: branch on code. See Errors.
| Status | Code | Meaning |
|---|---|---|
| 400 | bad_request | The request is malformed or a field is invalid (see issues). |
| 400 | unknown_field | The body has a field the endpoint doesn't know (often a typo or snake_case). |
| 401 | unauthorized | No credentials, or the API key or session is invalid or revoked. |
| 403 | forbidden | The caller is authenticated but may not do this (wrong role, or an API key on a human-only endpoint). |
| 404 | not_found | No such route, or the resource doesn't exist in your workspace. |
| 500 | internal_error | Something went wrong on Logu's side. |