Routy

Routy API - Authentication Guide

This guide explains how to generate an API token in the Routy platform and use it to authenticate API requests.


Generating an API Token

  1. Log in to the Routy platform at https://platform.routy.app
  2. Click your profile avatar in the top-right corner of the dashboard
  3. Select API Tokens from the menu
  4. Click the Generate button
  5. Enter a Token Name (2-50 characters) to identify this token (e.g., "Production Integration", "Reporting Script")
  6. Click Generate
  7. Your token will be displayed once only. Copy it immediately or download it as a .txt file

Important: You will not be able to view the token again after closing the dialog. Store it securely (e.g., in a password manager or environment variable). If you lose it, you'll need to generate a new one.


Using Your API Token

Authenticate all API requests by including the token in the Authorization header with the ApiKey scheme:

Authorization: ApiKey YOUR_TOKEN_HERE

Example: cURL

bash
curl --location 'https://platform.routy.app/api/v1/accounts' \
  --header 'accept: text/plain' \
  --header 'Authorization: ApiKey OaBw1+4DqFfDLXOLpWthbfp502Wc0D4tICsxNcT+aeQ='

Example: JavaScript (fetch)

javascript
const response = await fetch('https://platform.routy.app/api/v1/accounts', {
  method: 'GET',
  headers: {
    'accept': 'application/json',
    'Authorization': 'ApiKey YOUR_TOKEN_HERE'
  }
});

const data = await response.json();
console.log(data);

Example: Python (requests)

python
import requests

headers = {
    'accept': 'application/json',
    'Authorization': 'ApiKey YOUR_TOKEN_HERE'
}

response = requests.get('https://platform.routy.app/api/v1/accounts', headers=headers)
print(response.json())

Example: Node.js (axios)

javascript
const axios = require('axios');

const response = await axios.get('https://platform.routy.app/api/v1/accounts', {
  headers: {
    'accept': 'application/json',
    'Authorization': 'ApiKey YOUR_TOKEN_HERE'
  }
});

console.log(response.data);

Managing Tokens

From the API Tokens page you can:

  • View all tokens — See token name, who created it, creation date, expiration date, and when it was last used
  • Search — Find tokens by name
  • Filter — Filter by creator, creation date, last used date, expiring soon, or recently used
  • Delete — Remove tokens that are no longer needed (this action is permanent)

Best Practices

  • Never hardcode tokens in source code. Use environment variables instead:
    bash
    export ROUTY_API_KEY="OaBw1+4DqFfDLXOLpWthbfp502Wc0D4tICsxNcT+aeQ="
    
    bash
    curl --location 'https://platform.routy.app/api/v1/accounts' \
      --header 'accept: text/plain' \
      --header "Authorization: ApiKey $ROUTY_API_KEY"
    
  • Use descriptive names when generating tokens so you can identify their purpose later
  • Rotate tokens periodically — Delete old tokens and generate new ones
  • Use one token per integration — If a token is compromised, you only need to replace that one
  • Monitor usage — Check the "Last Used" column to identify unused tokens that should be deleted

Error Responses

HTTP Status Meaning
401 Unauthorized Missing or invalid API token
403 Forbidden Token does not have permission for this resource
429 Too Many Requests Rate limit exceeded — slow down your requests

API Base URL

All API endpoints use the following base URL:

https://platform.routy.app/api

Example full endpoint: https://platform.routy.app/api/v1/accounts