Auphere
Documentation menu

Auphere Embed · 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 broadcasts, 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, personalized 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.

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": "Mouna",
      "policies.admin_access.admin_phones": ["+584241234567"]
    }
  }
}
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 again when minting session tokens. Never changes.
namestringRequired
Display name of the client’s business.
timezonestring
IANA timezone, e.g. America/Caracas. Used for scheduling and business-hours behavior.
agent.placeholdersobject
Values for the blueprint’s placeholders (agent name, admin phones, etc.). The available keys depend on your blueprint — we share them during onboarding. A 422 response tells you exactly which placeholder is missing.
connectorobject
Credentials and metadata for the blueprint’s connector, if your blueprint uses one — this is how the client’s agent reads data from your API. Sent credentials are stored encrypted.

Re-calling with the same ref

  • The client’s agent is never re-created — customizations made after provisioning are preserved.
  • Connector credentials are rotated to the values you send. Use this to keep tokens fresh.
  • The call never returns Auphere-internal ids. Your external_client_ref is the only handle you need.