Auphere
Documentation menu

Auphere Partner API · Reference

/ v0.1

API reference

Every endpoint of the Auphere Partner API, with its scope, payload and response.

Authentication

One header on every request. Keys are ak_live_… (production) or ak_test_…; both behave identically — what decides what a key can do is its scopes, not its type.

Header
Authorization: Bearer ak_live_4f9c…

# Every call. Server-to-server only — this key must never reach a browser.
# Base URL: https://api.auphere.com
ScopeEndpoints
provisionClients, WhatsApp signup, administrators, status
broadcastsTemplates and campaigns

Clients

Provision a client
POST /v1/partners/clients                          scope: provision

{
  "external_client_ref": "<your id>",     // required
  "name": "Bodegón El Ávila",             // required
  "timezone": "America/Caracas",
  "agent":     { "placeholders": { … } },
  "connector": { "credentials": { … }, "meta": { … } }
}

→ 200 {
  "external_client_ref": "…",
  "status": "provisioned",
  "whatsapp": { "status": "not_connected", "display_phone_number": null },
  "agent": { "status": "provisioned" },   // | already_provisioned | not_configured
  "connector_connected": true
}
Read a client’s status
GET /v1/partners/clients/{external_client_ref}      scope: provision

→ 200 {
  "external_client_ref": "…",
  "name": "Bodegón El Ávila",
  "timezone": "America/Caracas",
  "status": "active",                     // provisioning | active | paused | archived
  "whatsapp_connected": true,
  "display_phone_number": "+584241234567",
  "agent_configured": true,
  "agent_version": 3,
  "agent_seed_template": "cobranza_v1",
  "admins_count": 2,
  "ready": true,
  "missing": []                           // agent | whatsapp | admins | activation
}

WhatsApp

Meta identifiers
GET /v1/partners/whatsapp/signup-config            scope: provision

→ 200 {
  "app_id": "…",
  "coexistence_config_id": "…",
  "cloud_api_config_id": "…",
  "graph_api_version": "v23.0"
}
Complete the signup
POST /v1/partners/clients/{ref}/whatsapp/signup     scope: provision

{
  "code": "<single-use Meta code>",       // required
  "waba_id": "<waba id>",                 // required
  "phone_number_id": "<optional>",
  "mode": "coexistence"                   // coexistence (default) | cloud_api
}

→ 201 {
  "status": "connected",
  "waba_id": "…", "phone_number_id": "…",
  "display_phone_number": "+584241234567",
  "mode": "coexistence",
  "tenant_status": "active",
  "tenant_activated": true,
  "activation_blocked_reason": null       // no_agent | operator_review
}

Administrators

Read / replace the whitelist
GET /v1/partners/clients/{ref}/admins              scope: provision
PUT /v1/partners/clients/{ref}/admins              scope: provision

{
  "admins": [
    { "phone": "+584241234567", "name": "Ana", "role": "full" }
  ]
}

→ 200 { "admin_only": true, "admins": [ … ] }

# PUT replaces the whole list. role: full (default) | readonly

Campaigns

List approved templates
GET /v1/partners/clients/{ref}/templates           scope: broadcasts

→ 200 { "templates": [
  { "name": "…", "language": "es", "status": "APPROVED",
    "category": "UTILITY", "components": [ … ] }
] }
Send a campaign
POST /v1/partners/clients/{ref}/broadcasts         scope: broadcasts

{
  "template_name": "recordatorio_pago_vencido",   // required
  "language": "es",
  "recipients": [                                 // required, 1..cap
    { "phone": "+584241234567", "variables": { "cliente": "Ana" } }
  ],
  "idempotency_key": "invoice-991"
}

→ 202 { "broadcast_id": "…", "accepted": 1, "rejected": [] }
→ 200 on idempotent replay (same body, not sent twice)
Track a campaign
GET /v1/partners/clients/{ref}/broadcasts/{id}     scope: broadcasts

→ 200 {
  "broadcast_id": "…", "template_name": "…", "status": "sent",
  "counts": { "delivered": 1 },
  "recipients": [ { "phone": "…", "status": "delivered", "reason": null } ]
}

Status codes

CodeMeaning
200OK, or an idempotent replay that did not repeat the side effect.
201WhatsApp connected.
202Campaign queued — delivery is asynchronous.
400Bad input we can name (invalid phone, Meta rejected the code).
401Missing, malformed, revoked or expired key.
403Valid key, wrong scope — or a suspended partner.
404Unknown client reference for your partner account.
409Conflict: WhatsApp not connected, or the number belongs to another workspace.
413More recipients than your per-call cap.
422Semantically invalid: missing placeholder, unapproved template, positional parameters.
429Rate limit exceeded.

Errors always carry a detail string meant to be read by a developer — it names the exact placeholder, phone or template at fault. Log it.