How do I retrieve WordPress users with the Amelia API
Use this endpoint to retrieve WordPress users that are not tied to any Amelia customer or employee, so you can link a new Amelia user to an existing WordPress account.
You can review all endpoints and ready-made examples in the Amelia API Postman collection.
API endpoints are available only in Elite license plans. Using the API requires coding skills and is not covered by standard plugin support.
How do I retrieve WordPress users that are not linked to Amelia?
Use this endpoint to retrieve WordPress users that are not linked to Amelia. This is typically used when you want to connect an Amelia customer or employee to an existing WordPress user.
- Method: GET
- Path:
/users/wp-users
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
- role (
string); filter by WordPress user role to retrieve, possible values:customerfor Amelia customers andproviderfor Amelia employees
Example
Request
curl --location 'https://example-site.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/wp-users&role=customer' \
--header 'Amelia: YOUR_API_KEY'
Response
{
"message": "Successfully retrieved users.",
"data": {
"users": [
{
"value": 2,
"label": "jordan.reed-example-test"
},
{
"value": 35,
"label": "casey.nguyen-example-test"
}
]
}
}