gosimless API
The gosimless API lets wholesale partners provision and manage virtual numbers through code. Buy numbers on demand, update forwarding and connection settings, and push status or SMS events into your own systems. It is free for partners. Use it to power a reseller product, an internal ops tool, or an automated pipeline without working in the partner portal UI.
| Item | Detail |
|---|---|
| Who can use it | Wholesale partners with an active partner account |
| Cost | Free for wholesale partners |
| Scope | Virtual numbers (not eSIM plans) |
| Partner portal | partners.gosimless.com |
| Developer docs | api.gosimless.com/docs |
| Typical actions | Provision numbers, manage connections, sync status into your own systems |
API developer docs
The API docs explain what the API can do, how authentication works, and how requests and responses are shaped. Use them to build a clear picture of the API and start building quickly.
gosimless API docs
The gosimless API gives you programmatic access to your account where you can provision virtual numbers, manage your inventory, and query billing data. Anything you can do through the UI can be done through the API.
API reference basics
- Base URL:
https://api.gosimless.com/v1 - Authentication: every request needs an
Authorization: Bearer gsk_<api_key>header. Get yours through the partner portal. - Rate limits: 100 requests/minute. Use webhooks instead of polling to avoid hitting rate limits.
- Versioning: the API version lives in the base URL (for example
/v1,/v2,/v2.02). Call the version you integrate against so later releases do not break your app. - Pagination: list endpoints use ranges. Send a
rangeon the request to choose which records you need (indexes start at0). The response returns aContent-Rangeheader such as0-19/100- the first 20 results out of 100 total. - Response codes: all responses use standard HTTP status codes. Error responses return JSON with
errorand human-readablemessagefields.
| Status | error code | Meaning |
|---|---|---|
| 200 | - | Success |
| 201 | - | Success, resource created |
| 400 | validation_error | Request body failed schema validation |
| 400 | invalid_request | Specific field or parameter problem |
| 401 | unauthorized | Missing or invalid API key |
| 402 | insufficient_balance | Insufficient account balance |
| 403 | forbidden | API key lacks the required permission |
| 403 | account_suspended | Partner account is suspended |
| 404 | not_found | Resource not found |
| 405 | method_not_allowed | HTTP method not supported on this endpoint |
| 409 | conflict | State conflict (e.g. duplicate email) |
| 500 | internal_error | Unexpected server error |
| 503 | service_unavailable | Number provisioning unavailable |
{
"error": "code",
"message": "Human-readable details"
}
API use cases
Partners use the gosimless API in two ways. Business use cases are the outcomes you build for, such as reseller application or workflow automation. Functional use cases are the concrete API operations those outcomes rely on, such as number provisioning and data gathering.
Business use cases
Most partner integrations fall into one of these outcomes:
- Resell virtual numbers: provision and assign gosimless numbers to your own customers through your checkout or admin tools.
- Embed numbers in your product: add virtual numbers to an existing product or service, or offer them as an add-on.
- Build internal tools: run ops dashboards, scripts, and pipelines that manage large volumes of numbers.
- Automate workflows: replace repeated portal steps with API calls for provisioning, updates, releases, and syncing status into your CRM or billing stack.
Functional examples
These examples show common virtual number operations in curl, Nuxt, Next.js, PHP, and Ruby. Replace gsk_<api_key> with your partner API key. Full schemas live in the API docs.
Authenticate a request
Every call needs a Bearer token. GET /account is a simple first check:
curl https://api.gosimless.com/v1/account \
-H "Authorization: Bearer gsk_<api_key>"
const account = await $fetch('https://api.gosimless.com/v1/account', {
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
})
const res = await fetch('https://api.gosimless.com/v1/account', {
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
})
const account = await res.json()
$ch = curl_init('https://api.gosimless.com/v1/account');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('GOSIMLESS_API_KEY'),
],
]);
$account = json_decode(curl_exec($ch), true);
curl_close($ch);
require 'net/http'
require 'json'
uri = URI('https://api.gosimless.com/v1/account')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = "Bearer #{ENV['GOSIMLESS_API_KEY']}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
account = JSON.parse(res.body)
Example 200 response:
{
"id": "prt_VrZQBDMF49svL9NRUQXTEw",
"balance_cents": 7750,
"email_notifications": true,
"messages_webhook_url": "https://example.com/webhooks/sms",
"profile_data": null
}
Provision UK mobile numbers
POST /numbers buys one or more GB mobile numbers from your partner balance (numbers:write required):
curl -X POST https://api.gosimless.com/v1/numbers \
-H "Authorization: Bearer gsk_<api_key>" \
-H "Content-Type: application/json" \
-d '{
"type": "mobile",
"country": "GB",
"amount": 1,
"messages_webhook_url": "https://example.com/webhooks/sms",
"metadata": {
"customer_id": "cust_1234",
"campaign": "launch"
}
}'
const numbers = await $fetch('https://api.gosimless.com/v1/numbers', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
body: {
type: 'mobile',
country: 'GB',
amount: 1,
messages_webhook_url: 'https://example.com/webhooks/sms',
metadata: {
customer_id: 'cust_1234',
campaign: 'launch',
},
},
})
const res = await fetch('https://api.gosimless.com/v1/numbers', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
type: 'mobile',
country: 'GB',
amount: 1,
messages_webhook_url: 'https://example.com/webhooks/sms',
metadata: {
customer_id: 'cust_1234',
campaign: 'launch',
},
}),
})
const numbers = await res.json()
$ch = curl_init('https://api.gosimless.com/v1/numbers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('GOSIMLESS_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'type' => 'mobile',
'country' => 'GB',
'amount' => 1,
'messages_webhook_url' => 'https://example.com/webhooks/sms',
'metadata' => [
'customer_id' => 'cust_1234',
'campaign' => 'launch',
],
]),
]);
$numbers = json_decode(curl_exec($ch), true);
curl_close($ch);
require 'net/http'
require 'json'
uri = URI('https://api.gosimless.com/v1/numbers')
req = Net::HTTP::Post.new(uri)
req['Authorization'] = "Bearer #{ENV['GOSIMLESS_API_KEY']}"
req['Content-Type'] = 'application/json'
req.body = {
type: 'mobile',
country: 'GB',
amount: 1,
messages_webhook_url: 'https://example.com/webhooks/sms',
metadata: {
customer_id: 'cust_1234',
campaign: 'launch',
},
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
numbers = JSON.parse(res.body)
Example 201 response:
[
{
"id": "num_9W4kFx2mR8pLqT6v",
"phone_number": "+447911123001",
"country": "GB",
"number_type": "mobile",
"status": "active",
"monthly_cost_cents": 599,
"messages_webhook_url": "https://example.com/webhooks/sms",
"created_at": "2026-03-01T12:00:00.000Z",
"released_at": null,
"renewal_at": "2026-04-01T12:00:00.000Z",
"metadata": {
"customer_id": "cust_1234",
"campaign": "launch"
}
}
]
List numbers (with pagination)
GET /numbers supports filters and a range query (start-end, zero-based). Check Content-Range on the response (for example 0-19/100):
curl "https://api.gosimless.com/v1/numbers?status=active&range=0-19" \
-H "Authorization: Bearer gsk_<api_key>" \
-i
const numbers = await $fetch('https://api.gosimless.com/v1/numbers', {
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
query: {
status: 'active',
range: '0-19',
},
})
const res = await fetch(
'https://api.gosimless.com/v1/numbers?status=active&range=0-19',
{
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
},
)
const contentRange = res.headers.get('Content-Range') // e.g. "0-19/100"
const numbers = await res.json()
$ch = curl_init('https://api.gosimless.com/v1/numbers?status=active&range=0-19');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('GOSIMLESS_API_KEY'),
],
]);
$response = curl_exec($ch);
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
curl_close($ch);
$contentRange = null; // parse from response headers, e.g. "0-19/100"
$numbers = json_decode(substr($response, $headerSize), true);
require 'net/http'
require 'json'
uri = URI('https://api.gosimless.com/v1/numbers?status=active&range=0-19')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = "Bearer #{ENV['GOSIMLESS_API_KEY']}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
content_range = res['Content-Range'] # e.g. "0-19/100"
numbers = JSON.parse(res.body)
Example 200 response (Content-Range: 0-0/1):
[
{
"id": "num_9W4kFx2mR8pLqT6v",
"phone_number": "+447911123001",
"country": "GB",
"number_type": "mobile",
"status": "active",
"monthly_cost_cents": 599,
"messages_webhook_url": "https://example.com/webhooks/sms",
"created_at": "2026-03-01T12:00:00.000Z",
"released_at": null,
"renewal_at": "2026-04-01T12:00:00.000Z",
"metadata": {
"customer_id": "cust_1234",
"campaign": "launch"
}
}
]
Get a single number
curl https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v \
-H "Authorization: Bearer gsk_<api_key>"
const number = await $fetch(
'https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v',
{
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
},
)
const res = await fetch(
'https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v',
{
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
},
)
const number = await res.json()
$ch = curl_init('https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('GOSIMLESS_API_KEY'),
],
]);
$number = json_decode(curl_exec($ch), true);
curl_close($ch);
require 'net/http'
require 'json'
uri = URI('https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = "Bearer #{ENV['GOSIMLESS_API_KEY']}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
number = JSON.parse(res.body)
Example 200 response:
{
"id": "num_9W4kFx2mR8pLqT6v",
"phone_number": "+447911123001",
"country": "GB",
"number_type": "mobile",
"status": "active",
"monthly_cost_cents": 599,
"messages_webhook_url": "https://example.com/webhooks/sms",
"created_at": "2026-03-01T12:00:00.000Z",
"released_at": null,
"renewal_at": "2026-04-01T12:00:00.000Z",
"metadata": {
"customer_id": "cust_1234",
"campaign": "launch"
}
}
Update metadata or SMS webhook
POST /numbers/{numberId} updates an active number. Pass at least one of metadata or messages_webhook_url:
curl -X POST https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v \
-H "Authorization: Bearer gsk_<api_key>" \
-H "Content-Type: application/json" \
-d '{
"metadata": {
"customer_id": "cust_1234",
"campaign": "summer_promo"
},
"messages_webhook_url": "https://example.com/webhooks/sms"
}'
const number = await $fetch(
'https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v',
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
body: {
metadata: {
customer_id: 'cust_1234',
campaign: 'summer_promo',
},
messages_webhook_url: 'https://example.com/webhooks/sms',
},
},
)
const res = await fetch(
'https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v',
{
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
metadata: {
customer_id: 'cust_1234',
campaign: 'summer_promo',
},
messages_webhook_url: 'https://example.com/webhooks/sms',
}),
},
)
const number = await res.json()
$ch = curl_init('https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('GOSIMLESS_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
'customer_id' => 'cust_1234',
'campaign' => 'summer_promo',
],
'messages_webhook_url' => 'https://example.com/webhooks/sms',
]),
]);
$number = json_decode(curl_exec($ch), true);
curl_close($ch);
require 'net/http'
require 'json'
uri = URI('https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v')
req = Net::HTTP::Post.new(uri)
req['Authorization'] = "Bearer #{ENV['GOSIMLESS_API_KEY']}"
req['Content-Type'] = 'application/json'
req.body = {
metadata: {
customer_id: 'cust_1234',
campaign: 'summer_promo',
},
messages_webhook_url: 'https://example.com/webhooks/sms',
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
number = JSON.parse(res.body)
Example 200 response:
{
"id": "num_9W4kFx2mR8pLqT6v",
"phone_number": "+447911123001",
"country": "GB",
"number_type": "mobile",
"status": "active",
"monthly_cost_cents": 599,
"messages_webhook_url": "https://example.com/webhooks/sms",
"created_at": "2026-03-01T12:00:00.000Z",
"released_at": null,
"renewal_at": "2026-04-01T12:00:00.000Z",
"metadata": {
"customer_id": "cust_1234",
"campaign": "summer_promo"
}
}
Release a number
curl -X DELETE https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v \
-H "Authorization: Bearer gsk_<api_key>"
const number = await $fetch(
'https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v',
{
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
},
)
const res = await fetch(
'https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v',
{
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
},
)
const number = await res.json()
$ch = curl_init('https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('GOSIMLESS_API_KEY'),
],
]);
$number = json_decode(curl_exec($ch), true);
curl_close($ch);
require 'net/http'
require 'json'
uri = URI('https://api.gosimless.com/v1/numbers/num_9W4kFx2mR8pLqT6v')
req = Net::HTTP::Delete.new(uri)
req['Authorization'] = "Bearer #{ENV['GOSIMLESS_API_KEY']}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
number = JSON.parse(res.body)
Example 200 response:
{
"id": "num_9W4kFx2mR8pLqT6v",
"phone_number": "+447911123001",
"country": "GB",
"number_type": "mobile",
"status": "released",
"monthly_cost_cents": 599,
"messages_webhook_url": null,
"created_at": "2026-03-01T12:00:00.000Z",
"released_at": "2026-03-15T09:30:00.000Z",
"renewal_at": null,
"metadata": {
"customer_id": "cust_1234",
"campaign": "summer_promo"
}
}
List inbound message records
curl "https://api.gosimless.com/v1/messages?range=0-19" \
-H "Authorization: Bearer gsk_<api_key>" \
-i
const messages = await $fetch('https://api.gosimless.com/v1/messages', {
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
query: {
range: '0-19',
},
})
const res = await fetch('https://api.gosimless.com/v1/messages?range=0-19', {
headers: {
Authorization: `Bearer ${process.env.GOSIMLESS_API_KEY}`,
},
})
const contentRange = res.headers.get('Content-Range')
const messages = await res.json()
$ch = curl_init('https://api.gosimless.com/v1/messages?range=0-19');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HEADER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('GOSIMLESS_API_KEY'),
],
]);
$response = curl_exec($ch);
$headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
curl_close($ch);
$contentRange = null; // parse from response headers
$messages = json_decode(substr($response, $headerSize), true);
require 'net/http'
require 'json'
uri = URI('https://api.gosimless.com/v1/messages?range=0-19')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = "Bearer #{ENV['GOSIMLESS_API_KEY']}"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
content_range = res['Content-Range']
messages = JSON.parse(res.body)
Example 200 response:
[
{
"id": "msg_1Lh4Yw6oB3xFvN8k",
"direction": "inbound",
"message_type": "sms",
"to_number": "+447911123001",
"from_number": "+447700900999",
"parts": 1,
"content": "Your WhatsApp code is 123-456",
"date": "2026-03-01T12:05:00.000Z",
"metadata": {}
}
]
Frequently asked questions
Who can use the gosimless API?
Wholesale partners only. Standard gosimless customer accounts do not include API access. Apply or sign in at partners.gosimless.com.
Does the API cost extra?
No. It is free for wholesale partners.
What products does the API cover?
Virtual numbers. It does not cover UK business eSIM plans.
Where do I find endpoint documentation?
In the interactive developer docs at api.gosimless.com/docs.
Do I still need the partner portal?
Yes for account setup, credentials, and day-to-day partner administration. Use the API when you want those number workflows inside your own software.
Is this the WhatsApp Business Platform API?
No. The gosimless API manages gosimless virtual numbers for partners. WhatsApp Business Platform / Cloud API is a separate Meta product.
How do I get help?
Contact partner support through partners.gosimless.com, or email hello@gosimless.com and mention that you are a wholesale partner using the API.
Wholesale
Apply for a gosimless partner account to acquire virtual numbers at wholesale, manage them in the partner portal, and unlock free API access.
Activate eSIM
Learn how to activate an eSIM step by step on iPhone and Android, including QR code setup, common activation issues, and quick fixes to get connected fast.