Custom Workspace & Webhook Integration Guide
Overview:
- 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
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
- Go to Admin Panel → Workspaces / Webhooks
- Click ➕ Add Workspace
- You will see the Add New Workspace modal
.
| Field | Description |
| Select Existing Workspace | (Optional) Clone an existing workspace configuration |
| Name | Workspace name (e.g. Client Name / App Name) |
| Address | Optional business address |
| Contact email for the workspace | |
| Phone Number | Default phone number (E.164 recommended) |
| URL | Your webhook base URL |
- Click ➕ Add Header
- 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
Your workspace will now appear in the Workspaces / Webhooks list with:
- Location ID
- Webhook URL
- Actions (Edit / Delete / Instructions)
- Go to Subaccount SIM Page
- Select the subaccount
- Choose the Workspace you created
- Assign one or more:
- SIM numbers
- WhatsApp devices
- iMessage devices
This endpoint is common for all custom workspaces. The location_id inside the payload determines routing.
"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 | Required | Description |
| location_id | ✅ | Custom workspace location ID |
| user_id | ✅ | User identifier from your system |
| phone | ✅ | Recipient phone number (E.164 format) |
| message | ✅ | Message text body |
| attachments | ❌ | Array of publicly accessible media URLs |
| message_id | ✅ | Message identifier generated by your system |
| channel | ✅ | imessage, whatsapp, sms, or rcs |
- 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 |
{
"type": "STATUS-UPDATE","message_id": "msg_001",
"status": "DELIVERED"
}
The following status values are sent by myCRMSIM:
| Status | Meaning |
| SENT | Message sent successfully |
| DELIVERED | Message delivered to recipient |
| FAILED | Message delivery failed |
{
"type": "MESSAGE","location_id": "df9c6911061c4d71a553",
"phone": "+923001234567",
"message": "Hello, I need help",
"isMe": false,
"attachments": []
}
| Field | Description |
| type | Always MESSAGE |
| location_id | Workspace identifier |
| phone | Sender phone number |
| message | Inbound message text |
| isMe | Always false for inbound messages |
| attachments | Array of media URLs (if any) |
- Edit → Update workspace info, webhook URL, or headers
- Delete → Permanently remove workspace (messages will stop)
- Custom CRM integration
- SaaS messaging backend
- AI / Bot platform
- Marketing automation tools
- Appointment systems
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
- 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
- Send message → receive HTTP 200
- Wait for STATUS-UPDATE callbacks
- Process inbound MESSAGE events
