Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.msgflash.com/llms.txt

Use this file to discover all available pages before exploring further.

Contacts

Endpoints

MethodEndpoint
GET/api/v1/contacts
POST/api/v1/contacts
GET/api/v1/contacts/{id}
PUT/api/v1/contacts/{id}
DELETE/api/v1/contacts/{id}
POST/api/v1/contacts/bulk-delete
GET/api/v1/contacts/bulk-jobs
GET/api/v1/contacts/bulk-jobs/{jobId}
GET/api/v1/contacts/bulk-jobs/{jobId}/progress
POST/api/v1/contacts/bulk-jobs/{jobId}/cancel

Parameters

POST /api/v1/contacts

FieldTypeRequiredLocationDescription
namestringyesbodyFull name
phonestringyesbodyE.164 number
tagsstring[]nobodyContact tags
metaobjectnobodyFree-form metadata

PUT /api/v1/contacts/{id}

FieldTypeRequiredLocationDescription
idUUIDyespathContact ID
namestringnobodyNew name
phonestringnobodyNew number
tagsstring[]nobodyReplaces tags
metaobjectnobodyReplaces metadata

POST /api/v1/contacts/bulk-delete

FieldTypeRequiredLocationDescription
contactIdsUUID[]yesbody1 to 10000 IDs

Create a contact

curl -X POST https://srv.msgflash.com/api/v1/contacts \
  -H "x-api-key: msgf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Awa Doe",
    "phone": "+33612345000",
    "tags": ["vip", "newsletter"],
    "meta": {
      "city": "Cotonou"
    }
  }'

Bulk delete contacts

curl -X POST https://srv.msgflash.com/api/v1/contacts/bulk-delete \
  -H "x-api-key: msgf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "contactIds": ["CONTACT_UUID_1", "CONTACT_UUID_2"]
  }'
Response example:
{
  "data": {
    "requested": 2,
    "deleted": 1,
    "notFound": ["CONTACT_UUID_2"]
  }
}
Async response example (>= 100 contacts):
{
  "data": {
    "mode": "async",
    "jobId": "job_abc123",
    "status": "pending",
    "operation": "bulk_delete_contacts",
    "requestedCount": 900,
    "progress": 0
  }
}

Common errors

CodeHTTPWhen
VALIDATION_ERROR400Invalid body
NOT_FOUND404Requested contact not found

Contact groups

Endpoints

MethodEndpoint
GET/api/v1/contacts/groups
POST/api/v1/contacts/groups
GET/api/v1/contacts/groups/{groupId}
PUT/api/v1/contacts/groups/{groupId}
DELETE/api/v1/contacts/groups/{groupId}
POST/api/v1/contacts/groups/{groupId}/members
DELETE/api/v1/contacts/groups/{groupId}/members
GET/api/v1/contacts/groups/{groupId}/members
GET/api/v1/contacts/{id}/groups

Parameters

POST /api/v1/contacts/groups

FieldTypeRequiredLocationDescription
namestringyesbodyGroup name
descriptionstringnobodyDescription
colorstringnobodyHex color code

POST /api/v1/contacts/groups/{groupId}/members

FieldTypeRequiredLocationDescription
groupIdUUIDyespathGroup ID
contactIdsUUID[]yesbody1 to 10000 members to add

GET /api/v1/contacts/groups/{groupId}/members

ParameterTypeRequiredLocationDescription
groupIdUUIDyespathGroup ID
limitintegernoqueryPage size
cursorstringnoqueryCursor
searchstringnoqueryFilter by name or phone

Create a group

curl -X POST https://srv.msgflash.com/api/v1/contacts/groups \
  -H "x-api-key: msgf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Clients VIP",
    "description": "High-value clients",
    "color": "#F59E0B"
  }'

Add members

curl -X POST https://srv.msgflash.com/api/v1/contacts/groups/GROUP_ID/members \
  -H "x-api-key: msgf_live_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "contactIds": ["CONTACT_UUID_1", "CONTACT_UUID_2"]
  }'
Async behavior:
  • < 100 contacts: synchronous response
  • >= 100 contacts: asynchronous 202 response with a jobId
  • Poll GET /api/v1/contacts/bulk-jobs/{jobId}/progress every 2s

List members

curl "https://srv.msgflash.com/api/v1/contacts/groups/GROUP_ID/members?limit=20&search=awa" \
  -H "x-api-key: msgf_live_your_api_key_here"
Response:
{
  "data": {
    "members": [],
    "nextCursor": null,
    "hasMore": false
  }
}
The groups exposed here are MsgFlash contact groups, not native WhatsApp groups.

Common errors

CodeHTTPWhen
MAX_CONTACT_GROUPS_REACHED403Group limit reached
NOT_FOUND404Group or contact not found
CONFLICT409A group with the same name already exists