myCRMSIM

myCRMSIM API 1.0

Get Started
​
No token

Update workspace

PATCH

/api/v1/ext/workspaces/{id}

Partially update a workspace.

Auth: Bearer access_token
Scope: workspaces.write

Send any subset of the writable fields. remote_id is not updatable — it ties the workspace to its source system, and changing it would break synchronization. The inbound webhook can also be managed through this endpoint: • Send inbound_webhook_url with a new URL to register or change the webhook (creates it if it does not yet exist). • Send inbound_webhook_headers to update the headers — when omitted the previously stored headers are preserved. • Send inbound_webhook_url: "" (or null) to remove the webhook entirely. The response always includes the current inbound_webhook object when one is configured, mirroring Get workspace.

Parameters

NameInTypeRequiredDescription
id
path
number
yes
Workspace id.
user_type
body
enumnoMust be "Custom Location" (the only workspace type the external API can manage).
name
body
stringnoDisplay name. Max 255.
address
body
stringnoUpdates meta.address.
phone_number
body
stringnoUpdates meta.phone_number.
email
body
stringnoLowercased. Updates meta.email.
url
body
stringnoUpdates meta.url.
allow_contact
body
stringno"0" or "1".
inbound_webhook_url
body
stringnoRegister, change, or clear the inbound webhook URL. Pass "" or null to remove the webhook entirely. Must be http(s) when supplied.
inbound_webhook_headers
body
array<{key,value}>noReplace the stored headers with this list. Sent as [{ "key": "...", "value": "..." }]. Omit to keep the existing headers untouched.

Responses

StatusWhen
200
Updated (with inbound webhook)
200
Updated (webhook unchanged or absent)
400
No editable fields provided
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.
404
Workspace does not exist or is not owned by the installer

Response schema

workspaceobject

The updated workspace

idnumber

Unique workspace id.

Example:7
remote_idstring

Server-generated unique identifier (20-character hex string). Not accepted in the request body — always assigned when the workspace is created.

Example:4f8a7e1d2c9b3a5f6e0d1
sourcestring

Where the workspace came from. Workspaces created via this API have source "myCRMSIM".

Example:myCRMSIM
user_idnumber

The installer this workspace belongs to.

Example:42
user_typeenum

The workspace type. Workspaces created via this API are always "Custom Location" — "Location" appears for workspaces that originated from a connected platform.

Example:Custom Location
namestring
nullable

Display name. Stored inside `meta` and surfaced here for convenience.

Example:Acme HQ
addressstring
nullable

Street address. From meta.

phone_numberstring
nullable

Primary phone number. From meta.

emailstring
nullable

Primary email. Lowercased. From meta.

urlstring
nullable

Public website. From meta.

metaobject

Raw meta JSON. The fields above are mirrored here.

allow_contactstring

"0" or "1" — whether inbound contacts can auto-create here. Defaults to "0".

Example:0
company_idnumber
nullable

External platform company ID (for Location workspaces).

whitelabel_setting_idnumber
nullable

Identifier of the white-label brand this workspace belongs to.

custom_menu_link_idstring
nullable

Embedded app menu link ID.

subaccount_actionnumber

Bitfield describing the sub-account action state. 0 = default.

Example:0
whatsapp_connection_idnumber
nullable

Identifier of the WhatsApp connection assigned to this workspace.

whatsapp_delaynumber
nullable

Per-message send delay in seconds for the WhatsApp channel.

is_token_expirednumber
nullable

1 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)
nullable

Set when the workspace has been soft-deleted. null for active records.

Request
curl -X PATCH "https://backend.mysmsgateway.app/api/v1/ext/workspaces/{id}" \
  -H "Authorization: Bearer <ACCESS_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme HQ (renamed)",
  "allow_contact": "1",
  "inbound_webhook_url": "https://your-app.example.com/inbound/messages",
  "inbound_webhook_headers": [
    {
      "key": "x-webhook-secret",
      "value": "your-shared-secret"
    }
  ]
}'
Responses
Updated (with inbound webhook)
{
  "success": true,
  "data": {
    "id": 7,
    "remote_id": "4f8a7e1d2c9b3a5f6e0d1",
    "source": "myCRMSIM",
    "user_id": 42,
    "user_type": "Custom Location",
    "name": "Acme HQ (renamed)",
    "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": "1",
    "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"
        }
      ]
    }
  }
}
Try It!
This endpoint needs a bearer token. Open Settings (top right) and paste your access_token.
Path parameters

Workspace id.

Body (JSON)
Request URL
PATCHhttps://backend.mysmsgateway.app/api/v1/ext/workspaces/%7Bid%7D
Previous

« Create workspace

Next

Delete workspace »