Introduction
REST API documentation.
Use this API to manage account balance, rents, number actions, and refunds.
Authentication for protected endpoints is done via `Authorization: Bearer {token}` header.
You can generate token in your profile page after enabling API access.
Authenticating requests
To authenticate requests, include an Authorization header with the value "Bearer {YOUR_API_TOKEN}".
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
Enable API access, then click Generate Token.
API
GotSMS API methods.
Pricelist
Get public pricelist
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/pricelist" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/pricelist"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/pricelist';
$response = $client->get(
$url,
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": [
{
"name": "Telegram",
"plans": [
{
"service_name": "Telegram",
"period": 1,
"period_type": "day",
"period_type_label": "day",
"duration_translation": "1 day",
"price": 1,
"renew_price": 1,
"country": "USA",
"billing_type": "duration"
}
]
},
{
"name": "WhatsApp",
"plans": [
{
"service_name": "WhatsApp",
"period": 1,
"period_type": "month",
"period_type_label": "month",
"duration_translation": "1 month",
"price": 4.99,
"renew_price": 4.99,
"country": "USA",
"billing_type": "duration"
}
]
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Account
Get account balance
requires authentication
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/account" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/account"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/account';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": {
"balance": 125.5
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Services
Get available services
requires authentication
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/services" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/services"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/services';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": [
{
"id": "uuid",
"name": "Telegram"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Rents
Get available rent plans
requires authentication
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/rents/plans" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/rents/plans"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/rents/plans';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": [
{
"id": "uuid",
"service": {
"id": "uuid",
"name": "Telegram"
},
"country": {
"id": "uuid",
"name": "USA"
},
"billing_type": "duration",
"duration_type": "day",
"duration_in_type": 1,
"duration_in_minutes": 1440,
"duration_translation": "1 day",
"price": 1,
"renew_price": 1,
"is_monthly_supported": false
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 25,
"total": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List user rents
requires authentication
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/rents" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/rents"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/rents';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": [
{
"id": "uuid",
"service": {
"id": "uuid",
"name": "Telegram"
},
"plan": {
"id": "uuid",
"billing_type": "duration",
"duration_type": "day",
"duration_in_type": 1,
"duration_translation": "1 day",
"price": 1,
"renew_price": 1
},
"phone": "+1 800 123 4567",
"price": 1,
"status": "active",
"is_included_for_next_renewal": false,
"active_from": "2026-03-11T12:00:00+00:00",
"active_till": "2026-03-12T12:00:00+00:00",
"wake_from": null,
"wake_till": null,
"can_wake_up": true,
"transition_options": []
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create new rent
requires authentication
Example request:
curl --request POST \
"https://app.gotsms.org/api/rents" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"plan_id\": null
}"
const url = new URL(
"https://app.gotsms.org/api/rents"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"plan_id": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/rents';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'plan_id' => null,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (201):
{
"success": true,
"message": "Rent created successfully.",
"data": {
"id": "uuid",
"service": {
"id": "uuid",
"name": "Telegram"
},
"plan": {
"id": "uuid",
"billing_type": "duration",
"duration_type": "day",
"duration_in_type": 1,
"duration_translation": "1 day",
"price": 1,
"renew_price": 1
},
"phone": "+1 800 123 4567",
"price": 1,
"status": "active",
"is_included_for_next_renewal": false,
"active_from": "2026-03-11T12:00:00+00:00",
"active_till": "2026-03-12T12:00:00+00:00",
"wake_from": null,
"wake_till": null,
"can_wake_up": true,
"transition_options": []
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Transition rent to a longer plan
requires authentication
Example request:
curl --request POST \
"https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/transition" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"plan_id\": null
}"
const url = new URL(
"https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/transition"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"plan_id": null
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/transition';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'plan_id' => null,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"message": "Plan transitioned successfully.",
"data": {
"id": "uuid",
"status": "active"
}
}
Example response (422):
{
"success": false,
"message": "Current rent plan must be daily for this transition endpoint."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Toggle auto renewal for monthly tariffs
requires authentication
Example request:
curl --request POST \
"https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/renewal/toggle" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/renewal/toggle"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/renewal/toggle';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"message": "Auto renewal enabled.",
"data": {
"id": "uuid",
"is_included_for_next_renewal": true
}
}
Example response (422):
{
"success": false,
"message": "Auto renewal can be toggled only for monthly 1/3/6/12 plans."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Refund rent
requires authentication
Example request:
curl --request POST \
"https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/refund" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/refund"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/rents/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/refund';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"message": "Rent has been refunded successfully.",
"data": {
"id": "uuid",
"status": "finished"
}
}
Example response (422):
{
"success": false,
"message": "Refund not available for this rent."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Messages
List all SMS messages across all rents
requires authentication
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/messages" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/messages"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/messages';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": [
{
"id": "uuid",
"rent_id": "uuid",
"service": {
"id": "uuid",
"name": "Telegram"
},
"phone": "+1 800 123 4567",
"from": "+18001234567",
"to": "+18009876543",
"body": "Your verification code is 123456",
"code": "123456",
"received_at": "2026-03-11T12:00:00+00:00"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
List unread SMS messages
requires authentication
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/messages/unread" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/messages/unread"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/messages/unread';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": [
{
"id": "uuid",
"rent_id": "uuid",
"service": {
"id": "uuid",
"name": "Telegram"
},
"phone": "+1 800 123 4567",
"from": "+18001234567",
"to": "+18009876543",
"body": "Your verification code is 123456",
"code": "123456",
"received_at": "2026-03-11T12:00:00+00:00"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Numbers
Wake up a rented number
requires authentication
Example request:
curl --request POST \
"https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/wake-up" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/wake-up"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/wake-up';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"message": "Wake up request sent."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get SMS messages for a rent
requires authentication
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/messages" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/messages"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/messages';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": [
{
"id": "uuid",
"from": "+18001234567",
"to": "+18009876543",
"body": "Your verification code is 123456",
"code": "123456",
"received_at": "2026-03-11T12:00:00+00:00"
}
],
"meta": {
"next_before_id": "uuid",
"count": 1
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get number queue/wakeup/online status
requires authentication
Example request:
curl --request GET \
--get "https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/status" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/status"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$url = 'https://app.gotsms.org/api/numbers/9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f/status';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Example response (200):
{
"success": true,
"data": {
"rent_id": "uuid",
"status": "active",
"active_from": "2026-03-11T12:00:00+00:00",
"active_till": "2026-03-12T12:00:00+00:00",
"wake_from": "2026-03-11T12:00:00+00:00",
"wake_till": "2026-03-11T12:05:00+00:00",
"online_till": "2026-03-11T12:35:00+00:00",
"wakeup_time_left_seconds": 120,
"online_time_left_seconds": 1800,
"can_wake_up": false
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.