Integrations
Integrations endpoints of the Zanfia Workspace API, with schemas and code samples.
The credential-bearing connections behind Settings → Integrations, under the dedicated integrations:read / integrations:write scopes (a products key deliberately cannot plant a gateway or swap your ESP): email-marketing accounts (ActiveCampaign, Kit, MailerLite, MailChimp, GetResponse, Pipedrive — connect, disconnect, refresh lists), manual Meta pixel + Conversions API entries, and the manual (wire-transfer) payment method. Keys and tokens are verified against the provider before anything is stored, go to Secret Manager, and are never returned. OAuth-based providers (Stripe Connect, Meta OAuth, Google, social networks) and the credential payment gateways stay dashboard-only for now; the pixel integrations (GA4, GTM, TikTok, X, LinkedIn, Clarity, Hotjar) live under Conversion tracking. All routes require a Authorization: Bearer header — see Authentication.
Integrations overview
/integrationsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/integrations"{ "emailClients": [ { "client": "ActiveCampaign", "url": "string", "name": "string", "listsCount": 0, "tagsCount": 0, "serverPrefix": "string", "createdAt": "string", "updatedAt": "string" } ], "metaConversionApi": [ { "id": "string", "name": "string", "pixelId": "string", "serverSide": true, "disabled": true, "isWorkspaceDefault": true, "trackPurchase": true, "trackInitCheckout": true, "trackAddToCart": true, "trackTrialStarted": true, "createdAt": "string", "updatedAt": "string" } ], "conversionTrackingIntegrationsCount": 0, "invoicesClients": [ { "client": "fakturownia", "id": "string", "url": "string", "createdAt": "string" } ], "payments": { "stripe": true, "payU": true, "tpay": true, "payNow": true, "przelewy24": true, "paypal": true, "dodo": true, "manual": { "name": "string", "instructions": "string", "updatedAt": "string" } }, "sms": { "defaultProvider": "twilio", "twilio": { "accountSid": "string", "region": "us1", "senderKind": "messagingService", "sender": "string", "senderLabel": "string" }, "smsapi": { "region": "pl", "sender": "string", "senders": [ "string" ], "accountName": "string", "needsReconnect": true } }}{ "error": "string", "message": "string"}Connect an email client
/integrations/email-clientsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /integrations/email-clients — discriminated by client; the key is verified against the provider first.
POST /integrations/email-clients — discriminated by client; the key is verified against the provider first.
Response Body
application/json
application/json
curl -X POST "https://example.com/integrations/email-clients" \ -H "Content-Type: application/json" \ -d '{ "client": "ActiveCampaign", "url": "string", "apiKey": "string" }'{ "client": "ActiveCampaign", "url": "string", "name": "string", "listsCount": 0, "tagsCount": 0, "serverPrefix": "string", "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Disconnect an email client
/integrations/email-clients/disconnectAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /integrations/email-clients/disconnect — 409 account-in-use lists the products still using it.
Response Body
application/json
application/json
curl -X POST "https://example.com/integrations/email-clients/disconnect" \ -H "Content-Type: application/json" \ -d '{ "client": "ActiveCampaign", "url": "string" }'{ "status": "ok"}{ "error": "string", "message": "string"}Refresh an email client's lists
/integrations/email-clients/refresh-listsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /integrations/email-clients/refresh-lists — re-fetches lists + tags with the stored key.
POST /integrations/email-clients/refresh-lists — re-fetches lists + tags with the stored key.
Response Body
application/json
application/json
curl -X POST "https://example.com/integrations/email-clients/refresh-lists" \ -H "Content-Type: application/json" \ -d '{ "client": "ActiveCampaign", "url": "string" }'{ "client": "ActiveCampaign", "url": "string", "name": "string", "listsCount": 0, "tagsCount": 0, "serverPrefix": "string", "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Add or edit a Meta pixel / Conversions API entry
/integrations/meta-conversion-apiAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PUT /integrations/meta-conversion-api — create (no id) or edit (with id) a manual Meta pixel + Conversions API entry. accessToken is validated against Meta before saving; omitted on edit = keep the stored token.
Response Body
application/json
application/json
curl -X PUT "https://example.com/integrations/meta-conversion-api" \ -H "Content-Type: application/json" \ -d '{ "pixelId": "string", "name": "string", "trackInitCheckout": true, "trackAddToCart": true, "trackPurchase": true }'{ "id": "string", "name": "string", "pixelId": "string", "serverSide": true, "disabled": true, "isWorkspaceDefault": true, "trackPurchase": true, "trackInitCheckout": true, "trackAddToCart": true, "trackTrialStarted": true, "createdAt": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Remove a Meta pixel / Conversions API entry
/integrations/meta-conversion-api/{integrationId}Authorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Path Parameters
Response Body
application/json
application/json
curl -X DELETE "https://example.com/integrations/meta-conversion-api/string"{ "status": "ok"}{ "error": "string", "message": "string"}Configure the manual payment method
/integrations/payments/manualAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PUT /integrations/payments/manual — configure the wire-transfer payment method.
Response Body
application/json
application/json
curl -X PUT "https://example.com/integrations/payments/manual" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "instructions": "string" }'{ "name": "string", "instructions": "string", "updatedAt": "string"}{ "error": "string", "message": "string"}Remove the manual payment method
/integrations/payments/manualAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X DELETE "https://example.com/integrations/payments/manual"{ "status": "ok"}{ "error": "string", "message": "string"}Connect an invoicing account
/integrations/invoices-clientsAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /integrations/invoices-clients — discriminated by client; id present = edit.
POST /integrations/invoices-clients — discriminated by client; id present = edit.
Response Body
application/json
application/json
curl -X POST "https://example.com/integrations/invoices-clients" \ -H "Content-Type: application/json" \ -d '{ "client": "fakturownia", "url": "string", "apiKey": "string", "accountName": "string" }'{ "client": "fakturownia", "id": "string", "url": "string", "createdAt": "string"}{ "error": "string", "message": "string"}Disconnect an invoicing account
/integrations/invoices-clients/disconnectAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /integrations/invoices-clients/disconnect — client + entry id.
Response Body
application/json
application/json
curl -X POST "https://example.com/integrations/invoices-clients/disconnect" \ -H "Content-Type: application/json" \ -d '{ "client": "fakturownia", "id": "string" }'{ "status": "ok"}{ "error": "string", "message": "string"}Connect a payment gateway
/integrations/payments/gatewaysAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /integrations/payments/gateways — discriminated by gateway; credentials are verified against the gateway first.
POST /integrations/payments/gateways — discriminated by gateway; credentials are verified against the gateway first.
Response Body
application/json
application/json
curl -X POST "https://example.com/integrations/payments/gateways" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "posId": "string", "clientId": "string", "clientSecret": "string", "clientSecondKey": "string", "gateway": "payu" }'{ "stripe": true, "payU": true, "tpay": true, "payNow": true, "przelewy24": true, "paypal": true, "dodo": true, "manual": { "name": "string", "instructions": "string", "updatedAt": "string" }}{ "error": "string", "message": "string"}Disconnect a payment gateway
/integrations/payments/gateways/disconnectAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
POST /integrations/payments/gateways/disconnect.
Response Body
application/json
application/json
curl -X POST "https://example.com/integrations/payments/gateways/disconnect" \ -H "Content-Type: application/json" \ -d '{ "gateway": "payu" }'{ "stripe": true, "payU": true, "tpay": true, "payNow": true, "przelewy24": true, "paypal": true, "dodo": true, "manual": { "name": "string", "instructions": "string", "updatedAt": "string" }}{ "error": "string", "message": "string"}Toggle Tpay recurring BLIK
/integrations/payments/tpay/recurring-blikAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PUT /integrations/payments/tpay/recurring-blik.
Response Body
application/json
application/json
curl -X PUT "https://example.com/integrations/payments/tpay/recurring-blik" \ -H "Content-Type: application/json" \ -d '{ "enabled": true }'{ "status": "ok"}{ "error": "string", "message": "string"}Connect Twilio
/integrations/sms/twilioAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PUT /integrations/sms/twilio — the auth token / API key secret is verified against Twilio first.
Response Body
application/json
application/json
curl -X PUT "https://example.com/integrations/sms/twilio" \ -H "Content-Type: application/json" \ -d '{ "accountSid": "string", "authToken": "string", "senderKind": "messagingService", "sender": "string" }'{ "accountSid": "string", "region": "us1", "authKind": "authToken", "accountName": "string", "senderKind": "messagingService", "sender": "string", "senderLabel": "string"}{ "error": "string", "message": "string"}Disconnect Twilio
/integrations/sms/twilioAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X DELETE "https://example.com/integrations/sms/twilio"{ "status": "ok"}{ "error": "string", "message": "string"}Connect SMSAPI
/integrations/sms/smsapiAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
PUT /integrations/sms/smsapi — the token is verified against SMSAPI first.
Response Body
application/json
application/json
curl -X PUT "https://example.com/integrations/sms/smsapi" \ -H "Content-Type: application/json" \ -d '{ "region": "pl", "apiToken": "string", "sender": "string" }'{ "region": "pl", "accountName": "string", "sender": "string", "points": 0}{ "error": "string", "message": "string"}Disconnect SMSAPI
/integrations/sms/smsapiAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X DELETE "https://example.com/integrations/sms/smsapi"{ "status": "ok"}{ "error": "string", "message": "string"}Refresh SMSAPI senders
/integrations/sms/smsapi/refresh-sendersAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Response Body
application/json
application/json
curl -X POST "https://example.com/integrations/sms/smsapi/refresh-senders"{ "senders": [ "string" ], "sender": "string"}{ "error": "string", "message": "string"}Set the default SMSAPI sender
/integrations/sms/smsapi/default-senderAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/integrations/sms/smsapi/default-sender" \ -H "Content-Type: application/json" \ -d '{ "sender": "string" }'{ "senders": [ "string" ], "sender": "string"}{ "error": "string", "message": "string"}Set the default SMS provider
/integrations/sms/default-providerAuthorization
bearerAuth API key from Dashboard → Integrations → API, MCP and CLI.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Picks which connected provider workflows (and any send without an explicit pick) go through. Only a provider that is connected qualifies.
Response Body
application/json
application/json
curl -X PUT "https://example.com/integrations/sms/default-provider" \ -H "Content-Type: application/json" \ -d '{ "provider": "twilio" }'{ "defaultProvider": "twilio"}{ "error": "string", "message": "string"}Was this article helpful?

