Skip to content

By default every request runs against your main workspace — if you have a single workspace, nothing here concerns you. Read on only if your account routes traffic through more than one SMS gateway product.

One portal account can own several workspaces. Each workspace binds to one SMS gateway product; exactly one workspace is main (the default fallback). Workspaces are created by your administrator.

Each API key is server-side bound to one workspace — the key itself decides where its traffic routes. The X-Workspace-ID header is ignored on API-key requests.

When authenticating with JWT, scope any request to a workspace you own:

X-Workspace-ID: 18
Header valueBehavior
omittedRequest runs against your main workspace
Valid ID of a live workspace you ownRequest scoped to that workspace
Not a positive integer400 INVALID_WORKSPACE_HEADER
Workspace you don’t own, or deleted403 CROSS_TENANT_WORKSPACE
No live main workspace on the account403 NO_MAIN_WORKSPACE — contact support

GET /user/workspaces returns your live workspaces. It is not available to API-key requests; GET /user/profile already embeds the same list.

Terminal window
curl -H "Authorization: Bearer $TOKEN" \
https://restlink23telecom.com/api/v1/user/workspaces
200 OK
[
{ "id": 16, "name": "Main", "is_main": true, "account_id": 279, "product_id": 1430 },
{ "id": 18, "name": "test-space", "is_main": false, "color": "#5298D9", "account_id": 279, "product_id": 1406 }
]
FieldDescription
idWorkspace ID — use this in X-Workspace-ID
nameLabel chosen by your admin
is_maintrue for exactly one workspace
colorOptional UI tint
account_id / product_idBound SMS gateway product

Example: send from a specific workspace (JWT)

Section titled “Example: send from a specific workspace (JWT)”
Terminal window
curl -X POST https://restlink23telecom.com/api/v1/sms/send \
-H "Authorization: Bearer $TOKEN" \
-H "X-Workspace-ID: 18" \
-H "Content-Type: application/json" \
-d '{"to":["+14155551234"],"message":"hi","sender_id":"MyApp"}'

Webhook URLs, field selections and signing secrets are configured per workspace — each workspace routes its events independently. See webhooks.