Skip to main content

Create Contact Group (v1)

Method & Path

POST /api/v1/workspace/:workspaceId/sms/contact-groups

Description

Creates an SMS contact group (name + mobiles).

Authentication

Required: Workspace auth.

Persona Access:

  • Workspace Owner: Allowed
  • Staff (role-based): Requires sms.send
  • Customer(client): Not allowed

Headers

  • Authorization: Bearer <workspaceToken>
  • Content-Type: application/json
  • X-Staff-Id: <staffId> (optional; required when acting as Staff)

Path Parameters

NameTypeRequiredDescription
workspaceIdstringYesWorkspace ID

Request Body

{
"name": "VIP",
"mobiles": ["+970599000000", "+972590000000"]
}

Response 201 Created

{
"group": {
"id": "66f2...",
"workspaceId": "66f0...",
"name": "VIP",
"mobiles": ["+970599000000", "+972590000000"],
"createdAt": "2026-01-14T10:00:00.000Z",
"updatedAt": "2026-01-14T10:00:00.000Z"
}
}

Common Errors

  • 400 Bad Request: Invalid workspace ID
  • 401 Unauthorized: Missing/invalid workspace token
  • 403 Forbidden: Staff missing sms.send
  • 422 Unprocessable Entity: Validation failed
  • 500 Internal Server Error: Unexpected error