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
- Log in to the Routy platform at https://platform.routy.app
- Click your profile avatar in the top-right corner of the dashboard
- Select API Tokens from the menu
- Click the Generate button
- Enter a Token Name (2-50 characters) to identify this token (e.g., "Production Integration", "Reporting Script")
- Click Generate
- Your token will be displayed once only. Copy it immediately or download it as a
.txtfile
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="bashcurl --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
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