Delete Route

Deletes a route in Cortado.js by its unique ID. Removes route and configuration.

DELETE

DELETE

https://api.cortado.com/v1/routing/{route_id}

Request

No body required. Route ID passed in path. Authentication is required to ensure the user’s permission.

Parameters

Parameters

Type

Description

route_id

string

Unique identifier of the route

label

string

Bearer token for authentication

Based on the steps above, your code might look something like this. It brings together the key concepts covered — from setup and configuration to routing, authentication, or event handling. Feel free to adapt it to suit your specific use case.

main.ts

import axios from 'axios';

async function deleteRoute(routeId: string) {
  const res = await axios.delete(`https://api.cortado.com/v1/routing/${routeId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
    },
  });

  return res.data;
}

main.ts

import axios from 'axios';

async function deleteRoute(routeId: string) {
  const res = await axios.delete(`https://api.cortado.com/v1/routing/${routeId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
    },
  });

  return res.data;
}

main.ts

import axios from 'axios';

async function deleteRoute(routeId: string) {
  const res = await axios.delete(`https://api.cortado.com/v1/routing/${routeId}`, {
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
    },
  });

  return res.data;
}

Response

Returns confirmation message on successful deletion or error if unauthorized/not found.

main.ts

{
  "success": true,
  "message": "Route route_123abc has been deleted."
}

main.ts

{
  "success": true,
  "message": "Route route_123abc has been deleted."
}

main.ts

{
  "success": true,
  "message": "Route route_123abc has been deleted."
}

Was this helpful?

Dismiss

Was this helpful?

Dismiss

Last updated on

Jul 27, 2025