Create workspace
/api/v1/ext/workspaces
Create a new Custom Location workspace.
Creates a stand-alone Custom Location workspace. The remote_id is generated server-side (a 20-character hex string) and is never accepted in the request body. A new workspace may take a few seconds to become fully active — if a follow-up call returns 404 immediately after creation, retry shortly.
Optionally pass inbound_webhook_url (and inbound_webhook_headers) to register an inbound webhook in the same call. When supplied, the webhook is registered on the workspace so inbound messages can be POSTed straight in. The webhook URL must be an http(s) URL.
📘 Custom Workspace & Webhook Integration Guide — how to set up and use a Custom Workspace in myCRMSIM
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| name | body | string | yes | Display name. Max 255 characters. |
| address | body | string | no | Stored in meta.address. |
| phone_number | body | string | no | Stored in meta.phone_number. |
body | string | no | Normalized to lowercase. Stored in meta.email. | |
| url | body | string | no | Public website URL. Stored in meta.url. |
| inbound_webhook_url | body | string | no | Optional. When supplied, an inbound webhook row is created for this workspace so inbound messages can be POSTed to this URL. Must be http(s). |
| inbound_webhook_headers | body | array<{key,value}> | no | Optional. Extra headers to forward with each inbound webhook delivery — typically an auth header. Sent as an array of { key, value } objects, e.g. [{ "key": "x-webhook-secret", "value": "abc123" }]. Each entry must include a non-empty key. |
Responses
| Status | When |
|---|---|
201 | Created. |
400 | Missing name. |
400 | inbound_webhook_url is not an http(s) URL. |
400 | inbound_webhook_headers is not an array of { key, value } objects. |
400 | inbound_webhook_headers entries are missing a key. |
200 | Partial success — workspace was created, but the inbound webhook row could not be stored. The presence of the warning field signals partial success; full success returns 201 Created. |
409 | Auto-generated remote_id collided — retry should succeed. |
Response schema
workspaceobjectThe newly created workspace
idnumberUnique workspace id.
7remote_idstringServer-generated unique identifier (20-character hex string). Not accepted in the request body — always assigned when the workspace is created.
4f8a7e1d2c9b3a5f6e0d1sourcestringWhere the workspace came from. Workspaces created via this API have source "myCRMSIM".
myCRMSIMuser_idnumberThe installer this workspace belongs to.
42user_typeenumThe workspace type. Workspaces created via this API are always "Custom Location" — "Location" appears for workspaces that originated from a connected platform.
Custom LocationnamestringDisplay name. Stored inside `meta` and surfaced here for convenience.
Acme HQaddressstringStreet address. From meta.
phone_numberstringPrimary phone number. From meta.
emailstringPrimary email. Lowercased. From meta.
urlstringPublic website. From meta.
metaobjectRaw meta JSON. The fields above are mirrored here.
allow_contactstring"0" or "1" — whether inbound contacts can auto-create here. Defaults to "0".
0company_idnumberExternal platform company ID (for Location workspaces).
whitelabel_setting_idnumberIdentifier of the white-label brand this workspace belongs to.
custom_menu_link_idstringEmbedded app menu link ID.
subaccount_actionnumberBitfield describing the sub-account action state. 0 = default.
0whatsapp_connection_idnumberIdentifier of the WhatsApp connection assigned to this workspace.
whatsapp_delaynumberPer-message send delay in seconds for the WhatsApp channel.
is_token_expirednumber1 if the upstream OAuth token for this workspace has expired and needs re-authorization.
created_atstring (ISO 8601)When the workspace was created.
updated_atstring (ISO 8601)When the workspace was last modified.
deleted_atstring (ISO 8601)Set when the workspace has been soft-deleted. null for active records.
curl -X POST "https://backend.mysmsgateway.app/api/v1/ext/workspaces" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme HQ",
"address": "12 Mayfair St, London",
"phone_number": "+442071234567",
"email": "hq@acme.example.com",
"url": "https://acme.example.com",
"inbound_webhook_url": "https://your-app.example.com/inbound/messages",
"inbound_webhook_headers": [
{
"key": "x-webhook-secret",
"value": "your-shared-secret"
},
{
"key": "Authorization",
"value": "Bearer your-token-here"
}
]
}'{
"success": true,
"data": {
"id": 7,
"remote_id": "4f8a7e1d2c9b3a5f6e0d1",
"source": "myCRMSIM",
"user_id": 42,
"user_type": "Custom Location",
"name": "Acme HQ",
"address": "12 Mayfair St, London",
"phone_number": "+442071234567",
"email": "hq@acme.example.com",
"url": "https://acme.example.com",
"meta": {
"name": "Acme HQ",
"address": "12 Mayfair St, London",
"phone_number": "+442071234567",
"email": "hq@acme.example.com",
"url": "https://acme.example.com"
},
"allow_contact": "0",
"company_id": null,
"whitelabel_setting_id": 1,
"custom_menu_link_id": null,
"subaccount_action": 0,
"whatsapp_connection_id": null,
"whatsapp_delay": null,
"is_token_expired": 0,
"created_at": "2026-05-21T09:14:22.000Z",
"updated_at": "2026-05-21T09:14:22.000Z",
"deleted_at": null,
"inbound_webhook": {
"url": "https://your-app.example.com/inbound/messages",
"headers": [
{
"key": "x-webhook-secret",
"value": "your-shared-secret"
},
{
"key": "Authorization",
"value": "Bearer your-token-here"
}
]
}
}
}« Get workspace
Update workspace »
