aethexDocs
Custom list source logo
CRM

Custom list source

Build call lists from a JSON endpoint you run. Your endpoint is the source of truth for who is called.

How it works

You connect one HTTPS endpoint that returns the people to call, with a secret your endpoint checks. In the Aethex platform you build a call list from it, choosing which field holds the phone number. Aethex reads the endpoint when the list is created, when you press Sync call list, and once at the start of each campaign run on the list; the list is replaced with what the endpoint returns, and edits to its rows in Aethex are not kept. Aethex calls your endpoint; your endpoint never calls Aethex. One custom list source per workspace for now. It can serve several lists: serve each one at its own path under the connected address (for example /dormant), and type that name in List to read when you create the call list. A name holds letters, digits, - and _.

What your endpoint returns

docs.customListSource.responseContent

A response
json
{
  "success": true,
  "data": [
    { "customer_reference": "AB-204513", "phone": "+2348030000101", "first_name": "Ngozi" },
    { "customer_reference": "AB-204877", "phone": "+2348030000102", "first_name": "Tunde" }
  ],
  "next": "optional-cursor-for-the-next-page"
}

Authentication

A secret is required. Aethex sends it on every request as Authorization: Bearer <secret>, or under the header you set as config.auth_header (for example x-api-key). Your endpoint must refuse any request without it with 401 or 403: at connect time Aethex sends one request with a wrong secret and refuses the connection if it is answered. You may also allowlist Aethex's outbound addresses; ask Aethex support for them.

Heads up
An allowlist alone is not enough: the outbound addresses are shared by every workspace on Aethex, so they tell your firewall the request comes from Aethex, not which customer sent it. The secret is what ties your endpoint to your workspace.

Connect by API

base_url is the full address of your records endpoint, path included, HTTPS only, without ? or #. Any port is accepted. Private, internal and redirecting addresses are refused. config is optional: id_field, records_key and auth_header.

Connect a custom list source
bash
curl -X POST https://api.aethexai.com/api/v1/integrations \
  -H "X-API-Key: $AETHEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "http_list",
    "base_url": "https://lists.example.com/customers/to-call",
    "access_token": "'"$LIST_SECRET"'",
    "config": { "id_field": "customer_reference" }
  }'

# Aethex reads the endpoint once, then sends one request with a wrong secret.
# The connection is refused unless that request is answered 401 or 403.

When the list is read

Once when the call list is created, whenever someone presses Sync call list, and once at the start of each campaign run on the list while its Keep in sync before each campaign setting is on (the default). If that read fails, the run waits and retries for a bounded time, then fails with the reason and the workspace owners are emailed; it does not dial an out-of-date list. It is read again before the first call of each later calling day of a run. It is also read again before each redial pass, which redials only the people not reached who are still on the list.

Errors you may see

- answered a request that carried the wrong secret: your endpoint does not check the secret; make it refuse requests without it.
- refused the request (HTTP 401/403): the secret is wrong, or Aethex's address is not allowlisted.
- temporarily unavailable (HTTP 5xx, 408, 429) or reported a failure: retried later.
- did not answer with JSON, no recognisable id field, No record carries the id field: check the response shape and config.id_field.
- returned N records in one response or more than 2 MB: page the response with next.