> ## Documentation Index
> Fetch the complete documentation index at: https://omni.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# PATCH /v1/routes/{route_id}

> Change a route's name, its steps or whether it is the default.

Changes a route. Only what the body gives changes; `steps`, when given, replace all of them. Messages already under way keep the steps they started with.

<Note>Needs the `routes:write` scope.</Note>

## Path parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `route_id` | string | Yes | The route's id. |

## Body

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `name` | string | No | Up to 100 characters, unique on the account. |
| `steps` | array | No | 1 to 6 steps, replacing the current ones. |
| `default` | boolean | No | True makes it the default (and unsets the previous one). |

Each step is `{"channel", "succeed_on", "within"}`: `channel` is `sms`, `whatsapp`, `rcs` or `firetone` (Voice) — the channels your account has; `succeed_on` is `sent`, `delivered` (the default), `read` or `answered` — only what that channel reports (SMS reports delivery, WhatsApp and RCS delivery and reads, Voice whether the call was answered); `within` is how many seconds to wait for it, from 30 to 604800 (default 900). A route has 1 to 6 steps.

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.fireflo.au/v1/routes/b1d6e0a4-2f3c-4a5b-8e9d-7c6f5a4b3e21 \
    -H "Authorization: Bearer $OMNI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "steps": [
        {
          "channel": "whatsapp",
          "succeed_on": "delivered",
          "within": 300
        },
        {
          "channel": "sms",
          "succeed_on": "delivered",
          "within": 900
        }
      ]
    }'
  ```

  ```python Python theme={null}
  import os

  import requests

  response = requests.patch(
      "https://api.fireflo.au/v1/routes/b1d6e0a4-2f3c-4a5b-8e9d-7c6f5a4b3e21",
      headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
      json={
          "steps": [
              {
                  "channel": "whatsapp",
                  "succeed_on": "delivered",
                  "within": 300,
              },
              {
                  "channel": "sms",
                  "succeed_on": "delivered",
                  "within": 900,
              },
          ],
      },
  )
  print(response.status_code, response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch("https://api.fireflo.au/v1/routes/b1d6e0a4-2f3c-4a5b-8e9d-7c6f5a4b3e21", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "steps": [
        {
          "channel": "whatsapp",
          "succeed_on": "delivered",
          "within": 300
        },
        {
          "channel": "sms",
          "succeed_on": "delivered",
          "within": 900
        }
      ]
    }),
  });
  console.log(response.status, await response.json());
  ```
</CodeGroup>

## Response

`200 OK`

```json theme={null}
{
  "id": "b1d6e0a4-2f3c-4a5b-8e9d-7c6f5a4b3e21",
  "name": "whatsapp-then-sms",
  "steps": [
    {
      "channel": "whatsapp",
      "succeed_on": "delivered",
      "within": 300
    },
    {
      "channel": "sms",
      "succeed_on": "delivered",
      "within": 900
    }
  ],
  "default": true,
  "updated": "2026-10-05T09:14:22.413Z"
}
```

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 404 | `not_found` | No route has that id on this account. |
| 400 | `invalid_request` | The name is missing, or a step is wrong (`field` is `name` or `steps`). |
| 409 | `name_taken` | Another route has that name. |
| 400 | `invalid_json` | The body isn't valid JSON. |
| 403 | `scope_missing` | The key doesn't have the `routes:write` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](/api-reference/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.