Skip to content

Contacts API

Shared contact directory for SMS, Email and other services. Manage contacts and groups for batch operations.

Endpoints

MethodPathDescription
GET/v1/contactsList contacts
POST/v1/contactsCreate contact
GET/v1/contacts/{contact_id}Get contact
PATCH/v1/contacts/{contact_id}Update contact
DELETE/v1/contacts/{contact_id}Delete contact
POST/v1/contacts/{contact_id}/gdpr-deleteGDPR anonymize contact
GET/v1/contacts/groupsList contact groups
POST/v1/contacts/groupsCreate contact group
GET/v1/contacts/groups/{group_id}Get contact group
PATCH/v1/contacts/groups/{group_id}Update contact group
DELETE/v1/contacts/groups/{group_id}Delete contact group
GET/v1/contacts/groups/{group_id}/membersList group members
POST/v1/contacts/groups/{group_id}/membersAdd members to group
DELETE/v1/contacts/groups/{group_id}/members/{contact_id}Remove member from group

GET /v1/contacts

List contacts

List all contacts with optional filtering by type, search query, or tags.

Response:

FieldTypeDescription
contactsarray
totalinteger
pageinteger
per_pageinteger

Example:

bash
curl https://api.wayscloud.services/v1/contacts \
  -H "X-API-Key: YOUR_API_KEY"

POST /v1/contacts

Create contact

Create a new contact. Phone numbers should be in E.164 format for SMS sending.

Request Body:

FieldTypeDescription
typestringValues: person, company
namestringRequired.
company_namestring
phone_numberstringE.164 format recommended
emailstring
tagsarray
notesstring

Example:

json
{
  "type": "person",
  "name": "Ola Nordmann",
  "phone_number": "+4799999999",
  "email": "ola@example.com",
  "tags": [
    "vip"
  ]
}

Response:

FieldTypeDescription
idstring
typestringValues: person, company
namestring
company_namestring
phone_numberstring
emailstring
tagsarray
notesstring
created_atstring
updated_atstring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/contacts \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

GET /v1/contacts/

Get contact

Get details of a specific contact.

Response:

FieldTypeDescription
idstring
typestringValues: person, company
namestring
company_namestring
phone_numberstring
emailstring
tagsarray
notesstring
created_atstring
updated_atstring

Example:

bash
curl https://api.wayscloud.services/v1/contacts/{contact_id} \
  -H "X-API-Key: YOUR_API_KEY"

PATCH /v1/contacts/

Update contact

Update an existing contact. Only provided fields are updated.

Request Body:

FieldTypeDescription
typestringValues: person, company
namestringRequired.
company_namestring
phone_numberstringE.164 format recommended
emailstring
tagsarray
notesstring

Example:

json
{
  "type": "person",
  "name": "Ola Nordmann",
  "phone_number": "+4799999999",
  "email": "ola@example.com",
  "tags": [
    "vip"
  ]
}

Response:

FieldTypeDescription
idstring
typestringValues: person, company
namestring
company_namestring
phone_numberstring
emailstring
tagsarray
notesstring
created_atstring
updated_atstring

Example:

bash
curl -X PATCH https://api.wayscloud.services/v1/contacts/{contact_id} \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

DELETE /v1/contacts/

Delete contact

Delete a contact. This is a soft delete - the contact can be restored via GDPR endpoints.

Example:

bash
curl -X DELETE https://api.wayscloud.services/v1/contacts/{contact_id} \
  -H "X-API-Key: YOUR_API_KEY"

POST /v1/contacts/{contact_id}/gdpr-delete

GDPR anonymize contact

Permanently anonymize contact data for GDPR compliance. This is irreversible.

Request Body:

FieldTypeDescription
reasonstringRequired. Reason for GDPR deletion

Example:

bash
curl -X POST https://api.wayscloud.services/v1/contacts/{contact_id}/gdpr-delete \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

GET /v1/contacts/groups

List contact groups

List all contact groups with member counts.

Response:

FieldTypeDescription
groupsarray

Example:

bash
curl https://api.wayscloud.services/v1/contacts/groups \
  -H "X-API-Key: YOUR_API_KEY"

POST /v1/contacts/groups

Create contact group

Create a new contact group for organizing contacts.

Request Body:

FieldTypeDescription
namestringRequired.
descriptionstring

Example:

json
{
  "name": "VIP Customers",
  "description": "High-value customers for priority support"
}

Response:

FieldTypeDescription
idstring
namestring
descriptionstring
member_countinteger
created_atstring

Example:

bash
curl -X POST https://api.wayscloud.services/v1/contacts/groups \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

GET /v1/contacts/groups/

Get contact group

Get details of a specific contact group including member list.

Response:

FieldTypeDescription
idstring
namestring
descriptionstring
member_countinteger
created_atstring

Example:

bash
curl https://api.wayscloud.services/v1/contacts/groups/{group_id} \
  -H "X-API-Key: YOUR_API_KEY"

PATCH /v1/contacts/groups/

Update contact group

Update group name or description.

Request Body:

FieldTypeDescription
namestringRequired.
descriptionstring

Example:

json
{
  "name": "VIP Customers",
  "description": "High-value customers for priority support"
}

Response:

FieldTypeDescription
idstring
namestring
descriptionstring
member_countinteger
created_atstring

Example:

bash
curl -X PATCH https://api.wayscloud.services/v1/contacts/groups/{group_id} \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

DELETE /v1/contacts/groups/

Delete contact group

Delete a contact group. Contacts in the group are not deleted.

Example:

bash
curl -X DELETE https://api.wayscloud.services/v1/contacts/groups/{group_id} \
  -H "X-API-Key: YOUR_API_KEY"

GET /v1/contacts/groups/{group_id}/members

List group members

List all contacts in a group.

Response:

FieldTypeDescription
membersarray

Example:

bash
curl https://api.wayscloud.services/v1/contacts/groups/{group_id}/members \
  -H "X-API-Key: YOUR_API_KEY"

POST /v1/contacts/groups/{group_id}/members

Add members to group

Add one or more contacts to a group.

Request Body:

FieldTypeDescription
contact_idsarrayRequired.

Response:

FieldTypeDescription
addedinteger

Example:

bash
curl -X POST https://api.wayscloud.services/v1/contacts/groups/{group_id}/members \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

DELETE /v1/contacts/groups/{group_id}/members/

Remove member from group

Remove a contact from a group.

Example:

bash
curl -X DELETE https://api.wayscloud.services/v1/contacts/groups/{group_id}/members/{contact_id} \
  -H "X-API-Key: YOUR_API_KEY"

WAYSCloud AS