Create an API key (api_keys.manage, recent authentication). The key is shown only in this response.
const url = 'https://api.replifier.com/v1/orgs/org_01hx0000000000000000000000/api-keys';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","scopes":["contacts.read"],"brandId":"example","expiresAt":"2026-04-15T12:00:00Z"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.replifier.com/v1/orgs/org_01hx0000000000000000000000/api-keys \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "scopes": [ "contacts.read" ], "brandId": "example", "expiresAt": "2026-04-15T12:00:00Z" }'Scopes: contacts.read, contacts.write, campaigns.write, campaigns.send, messages.send, reports.read, conversions.write, media.read, media.write (drive), webhooks.manage (register and delete outgoing webhooks, for Zapier and Make REST hooks), brands.read (list brands), lists.read (count the audience of a list), whatsapp.send (send WhatsApp messages through a connected number), flows.write (enroll a contact in a flow); at least one. Expiration required: at most 365 days, or less if the organization sets settings.api_key_max_days (400 api_key_expiry_invalid). brandId binds the key to a single brand. No Idempotency-Key: the response carries a secret and is not stored.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
org_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Key created
object
The full key. Shown only in this response; Replifier does not store it.
Example
{ "scopes": [ "contacts.read" ], "status": "active"}Invalid data
object
object
Example
{ "error": { "code": "not_found" }}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}