Auphere
Documentation menu

Auphere Partner API · Guides

/ v0.1

Provisioning clients

Create an isolated Auphere workspace — with a ready-to-go agent — every time a client signs up in your product.

Before a client can connect WhatsApp or send campaigns, they need a workspace on the Auphere side. You create it with a single idempotent call from your backend, typically wherever your product creates the client record.

Your partner blueprint

During onboarding, the Auphere team configures a blueprint for your partner account: which agent vertical your clients get (e.g. a collections assistant), which connector links the agent to your API, and whether clients activate automatically after connecting WhatsApp. Provisioning clones this blueprint for each new client — so every client starts with a proven agent, personalised through placeholders you control.

Create or update a client

POST /v1/partners/clients is idempotent on external_client_ref: call it as many times as you like with the same ref. Requires the provision scope.

Request
POST https://api.auphere.com/v1/partners/clients
Authorization: Bearer ak_live_…
Content-Type: application/json

{
  "external_client_ref": "3f6c1a2e-9d41-4b7f-8f2a-0c5d9e1b7a44",
  "name": "Bodegón El Ávila",
  "timezone": "America/Caracas",
  "agent": {
    "placeholders": {
      "agent.name": "Sofía",
      "policies.admin_access.admin_phones": ["+584241234567"]
    }
  },
  "connector": {
    "credentials": { "entity_id": "<uuid>", "token": "<bearer>" },
    "meta": { "business_uuid": "<id del negocio en TU api>" }
  }
}
Response
{
  "external_client_ref": "3f6c1a2e-9d41-4b7f-8f2a-0c5d9e1b7a44",
  "status": "provisioned",
  "whatsapp": { "status": "not_connected", "display_phone_number": null },
  "agent": { "status": "provisioned" },
  "connector_connected": true
}
external_client_refstringRequired
Your own stable id for the client. You will use it in every other call. It never changes — pick the id your database already has.
namestringRequired
Display name of the client’s business. The agent uses it when it speaks.
timezonestring
IANA timezone, e.g. America/Caracas. Used for scheduling and business hours.
agent.placeholdersobject
Values for the blueprint’s placeholders. The available keys depend on your vertical — we share the exact list during onboarding.
connector.credentialsobject
Credentials the agent uses to read data from your API, stored encrypted. Re-provisioning rotates them.
connector.metaobject
Non-secret routing info for the connector, typically the client’s id inside your own system.

What a repeat call does

  • Never re-creates the agent. Customisations made afterwards (new prompt version, changed admins) are preserved.
  • Does rotate connector credentials. This is how you push a new token for a client.
  • Returns the same workspace. Same ref, same client, always.

Why you might get a 422

An agent is only promoted if it can do its job on day one, so provisioning refuses two situations that would otherwise fail silently in front of a real user.

Unfilled business data

If a placeholder has no value, the agent would quote our literal placeholder text to a real user as if it were their bank account. The error names every missing key.

422
{
  "detail": "Faltan datos del negocio para armar el agente. Envíalos en agent.placeholders. Pendientes: transferencia banco, transferencia número de cuenta"
}

Empty administrator whitelist

In admin-only verticals the agent answers only whitelisted phone numbers. With none, the client’s brand-new number would be connected and permanently silent — and nothing in the logs would look broken. Send at least one phone in E.164 with 7+ digits.