Skip to main content
POST
/
oauth2
/
token
curl --location --request POST 'https://travtus-api.auth.us-east-2.amazoncognito.com/oauth2/token' \
--header 'Content-Type:application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<client-id>' \
--data-urlencode 'client_secret=<client-secret>'
{"access_token":"eyJraWQiOiJzXC9jaDliOVJcL1FwM1lzamQ4cFA1aXRodjJENkxoY1lqSFp4YVE4cFVXNmM9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIzaDc5aGs0c29mdXNiM2Z0Z25rMTMzZzBqNCIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoidHJhdnR1cy1hcGlcL2tub3dsZWRnZS1ncmFwaCIsImF1dGhfdGltZSI6MTcwNTQ4ODc5OCwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMi5hbWF6b25hd3MuY29tXC91cy1lYXN0LTJfa21KUXNXQVJKIiwiZXhwIjoxNzA1NDkyMzk4LCJpYXQiOjE3MDU0ODg3OTgsInZlcnNpb24iOjIsImp0aSI6Ijc4OGU5MGIxLTBjYjMtNGRhYi04ZTcxLTY1MTBmZWJjOWMzNiIsImNsaWVudF9pZCI6IjNoNzloazRzb2Z1c2IzZnRnbmsxMzNnMGo0In0.ig8jULH9Y01bvFtUAR_XJO5ljR60mo3XdFXiA58qbNpKSNwvJx1tqpLLOSYTG19O_ZrPBpOAT-kPPlYyL9mqacQvybr_CeWkFp_9WuQP8zSEvrDbg7_jwXN4JYSItEVc_NSs2PArUhYEB_gkOOSs814-DO726L6hUr3R6rn1Wk3bz-KU--U9gI9xh0cvQ0RGD1bCryTAG9qSmrz0LR8Dw96jrCPU0Sgv57gXvJ8M1Z-7oa8ajnwfRJaRGQired8coOt9mFiYPjR5GJWW5QCPELpOTKFJRWfi5nc9vvyKLJgdPeGqQyqruj_bBgA7b9hkwePbpNPRt6f9WVl11ip12w","expires_in":3600,"token_type":"Bearer"}
Travtus API uses token authentication. All API calls must include the following header:
'Authorization': 'Bearer <team_token>'

Query Parameters

client_id
string
Your API client_id.
client_secret
string
Your API client_secret.
grant_type
string
Must be client_credentials.

Response

access_token
string
The token you will need to use in order to access any other API endpoints.
expires_in
integer
Token expiry time in seconds. The access token is valid for 3600 seconds (60 minutes). Once it expires, request a new access token using the same client credentials.
curl --location --request POST 'https://travtus-api.auth.us-east-2.amazoncognito.com/oauth2/token' \
--header 'Content-Type:application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=<client-id>' \
--data-urlencode 'client_secret=<client-secret>'
{"access_token":"eyJraWQiOiJzXC9jaDliOVJcL1FwM1lzamQ4cFA1aXRodjJENkxoY1lqSFp4YVE4cFVXNmM9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIzaDc5aGs0c29mdXNiM2Z0Z25rMTMzZzBqNCIsInRva2VuX3VzZSI6ImFjY2VzcyIsInNjb3BlIjoidHJhdnR1cy1hcGlcL2tub3dsZWRnZS1ncmFwaCIsImF1dGhfdGltZSI6MTcwNTQ4ODc5OCwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMi5hbWF6b25hd3MuY29tXC91cy1lYXN0LTJfa21KUXNXQVJKIiwiZXhwIjoxNzA1NDkyMzk4LCJpYXQiOjE3MDU0ODg3OTgsInZlcnNpb24iOjIsImp0aSI6Ijc4OGU5MGIxLTBjYjMtNGRhYi04ZTcxLTY1MTBmZWJjOWMzNiIsImNsaWVudF9pZCI6IjNoNzloazRzb2Z1c2IzZnRnbmsxMzNnMGo0In0.ig8jULH9Y01bvFtUAR_XJO5ljR60mo3XdFXiA58qbNpKSNwvJx1tqpLLOSYTG19O_ZrPBpOAT-kPPlYyL9mqacQvybr_CeWkFp_9WuQP8zSEvrDbg7_jwXN4JYSItEVc_NSs2PArUhYEB_gkOOSs814-DO726L6hUr3R6rn1Wk3bz-KU--U9gI9xh0cvQ0RGD1bCryTAG9qSmrz0LR8Dw96jrCPU0Sgv57gXvJ8M1Z-7oa8ajnwfRJaRGQired8coOt9mFiYPjR5GJWW5QCPELpOTKFJRWfi5nc9vvyKLJgdPeGqQyqruj_bBgA7b9hkwePbpNPRt6f9WVl11ip12w","expires_in":3600,"token_type":"Bearer"}

Using the Token

The bearer token is valid for 60 minutes (3600 seconds). Once it expires, you must re-authenticate to obtain a new token before making further API calls.
Use the access_token from the authentication response as a Bearer token in the Authorization header of all subsequent API requests.
import requests
import json

url = "https://api.travtus.com/messages/"

payload = json.dumps({
  "channel": "email",
  "group_external_ref": "<community-external-ref>",
  "first_name": "First",
  "last_name": "Last",
  "email": {
    "source": "<source>",
    "message_id": "<message-id>",
    "text": "<message-text>",
    "created_datetime": "2025-06-27T16:45:13.000000",
    "from_email_address": "<from-email>",
    "to_email_addresses": "<to-email>",
    "subject": "<subject>",
    "conversation_id": "<conversation-id>",
    "references": []
  }
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer <access_token>'
}

response = requests.post(url, headers=headers, data=payload)
print(response.text)

Rate Limiting

The Travtus API enforces rate limits to ensure platform stability and fair usage across all clients.

Limits

The current rate limits are:
  • Burst limit: 5,000 requests
  • Sustained rate: 10,000 requests per second
The burst limit allows short spikes in traffic, while the sustained rate applies to ongoing request volume.

How rate limiting is applied

  • Rate limits are enforced at the API gateway level.
  • Requests exceeding either the burst or sustained rate may be rejected.
  • Limits apply per client and per API key.

Exceeding limits

If a request exceeds the configured rate limits, the API will respond with an HTTP 429 Too Many Requests status code. Clients should implement appropriate retry logic with backoff when receiving a 429 response.