Workspaces
Copy page
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.
The model
Section titled “The model”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.
API keys: no header needed
Section titled “API keys: no header needed”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.
JWT: the X-Workspace-ID header
Section titled “JWT: the X-Workspace-ID header”When authenticating with JWT, scope any request to a workspace you own:
X-Workspace-ID: 18| Header value | Behavior |
|---|---|
| omitted | Request runs against your main workspace |
| Valid ID of a live workspace you own | Request scoped to that workspace |
| Not a positive integer | 400 INVALID_WORKSPACE_HEADER |
| Workspace you don’t own, or deleted | 403 CROSS_TENANT_WORKSPACE |
| No live main workspace on the account | 403 NO_MAIN_WORKSPACE — contact support |
List your workspaces (JWT only)
Section titled “List your workspaces (JWT only)”GET /user/workspaces returns your live workspaces. It is not available
to API-key requests; GET /user/profile already embeds the same list.
curl -H "Authorization: Bearer $TOKEN" \ https://restlink23telecom.com/api/v1/user/workspaces[ { "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 }]| Field | Description |
|---|---|
id | Workspace ID — use this in X-Workspace-ID |
name | Label chosen by your admin |
is_main | true for exactly one workspace |
color | Optional UI tint |
account_id / product_id | Bound SMS gateway product |
Example: send from a specific workspace (JWT)
Section titled “Example: send from a specific workspace (JWT)”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"}'Webhooks are per-workspace
Section titled “Webhooks are per-workspace”Webhook URLs, field selections and signing secrets are configured per workspace — each workspace routes its events independently. See webhooks.