Don’t miss our Special Offer!

Up to 50% off
Grab Amelia
Grab Amelia

Amelia API – WP Users

Here you can see API endpoints related to WordPress users.

You can see all the API endpoints with examples of requests and responses in the Amelia API Postman collection which you can download here.

Content

Please note: The API Endpoints are included only in the Elite license plans. Using API Endpoints requires a certain level of coding skills, and is not included in the provided support for the plugin.

Authorization

All Amelia endpoints use an API key authorization, using the header property named “Amelia”.

Path

Amelia API paths start with: {{your_site_URL}}/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1

Get wp users

Retrieve WordPress users that aren’t tied to any Amelia customer or employee. This is used to connect a new Amelia user to a WordPress user.

Method

This endpoint accepts GET requests.

Path

/users/wp-users

Optional Properties

You can use the following query parameters to filter the results.

Key Type Description
role string The role of the WordPress users to retrieve. Possible values: “customer” (Amelia Customer), “provider” (Amelia Employee)

Example

curl --location 'http://localhost/amelia/wp-admin/admin-ajax.php?action=wpamelia_api&call=/api/v1/users/wp-users' \
--header 'Amelia: qUmkNNOLrWbf28izIgNnZ29O+7gVWL5M+8ySJ8VXq3r0'
{
    "message": "Successfully retrieved users.",
    "data": {
        "users": [
            {
                "value": 2,
                "label": "snakemilicayahoo-com"
            },
            {
                "value": 35,
                "label": "Amelia"
            }
        ]
    }
}