Subscriber Management API
This guide explains how to manage subscribers (end-users or agents) in your application using Exotel’s Client SDK. These APIs let you create, update, fetch, and delete subscriber accounts that are used for WebRTC/VoIP calling.
Base URL:
1. Create Subscribers
Create one or more subscribers in a single request (up to 25 subscribers at a time).
Endpoint:
POST /subscribers
Request Body Example:
{
"subscribers": [
{
"user_name": "alice",
"password": "********",
"email": "[email protected]"
},
{
"user_name": "bob",
"password": "********",
"email": "[email protected]"
}
]
}
Response Example:
{
"request_id": "22c70a0c46414af9b7136491c31f95a6",
"method": "POST",
"http_code": 200,
"metadata": {
"total": 2,
"success": 2
},
"response": [
{
"code": 200,
"status": "success",
"data": {
"user_name": "alice",
"date_created": "2023-06-05T09:32:49Z",
"date_updated": "2023-06-05T09:32:49Z",
"email": "[email protected]",
"domain": "<accountSid>.voip.exotel.com",
"status": "inactive",
"display_name": null,
"dc_id": null
}
},
{
"code": 200,
"status": "success",
"data": {
"user_name": "bob",
"date_created": "2023-06-05T09:32:49Z",
"date_updated": "2023-06-05T09:32:49Z",
"email": "[email protected]",
"domain": "<accountSid>.voip.exotel.com",
"status": "inactive",
"display_name": null,
"dc_id": null
}
}
]
}
2. Get Subscriber Details
Fetch details of subscribers by username or list with pagination.
Endpoint:
GET /subscribers
Query Parameters:
- user_name (optional, comma separated)
- offset (default 0)
- page_size (default 250, max 250)
Sample Request:
GET /subscribers?user_name=alice,bob&offset=0&page_size=250
Response Example:
{
"request_id": "f293bfb68b6e4a74a0f3bab31946c59b",
"method": "GET",
"http_code": 200,
"metadata": {
"page_size": 250,
"first_page_uri": "/v2/accounts/<accountSid>/subscribers?offset=0&page_size=250&user_name=alice,bob",
"prev_page_uri": null,
"next_page_uri": null
},
"response": [
{
"code": 200,
"status": "success",
"data": {
"user_name": "alice",
"date_created": "2023-06-05T09:32:49Z",
"date_updated": "2023-06-05T09:32:49Z",
"email": "[email protected]",
"domain": "<accountSid>.voip.exotel.com",
"status": "inactive",
"display_name": null,
"dc_id": null
}
},
{
"code": 200,
"status": "success",
"data": {
"user_name": "bob",
"date_created": "2023-06-05T09:32:49Z",
"date_updated": "2023-06-05T09:32:49Z",
"email": "[email protected]",
"domain": "<accountSid>.voip.exotel.com",
"status": "inactive",
"display_name": null,
"dc_id": null
}
}
]
}3. Update Subscriber
Update details for a single subscriber.
Endpoint:
PUT /subscribers/{user_name}
Request Body Example:
{
"password": "NewStrongPass@123",
"email": "[email protected]"
}Response Example:
{
"request_id": "e6b64e1460ac467a9680a8967ba4b4eb",
"method": "PUT",
"http_code": 200,
"response": {
"code": 200,
"status": "success",
"data": {
"user_name": "alice",
"date_created": "2023-06-05T09:32:49Z",
"date_updated": "2023-06-05T09:55:10Z",
"email": "[email protected]",
"domain": "<accountSid>.voip.exotel.com",
"status": "inactive",
"display_name": null,
"dc_id": null
}
}
}
4. Delete Subscribers
Delete up to 50 subscribers in a single request.
Endpoint:
DELETE /subscribers?user_name=alice,bob
Response Example:
{
"request_id": "7c004e095c8e4ae5b32e2244a7a1fef8",
"method": "DELETE",
"http_code": 200,
"metadata": {
"total": 2,
"success": 2
},
"response": [
{
"code": 200,
"status": "success",
"data": {
"user_name": "alice",
"date_created": "2023-06-05T09:32:49Z",
"date_updated": "2023-06-05T09:32:49Z",
"email": "[email protected]",
"domain": "<accountSid>.voip.exotel.com",
"status": "inactive",
"display_name": null,
"dc_id": null
}
},
{
"code": 200,
"status": "success",
"data": {
"user_name": "bob",
"date_created": "2023-06-05T09:32:49Z",
"date_updated": "2023-06-05T09:55:10Z",
"email": "[email protected]",
"domain": "<accountSid>.voip.exotel.com",
"status": "inactive",
"display_name": null,
"dc_id": null
}
}
]
}Additional Notes
- Subscribers are required for WebRTC SDK login & registration.
- Default subscriber status is inactive until first SDK registration.
- Bulk limits: 25 on create, 50 on delete.
- Use strong passwords and rotate them periodically.
- Subscriber domain always follows: <accountSid>.voip.exotel.com