Workspace API

Integracje

Endpointy „Integracje” Zanfia Workspace API — ze schematami i przykładami kodu.

10 min czytaniaOstatnia aktualizacja: 30 wrz 2026

Połączenia z danymi dostępowymi stojące za Ustawienia → Integracje, pod dedykowanymi scope’ami integrations:read / integrations:write (klucz do produktów celowo nie może podpiąć bramki ani podmienić ESP): konta mailingowe (ActiveCampaign, Kit, MailerLite, MailChimp, GetResponse, Pipedrive — połączenie, odłączenie, odświeżenie list), ręczne wpisy Meta pixel + Conversions API oraz płatność ręczna (przelew). Klucze i tokeny są weryfikowane u dostawcy przed zapisem, trafiają do Secret Managera i nigdy nie są zwracane. Dostawcy OAuth (Stripe Connect, Meta OAuth, Google, social media) i bramki płatnicze z danymi logowania pozostają na razie tylko w panelu; integracje pikselowe (GA4, GTM, TikTok, X, LinkedIn, Clarity, Hotjar) są w sekcji Śledzenie konwersji. Wszystkie endpointy wymagają nagłówka Authorization: Bearer — zobacz Uwierzytelnianie.

Przegląd integracji

GET/integrations

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Połącz klienta mailingowego

POST/integrations/email-clients

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Odłącz klienta mailingowego

POST/integrations/email-clients/disconnect

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Odśwież listy klienta mailingowego

POST/integrations/email-clients/refresh-lists

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Dodaj lub edytuj wpis Meta pixel / Conversions API

PUT/integrations/meta-conversion-api

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Usuń wpis Meta pixel / Conversions API

DELETE/integrations/meta-conversion-api/{integrationId}

Authorization

bearerAuth
AuthorizationBearer <token>

API key from Dashboard → Integrations → API, MCP and CLI.

In: header

Path Parameters

integrationId*string

Response Body

application/json

application/json

curl -X DELETE "https://example.com/integrations/meta-conversion-api/string"
{  "status": "ok"}
{  "error": "string",  "message": "string"}

Skonfiguruj płatność ręczną (przelew)

PUT/integrations/payments/manual

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Usuń płatność ręczną

DELETE/integrations/payments/manual

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Połącz konto fakturowania

POST/integrations/invoices-clients

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Odłącz konto fakturowania

POST/integrations/invoices-clients/disconnect

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Połącz bramkę płatności

POST/integrations/payments/gateways

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Odłącz bramkę płatności

POST/integrations/payments/gateways/disconnect

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Włącz / wyłącz cykliczny BLIK Tpay

PUT/integrations/payments/tpay/recurring-blik

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Połącz Twilio

PUT/integrations/sms/twilio

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Odłącz Twilio

DELETE/integrations/sms/twilio

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Połącz SMSAPI

PUT/integrations/sms/smsapi

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Odłącz SMSAPI

DELETE/integrations/sms/smsapi

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Odśwież nadawców SMSAPI

POST/integrations/sms/smsapi/refresh-senders

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Ustaw domyślnego nadawcę SMSAPI

PUT/integrations/sms/smsapi/default-sender

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Ustaw domyślnego dostawcę SMS

PUT/integrations/sms/default-provider

Authorization

bearerAuth
AuthorizationBearer <token>

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"}

Czy ten artykuł był pomocny?

Powiązane artykuły

Coś się nie zgadza? Napisz do nas na support@zanfia.com.