Skip to content

Agency Inbound API

Provision sub-accounts from your own system. Create a client, change which channels they can use, and remove them — without opening the GetRaze agency panel.

This API is for whitelabel agencies. Each agency gets its own endpoint and its own tokens.

Different from the rest of this reference

The Agency Inbound API does not use X-API-Key or the https://app.getraze.com/external/v1 base URL. It has its own base URL, its own Bearer token and its own permission scopes, all described below.

Base URL

https://api.getraze.co/api/webhooks/agency/<agency_key>

agency_key identifies your agency. It is public — not a secret — and it never changes, so an integration you publish today keeps working after you rename your agency or change your subdomain.

Find your endpoint and manage your tokens in the agency panel, under API & Webhooks.

Authentication

Send your token in the Authorization header. Never put it in the URL — URLs end up in proxy and CDN logs.

Authorization: Bearer raz_ag_live_xxxxxxxxxxxxxxxx

A token only works on the endpoint of the agency that owns it. Using it on another agency's URL returns 401.

Scopes

Each token carries a set of scopes. Calling an operation without its scope returns 403 INVALID_SCOPE.

ScopeAllowsGranted by default
sub_account.createCreate sub-accountsYes
sub_account.channelsChange channel quotasYes
sub_account.deleteDelete sub-accountsYes
sub_account.credentialsReceive the admin's temporary password in the responseNo

Grant sub_account.credentials only if your system really needs the password. Without it, the new admin receives a welcome email with their access instead.

Idempotency

Send a unique Idempotency-Key header on every write. If the same key arrives twice for the same agency, we return the result of the first execution instead of running the operation again.

Idempotency-Key: 8f14e45f-ea4d-4a2c-9f34-1c7b0a2e5d31

Without the key, every call is a brand-new operation — retrying a request that timed out could create a second sub-account.

A replayed call responds with replayed: true:

json
{
  "ok": true,
  "replayed": true,
  "event_id": "3f7b1c2e-9a44-4d1b-8f2e-6c5a1b0d9e83",
  "data": { "id": "a1b2c3d4-5678-4e9f-a0b1-c2d3e4f5a6b7" }
}

TIP

A replay returns the stored result. The admin's temporary password is never stored, so it is not present on a replay — only on the first response.

Identifying a sub-account

Routes that act on an existing sub-account accept two forms:

FormExampleNotes
Our UUIDa1b2c3d4-5678-4e9f-a0b1-c2d3e4f5a6b7Returned when you create it
Your own IDext:client-42Requires external_ref sent at creation

ext: lets your CRM keep using its own identifier. external_ref is unique per agency among live sub-accounts — deleting one frees the reference for reuse.

Channels

Channel quotas are expressed as a plain object:

json
{ "linkedin": 2, "whatsapp": 1 }
ChannelMeaning
linkedinLinkedIn accounts the client can connect
whatsappWhatsApp numbers
instagramInstagram accounts
email_marketingEmail sending domains

Values are integers from 0 to 100.

The object is declarative

channels describes the final state, not a delta. A channel you omit goes to zero. To keep WhatsApp while raising LinkedIn, send both.

Adding billable channels charges your agency immediately on the card on file, pro-rata to the end of the current cycle. Removing them does not generate a credit.

Response format

Every response carries ok and, for writes, the event_id of the recorded call.

Success

json
{
  "ok": true,
  "event_id": "3f7b1c2e-9a44-4d1b-8f2e-6c5a1b0d9e83",
  "data": { }
}

Error

json
{
  "ok": false,
  "code": "EMAIL_ALREADY_REGISTERED",
  "message": "This email is already registered to another account.",
  "event_id": "3f7b1c2e-9a44-4d1b-8f2e-6c5a1b0d9e83"
}

Use event_id to look the call up later — see Retrieve an event — or to find it in the Events tab of the agency panel.

Retries

A call that fails for a transient reason (a database or payment-gateway timeout) is retried automatically in the background, up to five attempts with exponential backoff. Those respond 500 INTERNAL and stay visible as pending until they settle.

Business errors — a duplicate email, a declined card, a missing field — are not retried. Fix the cause and either send a new call with a new Idempotency-Key, or press Reprocess on the event in the agency panel.

Rate limits

LimitScopeResponse
300 requests/minutePer IP address429 RATE_LIMIT_IP
60 requests/minutePer token429 RATE_LIMIT_API
5 sub-accounts/hourPer agency429 RATE_LIMIT_SUBACCOUNT_CREATE

Request bodies are capped at 64 KB.

Tokens can optionally be restricted to a list of IP addresses. Calls from anywhere else return 403 IP_NOT_ALLOWED.

Using no-code tools

Make, n8n, Zapier and similar tools often cannot send DELETE or a PUT with a body. Every operation has a POST alias:

OperationCanonicalPOST alias
Update channelsPUT /sub-accounts/:ref/channelsPOST /sub-accounts/:ref/channels
Delete sub-accountDELETE /sub-accounts/:refPOST /sub-accounts/:ref/delete

Both forms behave identically and require the same scope.

Errors

StatusCodeDescription
400MISSING_FIELDSA required field is absent
400INVALID_CHANNELSUnknown channel, or a value outside 0–100
400INVALID_EXTERNAL_REFexternal_ref is not a string of up to 120 characters
400CONFIRMATION_REQUIREDDeletion without "confirm": true
401UNAUTHORIZEDMissing, unknown, revoked or wrong-agency token
402NO_PAYMENT_METHODThe agency has no card on file
402SEAT_CHARGE_FAILEDThe pro-rata charge was declined
403INVALID_SCOPEThe token lacks the scope for this operation
403IP_NOT_ALLOWEDCaller IP is not in the token's allowlist
403AGENCY_NOT_APPROVEDThe agency has not been approved yet
403AGENCY_SUSPENDEDThe agency is suspended for non-payment
403AGENCY_CANCELLEDThe agency has been cancelled
403AGENCY_INACTIVEThe account is not an active agency
403SUB_ACCOUNT_FORBIDDENThe sub-account belongs to another agency
404SUB_ACCOUNT_NOT_FOUNDNo live sub-account for that reference
404EVENT_NOT_FOUNDNo event with that id for this agency
409EMAIL_ALREADY_REGISTEREDThe admin email is already in use
409EXTERNAL_REF_ALREADY_USEDAnother live sub-account already uses that external_ref
409IN_PROGRESSA call with this Idempotency-Key is still running
429RATE_LIMIT_IPToo many requests from this IP
429RATE_LIMIT_APIToo many requests for this token
429RATE_LIMIT_SUBACCOUNT_CREATEMore than 5 sub-accounts in one hour
500INTERNALTransient failure; the call will be retried automatically

GetRaze - AI-Powered Lead Generation