Reten Docs

Update Route

Update a route's fields.

PATCH /api/routes/:id

Update a route's fields.

Auth: Required — route:manage permission

Path Parameters

ParameterTypeDescription
idUUIDRoute ID

Request Body

All fields are optional:

FieldTypeDescription
codestringRoute code (unique per tenant)
namestringRoute name
is_activebooleanActive status

Example

curl -X PATCH https://api.reten.ai/api/routes/dd0e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "North Zone Extended"
  }'
const routeId = "dd0e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`https://api.reten.ai/api/routes/${routeId}`, {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer <token>",
    "x-tenant-id": "<tenant-id>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ name: "North Zone Extended" }),
});
const route = await response.json();
import requests

route_id = "dd0e8400-e29b-41d4-a716-446655440000"
response = requests.patch(
    f"https://api.reten.ai/api/routes/{route_id}",
    headers={
        "Authorization": "Bearer <token>",
        "x-tenant-id": "<tenant-id>",
    },
    json={"name": "North Zone Extended"},
)
route = response.json()

Response 200 OK

Returns the updated route object.