Quickstart
This guide will get you all set up and ready to use the Tether API. We will cover how to authenticate using JWT tokens and how to make your first API request. We will also look at where to go next to find all the information you need to take full advantage of our REST API.
Before you can make requests to the Tether API, you will need valid credentials. Contact your administrator or sign up at the Tether dashboard to get started.
Authentication
Tether uses JWT (JSON Web Token) authentication. First, obtain a token by logging in with your credentials:
Login Request
curl -X POST https://your-tether-instance.com/api/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "your-email@example.com",
"password": "your-password"
}'
Response
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"user": {
"id": "507f1f77bcf86cd799439011",
"email": "your-email@example.com",
"fullName": "John Doe",
"organizationId": "507f1f77bcf86cd799439012",
"accessRole": "ADMIN"
}
}
Making your first API request
After obtaining your JWT token, you can make authenticated requests to any endpoint. Include the token in the Authorization header with the Bearer prefix.
Below is an example of how to list your contacts:
Request
curl -G https://your-tether-instance.com/api/contacts \
-H "Authorization: Bearer {your-token}" \
-d page=1 \
-d size=10
Response
{
"data": [
{
"isBulkSms": false,
"_id": "507f1f77bcf86cd799439011",
"userId": "507f1f77bcf86cd799439013",
"organizationId": "507f1f77bcf86cd799439012",
"firstName": "Jane",
"lastName": "Smith",
"phoneNumber": "+1234567890",
"status": "New Lead",
"isUpdated": false,
"email": "jane.smith@example.com",
"createdBy": {
"_id": "507f1f77bcf86cd799439013",
"fullName": "Super Admin"
},
"assignees": ["507f1f77bcf86cd799439013"],
"channelTypes": ["sms"],
"process": "Sales Agent",
"isAutopilot": false,
"source": "CSV Upload",
"files": [],
"lastMessageTime": "2025-01-15T10:30:00.000Z",
"__v": 0,
"createdAt": "2025-01-15T10:30:00.000Z",
"updatedAt": "2025-01-15T10:30:00.000Z",
"latestMessage": "507f1f77bcf86cd799439014"
},
{
"isBulkSms": false,
"_id": "507f1f77bcf86cd799439015",
"userId": "507f1f77bcf86cd799439013",
"organizationId": "507f1f77bcf86cd799439012",
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+1987654321",
"status": "New Lead",
"isUpdated": false,
"email": "john.doe@example.com",
"createdBy": {
"_id": "507f1f77bcf86cd799439013",
"fullName": "Super Admin"
},
"assignees": ["507f1f77bcf86cd799439013"],
"channelTypes": ["sms"],
"process": "Sales Agent",
"isAutopilot": false,
"source": "CSV Upload",
"files": [],
"lastMessageTime": "2025-01-15T10:25:00.000Z",
"__v": 0,
"createdAt": "2025-01-15T10:25:00.000Z",
"updatedAt": "2025-01-15T10:25:00.000Z",
"latestMessage": "507f1f77bcf86cd799439016"
}
// ... 8 more entries
],
"total": 150
}
Base URL
The Tether API base URL depends on your deployment:
- Cloud: Contact Tether support for your instance URL based on your vertical
All endpoints are prefixed with /api. For example, the contacts endpoint is /api/contacts.
What is next?
Great, you are now set up and have made your first request to the API. Here are a few links that might be handy as you venture further into the Tether API: