1

Custom Workspace & Webhook Integration Guide

Overview:

Previously, integrations were limited to GoHighLevel (GHL). With Custom Workspaces, you can now:


  • Integrate myCRMSIM with any platform
  • Send messages into myCRMSIM via webhook
  • Receive message status updates via webhook
  • Receive inbound messages (WhatsApp / iMessage / SMS)
  • Assign SIMs, WhatsApp, iMessage or devices per workspace


    The messaging logic, routing, and devcie handling remain exactly the same as GHL integrations — only the integration method changes.

    Key Concepts
    Workspace:

    A workspace represents one external system / client / integration. Each workspace has:

    • Unique location_id
    • Contact & message routing
    • Assigned SIM / iMessage / WhatsApp devices
    • One outbound + inbound webhook endpoint

    Webhook:

    Your system exposes an HTTP endpoint (URL) where:

    • We send inbound messages & status updates
    • You send outbound messages to myCRMSIM

    Step 1: Create a New Workspace
    1. Go to Admin Panel → Workspaces / Webhooks
    2. Click ➕ Add Workspace
    3. You will see the Add New Workspace modal

    .

    Workspace Fields
    FieldDescription
    Select Existing Workspace(Optional) Clone an existing workspace configuration
    NameWorkspace name (e.g. Client Name / App Name)
    AddressOptional business address
    EmailContact email for the workspace
    Phone NumberDefault phone number (E.164 recommended)
    URLYour webhook base URL
    Step 2: Configure Webhook Headers (Optional)
    If your webhook requires authentication or custom headers:
    1. Click ➕ Add Header
    2. Enter:
      • Header Key (e.g. Authorization)
      • Header Value (e.g. Bearer YOUR_API_KEY)

    You can add multiple headers. These headers will be included in all webhook calls made to your system.

    Examples:
    Authorization: Bearer sk_live_xxx
    X-Client-ID: mycrm-client-01

    Step 3: Save Workspace
    Click Create Workspace.
    Your workspace will now appear in the Workspaces / Webhooks list with:
    • Location ID
    • Webhook URL
    • Actions (Edit / Delete / Instructions)

    Step 4: Assign Workspace to Subaccount SIM
    Once the workspace is created:
    1. Go to Subaccount SIM Page
    2. Select the subaccount
    3. Choose the Workspace you created
    4. Assign one or more:
      • SIM numbers
      • WhatsApp devices
      • iMessage devices
    ⚠️ Messages will only flow if a device is assigned.

    Step 5: Sending Messages TO myCRMSIM (Outbound from Your System)
    Your system sends messages to myCRMSIM using the webhook API below.


    API EndpointPOST https://r6bszuuso6.execute-api.ap-southeast-2.amazonaws.com/prod/webhook

    This endpoint is common for all custom workspaces. The location_id inside the payload determines routing.

    Required Request Body
    {
      "location_id": "df9c6911061c4d71a553",
      "user_id": "5",
      "phone": "+923004610062",
      "message": "Hello from Custom Webhook",
      "attachments": [
        "https://example.com/image.jpg"
      ],
      "message_id": "msg_001",
      "channel": "imessage"
    }
    Field Definitions
    FieldRequiredDescription
    location_idCustom workspace location ID
    user_idUser identifier from your system
    phoneRecipient phone number (E.164 format)
    messageMessage text body
    attachmentsArray of publicly accessible media URLs
    message_idMessage identifier generated by your system
    channelimessage, whatsapp, sms, or rcs
    Notes
    • message_id is mandatory and used for all future status updates
    • Media URLs must be publicly accessible
    • The selected channel must be assigned to the workspace device

    ------|---------|------------|


    | location_id | ✅ | Workspace Location ID |
    | user_id | ✅ | User identifier from your system |
    | phone | ✅ | Destination number (E.164 format) |
    | message | ✅ | Message text |
    | attachments | ❌ | Array of media URLs |
    | message_id | ✅ | Your message ID (used for tracking) |
    | channel | ✅ | sms, whatsapp, or imessage |

    Step 6: Message Status Updates (From myCRMSIM to You)
    For every outbound message, myCRMSIM sends status updates to your configured webhook URL.


    Status Update Payload

    {

      "type": "STATUS-UPDATE",
      "message_id": "msg_001",
      "status": "DELIVERED"
    }

    Status Values

    The following status values are sent by myCRMSIM:

    StatusMeaning
    SENTMessage sent successfully
    DELIVEREDMessage delivered to recipient
    FAILEDMessage delivery failed
    Step 7: Inbound Messages (Replies from End Users)
    When an end user replies via SMS, WhatsApp, or iMessage, myCRMSIM forwards the inbound message to your webhook URL.


    Inbound Message Payload

    {

      "type": "MESSAGE",
      "location_id": "df9c6911061c4d71a553",
      "phone": "+923001234567",
      "message": "Hello, I need help",
      "isMe": false,
      "attachments": []
    }
    Field Definitions
    FieldDescription
    typeAlways MESSAGE
    location_idWorkspace identifier
    phoneSender phone number
    messageInbound message text
    isMeAlways false for inbound messages
    attachmentsArray of media URLs (if any)
    Step 8: Editing or Deleting a Workspace
    From Workspaces / Webhooks page:


    • Edit → Update workspace info, webhook URL, or headers
    • Delete → Permanently remove workspace (messages will stop)


      ⚠️ Deleting a workspace will break all assigned subaccounts.
      Common Use Cases
      • Custom CRM integration
      • SaaS messaging backend
      • AI / Bot platform
      • Marketing automation tools
      • Appointment systems


      HTTP Responses & Error Handling
      Your webhook client should expect the following responses from myCRMSIM when sending messages.


      Successful Request (HTTP 200)


      When the payload is valid and accepted, the API responds with:

      {
        "message": "Event sent to SQS successfully",
        "messageId": "uuid",
        "delaySeconds": 5
      }

      Meaning:


      • The event has been validated
      • The message is queued successfully
      • Delivery will be processed asynchronously


      Invalid Request (HTTP 400)


      If the payload is missing required fields or is malformed:

      {
        "error": "Invalid payload"
      }

      Common causes:


      • Missing location_id
      • Missing or empty message_id
      • Invalid channel value
      • Invalid phone number format

      Best Practices

      • Always validate payloads before sending
      • Treat HTTP 200 as accepted, not delivered
      • Rely on STATUS-UPDATE events for final delivery state
      • Implement retry logic only for non-200 responses
      • Do not retry blindly on 400 errors

      Summary Flow
      1. Send message → receive HTTP 200
      2. Wait for STATUS-UPDATE callbacks
      3. Process inbound MESSAGE events


      Was this article helpful?

      0 out of 0 liked this article

      Still need help? Message Us