API Reference
Contacts
Create, list, update, and delete contacts in your Washeej address book.
GET
/contacts
contacts:read
https://app.washeej.com/v1/contacts
List contacts with optional search and pagination.
| Parameter | Type | Required | Description |
|---|---|---|---|
search
|
string | optional | Filter by first name, last name, or mobile. |
per_page
|
integer | optional | Page size (default 25, max 100). |
page
|
integer | optional | Page number. |
cURL
curl -H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
"https://app.washeej.com/v1/contacts?search=Ahmed&per_page=25"
POST
/contacts
contacts:write
https://app.washeej.com/v1/contacts
Create a contact.
| Parameter | Type | Required | Description |
|---|---|---|---|
firstname
|
string | required | First name (max 100). |
lastname
|
string | optional | Last name (max 100). |
mobile_code
|
string | required | Country dial code without + (e.g. 966). |
mobile
|
string | required | National number digits only. |
cURL
curl -X POST https://app.washeej.com/v1/contacts \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"firstname": "Ahmed",
"lastname": "Ali",
"mobile_code": "966",
"mobile": "500000000"
}'
Common errors:
invalid_phone, duplicate_contact, validation_error
PATCH
/contacts/{id}
contacts:write
https://app.washeej.com/v1/contacts/{id}
Update contact name fields.
| Parameter | Type | Required | Description |
|---|---|---|---|
id
path
|
integer | required | Contact ID. |
firstname
|
string | optional | First name. |
lastname
|
string | optional | Last name. |
cURL
curl -X PATCH https://app.washeej.com/v1/contacts/4821 \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{"firstname": "Ahmed","lastname": "Hassan"}'
DELETE
/contacts/{id}
contacts:write
https://app.washeej.com/v1/contacts/{id}
Delete a contact.
| Parameter | Type | Required | Description |
|---|---|---|---|
id
path
|
integer | required | Contact ID. |
cURL
curl -X DELETE https://app.washeej.com/v1/contacts/4821 \
-H "client-id: YOUR_CLIENT_ID" \
-H "client-secret: YOUR_CLIENT_SECRET"