REST API Reference
Every endpoint exposed by the ixblix public API. Base URL: https://api.ixblix.app.
All paths are prefixed with /api. Responses are JSON. Errors follow the
standard error format.
X-API-Key company-scoped endpoints. HTTP Basic integrator-scoped endpoints. Token customer-facing endpoints (no header needed). Public unauthenticated.
Table of contents
- Integrators
- Companies — onboarding
- Companies — profile & customization
- Encryption keys
- Conversations
- Messages
- Media
- Contacts
- Payments & credits
- Plans
- Key transfer
- Webhooks relay
- Installation
Integrators
/integrators/register HTTP Basic Register a new integrator platform. Three-way handshake via callbackUrl.
// Request
{
"name": "My CRM",
"hostname": "mycrm.example.com",
"callbackUrl": "https://mycrm.example.com/ixblix/callback",
"force": false,
"subscriptionId": "asaas:sub_xxx"
}
// Response 200
{ "success": true, "message": "Registration challenge sent" } /integrators/profile HTTP Basic Fetch the authenticated integrator's profile.
Companies — onboarding
/companies/register HTTP Basic Register a company (keyless). Returns payment instructions.
// Request
{
"name": "Acme Support",
"planId": "plan_starter",
"email": "billing@acme.example",
"taxId": "12345678000199",
"confirmationWebhookUrl": "https://mycrm.example.com/ixblix/activated"
}
// Response 200
{
"company": { "id": "...", "name": "...", "status": "PENDING_PAYMENT" },
"payment": {
"transactionId": "txn_xxx",
"provider": "asaas",
"amountCents": 4990,
"currency": "BRL",
"confirmationUrl": "...",
"checkoutUrl": "https://checkout.asaas.com/...",
"status": "PENDING"
}
} /companies/{id}/activate/{transactionId} HTTP Basic Activate a company after payment confirmation. Returns the API key.
// Response 200
{ "apiKey": "smci_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "status": "ACTIVE" } /companies/payment/{transactionId} Public Fetch payment status for a transaction. Safe — the transactionId is in the URL.
/companies HTTP Basic List all companies under the authenticated integrator.
Companies — profile & customization
/companies/profile X-API-Key Fetch the authenticated company's profile, including white-label customization.
// Response 200
{
"id": "...",
"name": "Acme Support",
"status": "ACTIVE",
"websiteUrl": "https://acme.example",
"customizations": {
"id": "...",
"brandName": "Acme",
"logoUrl": "...",
"rectangularLogoUrl": "...",
"squareIconUrl": "...",
"primaryColor": "#2563eb",
"faviconUrl": "...",
"websiteUrl": "https://acme.example",
"welcomeMessage": "Hello! How can we help?"
}
} /companies/balance X-API-Key Fetch the company's prepaid balance and plan state.
/companies/customization X-API-Key Update white-label customization (brand name, logos, colors, welcome message).
/companies/branding X-API-Key Upload branding assets (square icon and/or rectangular logo) as multipart/form-data.
/companies/webhook X-API-Key Set or rotate the webhook endpoint. Returns the HMAC secret once.
// Request
{ "webhookUrl": "https://mycrm.example.com/ixblix/webhook", "rotateSecret": true }
// Response 200
{ "webhookUrl": "...", "webhookSecret": "whsec_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } /companies/configuration X-API-Key Update company configuration (name, website URL, etc.).
/companies/public/{id} Public Fetch a company's public profile by ID (used by the customer web app).
Encryption keys
/companies/encryption-key X-API-Key Register or rotate the company's RSA public key for E2EE.
// Request
{ "keyId": "xxxxxxxxxxxxxxxx", "publicKey": "base64-spki-der..." }
// Response 200
{
"id": "...",
"keyId": "xxxxxxxxxxxxxxxx",
"publicKey": "...",
"status": "ACTIVE",
"activatedAt": "...",
"retiredAt": null,
"createdAt": "..."
} /companies/encryption-key X-API-Key Fetch the currently active company encryption key.
Conversations
/conversations X-API-Key Create an overflow conversation for a contact. Returns a deeplink to share.
// Request
{
"contact": {
"externalId": "whatsapp_5511999999999",
"name": "Jane Doe",
"metadata": { "phone": "+55 11 99999-9999" }
},
"operator": {
"uuid": "agent-42",
"name": "Maria Silva",
"image": "https://cdn.example.com/avatars/maria.png"
}
}
// Response 200
{
"conversation": { "id": "...", "token": "...", "status": "ACTIVE", "keyStatus": "AWAITING_CUSTOMER", "createdAt": "..." },
"contact": { "id": "...", "externalId": "...", "name": "Jane Doe", "consentStatus": "PENDING" },
"deeplink": "https://app.ixblix.app/c/...",
"company": { "id": "...", "name": "Acme", "customizations": { "brandName": "..." } },
"operator": { "uuid": "agent-42", "name": "Maria Silva" }
} /conversations/by-key Public List conversations by customer public key (used during key transfer).
/conversations/{token} Token Fetch a conversation by its token (customer-facing).
/conversations/{token}/close Token Close a conversation (customer-side).
/conversations/{token}/key Token Register the customer's public key (called when the customer opens the deeplink).
/conversations/{token}/erase Token Erase the encrypted content of a conversation (LGPD/data retention).
/conversations/{ref}/presence Mixed
Unified presence route. With X-API-Key (ref = conversation id), emits a Socket.io
presence event to the customer. Without API key (ref = deeplink token), emits a
TYPING/RECORDING/CHAT_CLOSED webhook to the operator.
/conversations/{conversationId}/keys X-API-Key Fetch the E2EE key state of a conversation (operator view).
/conversations/{conversationId}/operator X-API-Key Update the operator identity attached to a conversation.
Messages
/messages/company X-API-Key Send an encrypted message from the company to the contact. The operator identity (name, image, gravatarHash) is embedded in the encrypted attachments JSON as { "operator": { ... } } so the customer client can render the correct avatar per message.
// Request
{
"conversationId": "...",
"content": "base64-ciphertext...",
"contentType": "text",
"iv": "base64-iv",
"authTag": "base64-auth-tag",
"encryptedKey": "base64-wrapped-key",
"selfEncryptedKey": "base64-wrapped-key",
"keyId": "xxxxxxxxxxxxxxxx",
"operatorUuid": "550e8400-e29b-41d4-a716-446655440000",
"replyToId": "...",
"attachments": "encrypted-json-blob"
}
// Response 200
{ "id": "...", "conversationId": "...", "senderType": "COMPANY", "content": "...", "contentEncrypted": true } /messages/contact Token Send an encrypted message from the contact to the company.
/messages/company/delivered X-API-Key Mark a contact-sent message as delivered to the operator. Emits message_delivered Socket.io event. No-op once the message is read.
/messages/company/read X-API-Key Mark a contact-sent message as read by the operator. Emits message_read Socket.io event. Only report a read when the window is focused and the message is in the viewport.
/messages/contact/delivered Token Mark a company-sent message as delivered to the contact. Emits MESSAGE_DELIVERED webhook. No-op once the message is read.
/messages/contact/read Token Mark a company-sent message as read by the contact. Emits MESSAGE_READ webhook. Only reported when the window is focused and the message is in the viewport.
/messages/{conversationId} X-API-Key List all messages of a conversation (content is always ciphertext when encrypted).
Media
/media/company X-API-Key Upload encrypted media from the company (multipart/form-data).
curl -X POST https://api.ixblix.app/api/media/company \
-H "X-API-Key: smci_xxxx" \
-F "conversationId=..." \
-F "file=@invoice.pdf" \
-F "iv=..." \
-F "authTag=..." \
-F "encryptedKey=..." \
-F "selfEncryptedKey=..." \
-F "keyId=..." \
-F "operatorUuid=550e8400-e29b-41d4-a716-446655440000" /media/contact Token Upload encrypted media from the contact.
/media/{mediaId} X-API-Key Fetch media metadata (envelope + file info).
/media/contact/{mediaId} Token Fetch media metadata (customer-facing).
/media/{mediaId}/content X-API-Key Download the raw encrypted bytes of a media file.
/media/contact/{mediaId}/content Token Download the raw encrypted bytes (customer-facing).
Contacts
/contacts/{token} Token Fetch a contact by conversation token.
/contacts/{token}/consent Token Update the contact's consent status (LGPD).
// Request
{ "consentStatus": "GRANTED" }
// Response 200
{ "id": "...", "externalId": "...", "consentStatus": "GRANTED", "consentedAt": "..." } Payments & credits
/payment/providers Public List available payment providers.
/payment/checkout/{transactionId}/options Public Fetch available payment instruments for a checkout.
/payment/checkout/{transactionId}/card Public Pay a checkout with a credit card.
/payment/checkout/{transactionId}/pix-automatic Public Pay a checkout with Pix Automático.
/payment/checkout/{transactionId}/status Public Fetch the status of a checkout transaction.
/payment/webhooks/{provider} Public Gateway callback endpoint. Mounted with express.raw for signature verification.
/companies/credits/purchase X-API-Key Purchase prepaid credits for the authenticated company.
/companies/credits/purchases X-API-Key List the company's credit purchases.
/companies/payment-methods/setup X-API-Key Start a payment method setup flow (e.g. add a card).
/companies/payment-methods X-API-Key Register a payment method after setup.
/companies/payment-methods X-API-Key List stored payment methods (default first).
/companies/payment-methods/{id}/default X-API-Key Set a payment method as the default.
/companies/payment-methods/{id} X-API-Key Delete a payment method.
/companies/payment-change/options X-API-Key Fetch available payment instruments for re-subscribing or switching methods.
/companies/payment-change/start X-API-Key Start a payment change checkout. Returns a hosted checkout URL.
Plans
/plans HTTP Basic List all active subscription plans.
// Response 200
[
{
"id": "plan_starter",
"name": "Starter",
"description": "Up to 100 conversations/month",
"billingType": "CONVERSATIONS",
"includedConversations": 100,
"includedMessages": null,
"durationDays": 30,
"priceCents": 4990,
"overagePriceCents": 50,
"isActive": true,
"isPublic": true,
"createdAt": "..."
}
] Key transfer
Key transfer allows a customer to migrate their encryption key to a new device. The flow is unauthenticated and rate-limited.
/key-transfer Public Create a new key transfer request.
/key-transfer/{transferId} Public Fetch a key transfer request.
/key-transfer/{transferId} Public Delete a key transfer request.
/key-transfer/{transferId}/confirm Public Confirm a key transfer (customer approves on the new device).
/key-transfer/{transferId}/status Public Fetch the status of a key transfer.
Webhooks relay
/webhooks/original-channel X-API-Key Relay a message from the original channel (WhatsApp, Instagram, etc.) into ixblix.
// Request
{
"conversationId": "...",
"content": "base64-ciphertext",
"iv": "...",
"authTag": "...",
"encryptedKey": "...",
"selfEncryptedKey": "...",
"keyId": "...",
"metadata": { "channelMessageId": "..." }
} Installation
/installation Public Fetch the installation configuration (used by the customer web app to discover the API).
Interactive documentation
The full OpenAPI spec is served at ixblix.app/docs/api with interactive try-it-out. The spec auto-detects the browser language (English, Portuguese, Spanish).