How do I manage customers with the Amelia API
Use the customers endpoints to create and manage customer profiles, update contact details and preferences, retrieve customers, and check whether a customer can be deleted safely.
You can review all endpoints and ready-made examples in the Amelia API Postman collection.
How do I add a customer with the Amelia API?
Use this endpoint to create a new customer. If you provide email, it must be unique.
- Method: POST
- Path:
/users/customers
Base path
{{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1
Authorization
- All Amelia endpoints use API key authorization via a request header named Amelia.
Required properties
- firstName (
string); customer first name - lastName (
string); customer last name
Optional properties
- externalId (
integer); WordPress user ID linked to the customer - phone (
string); phone number - countryPhoneIso (
string); country phone ISO for the phone number - email (
string); email address, must be unique - gender (
string); possible values:male,female - birthday (
string); date inYYYY-MM-DDformat - note (
string); internal note - language (
string); default customer language
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/customers' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data-raw '{
"firstName": "Jordan",
"lastName": "Reed",
"externalId": 16,
"phone": "+381601234567",
"countryPhoneIso": "rs",
"email": "jordan.reed@example.test",
"gender": "female",
"birthday": "1990-05-17",
"note": "Prefers morning appointments.",
"language": "en_GB"
}'
Response
{
"message": "Successfully added new user.",
"data": {
"user": {
"id": 23,
"firstName": "Jordan",
"lastName": "Reed",
"email": "jordan.reed@example.test",
"phone": "+381601234567",
"type": "customer",
"status": "visible",
"note": "Prefers morning appointments.",
"countryPhoneIso": "rs",
"externalId": 16,
"translations": "{\"defaultLanguage\":\"en_GB\"}",
"gender": "female"
}
}
}
How do I update a customer with the Amelia API?
Use this endpoint to update customer details. Send only the properties you want to change.
- Method: POST
- Path:
/users/customers/{{customer_id}}
Base path
{{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1
Authorization
- All Amelia endpoints use API key authorization via a request header named Amelia.
Optional properties
- firstName (
string); first name - lastName (
string); last name - externalId (
integer); linked WordPress user ID - phone (
string); phone number - countryPhoneIso (
string); country phone ISO - email (
string); email, must be unique - gender (
string);maleorfemale - birthday (
string);YYYY-MM-DD - note (
string); internal note - language (
string); default language
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/customers/23' \
--header 'Content-Type: application/json' \
--header 'Amelia: YOUR_API_KEY' \
--data-raw '{
"lastName": "Miller",
"email": "jordan.miller@example.test",
"note": "Prefers late afternoon appointments."
}'
Response
{
"message": "Successfully updated user",
"data": {
"user": {
"id": 23,
"firstName": "Jordan",
"lastName": "Miller",
"email": "jordan.miller@example.test",
"type": "customer",
"status": "visible"
},
"is_wp_user": false
}
}
How do I retrieve a customer with the Amelia API?
Use this endpoint to retrieve details for a single customer.
- Method: GET
- Path:
/users/customers/{{customer_id}}
Base path
{{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1
Authorization
- All Amelia endpoints use API key authorization via a request header named Amelia.
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/customers/23' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved user",
"data": {
"user": {
"id": 23,
"firstName": "Jordan",
"lastName": "Miller",
"email": "jordan.miller@example.test",
"phone": "+381601234567",
"type": "customer",
"status": "visible",
"countryPhoneIso": "rs"
}
}
}
How do I check whether a customer can be deleted safely with the Amelia API?
Use this endpoint to check whether the customer has future appointments that would prevent deletion.
- Method: GET
- Path:
/users/customers/effect/{{customer_id}}
Base path
{{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1
Authorization
- All Amelia endpoints use API key authorization via a request header named Amelia.
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/customers/effect/23' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved message.",
"data": {
"valid": false,
"message": "Could not delete user.\n This user has 7 appointments in the future."
}
}
How do I retrieve customers with the Amelia API?
Use this endpoint to retrieve a list of customers and filter the results by page and search term.
- Method: GET
- Path:
/users/customers
Base path
{{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1
Authorization
- All Amelia endpoints use API key authorization via a request header named Amelia.
Optional query parameters
- page (
integer); page number - search (
string); searches first name, last name, email, and note
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/customers&page=1&search=jordan' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved users.",
"data": {
"users": [
{
"id": 10,
"status": "visible",
"firstName": "Jordan",
"lastName": "Reed",
"email": "jordan.reed@example.test",
"phone": "+381631652656",
"countryPhoneIso": "rs",
"externalId": 8,
"lastAppointment": "2026-05-03 15:00:00",
"totalAppointments": 11,
"countPendingAppointments": "0"
},
{
"id": 11,
"status": "visible",
"firstName": "Casey",
"lastName": "Nguyen",
"email": "casey.nguyen@example.test",
"phone": "",
"countryPhoneIso": "us",
"externalId": 9,
"lastAppointment": "2026-05-10 11:00:00",
"totalAppointments": 28,
"countPendingAppointments": "0"
},
{
"id": 16,
"status": "visible",
"firstName": "Taylor",
"lastName": "Brooks",
"email": "taylor.brooks@example.test",
"phone": "",
"countryPhoneIso": "us",
"externalId": 12,
"lastAppointment": "2026-05-09 11:00:00",
"totalAppointments": 5,
"countPendingAppointments": "1"
}
],
"filteredCount": 3,
"totalCount": 16
}
}
How do I delete a customer with the Amelia API?
Use this endpoint to delete a customer.
- Method: POST
- Path:
/users/customers/delete/{{customer_id}}
Base path
{{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1
Authorization
- All Amelia endpoints use API key authorization via a request header named Amelia.
Example
Request
curl --location --request POST 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/customers/delete/23' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully deleted user.",
"data": []
}