Skip to main content

Integrations (apps)

Everything under /apps configures a connected service — an email sender, a messaging channel, an AI provider, storage, or a calendar. It is the largest area of the API at 145 endpoints, but it is almost entirely one repeated shape.

The standard shape

Most integrations expose exactly five endpoints:

MethodEndpointPurpose
GET/apps/{provider}List configurations.
POST/apps/{provider}Create one.
DELETE/apps/{provider}Bulk delete — { "ids": [...] }.
GET/apps/{provider}/:idRead one.
PUT/apps/{provider}/:idUpdate one.

That covers smtp, ses, sendgrid, postmark, brevo, sparkpost, elasticemail, mailchimp, telegram, s3bucket, ocr, gemini, claude, offline-meeting, zoom, google-calendar.

Learn it once and only the credential fields in the POST body change per provider.

curl -X POST https://api.leadx.in/api/key/protected/apps/smtp \
-H "apikey: $KEY" -H "Content-Type: application/json" \
-d '{ "name": "Transactional", "host": "smtp.example.com", "port": 587,
"username": "postbox@example.com", "password": "...", "fromEmail": "hello@example.com" }'

Company-wide app settings — including which S3 bucket and which sender are the defaults — live at GET / PUT /apps.

Email senders

smtp · ses · sendgrid · postmark · brevo · sparkpost · elasticemail · mailchimp

All eight follow the standard shape. A configuration id from any of them is what you pass as smtp: { id } when creating a campaign.

Delivery events per provider are readable under /logs.

Gmail

Adds an OAuth dance to the standard shape:

MethodEndpointPurpose
GET/apps/gmail/redirectGet the consent URL to send the user to.
POST/apps/gmailComplete the callback with the returned code.
GET/apps/gmail/refreshRefresh the stored token.
GET / PUT/apps/gmail/:idRead / update.
GET / DELETE/apps/gmailList / delete.

WhatsApp Business

MethodEndpointPurpose
GET / POST/apps/whatsappList / create.
GET / PUT/apps/whatsapp/:idRead / update.
GET/apps/whatsapp/verify/:idRegister the number and subscribe the webhook.
POST/apps/whatsapp/oauth/initStart embedded signup.
POST/apps/whatsapp/oauth/callbackFinish embedded signup.

The verify step is not optional — without it Meta will not deliver inbound messages, and the unified inbox stays empty.

There is no bulk DELETE for WhatsApp apps; the route is commented out in source.

Instagram

19 endpoints covering OAuth and account management:

MethodEndpointPurpose
GET / POST/apps/instagramList / create.
GET / PUT/apps/instagram/:idRead / update.
POST/apps/instagram/oauth/initStart OAuth.
POST/apps/instagram/oauth/callbackComplete OAuth.
POST/apps/instagram/:id/oauth/refreshRefresh the long-lived token.

Instagram tokens expire. Refresh on a schedule or inbound DMs stop arriving.

Facebook lead ads

The richest integration — 22 endpoints, because it both configures the connection and syncs lead forms.

Setup

MethodEndpoint
POST/apps/facebook/apps
GET / PUT/apps/facebook/apps/:id
POST/apps/facebook/validate-token
GET/apps/facebook/pages

Forms and leads

MethodEndpointPurpose
GET/apps/facebook/page/formsForms on a page.
GET/apps/facebook/form/detailsOne form's definition.
GET/apps/facebook/form/leadsLeads on a form.
GET/apps/facebook/leadOne lead.
PUT/apps/facebook/lead/statusUpdate lead status.
PUT/apps/facebook/forms/:idUpdate form mapping.

Sync

MethodEndpointScope
GET/apps/facebook/sync/form-leads/:idOne form's leads.
GET/apps/facebook/sync/page-forms/:idOne page's forms.
GET/apps/facebook/sync/page-forms-leads/:idOne page: forms and leads.
GET/apps/facebook/sync/pages-formsAll pages' forms.
GET/apps/facebook/sync/pages-forms-leadsEverything.
GET/apps/facebook/sync/manual-jobQueue a manual sync.
GET/apps/facebook/sync/process-jobProcess the queue.
GET/apps/facebook/sync/job-status/:jobIdJob status.
GET/apps/facebook/sync/scheduleSet up periodic sync.
GET/apps/facebook/sync/webhook-failuresReplay leads whose webhook failed.

webhook-failures is the recovery path when Meta's webhook did not reach you — check it if lead counts look short.

Leads arriving this way carry formId, pageId, and ad attribution (ad_id, ad_name, adset_id, adset_name, campaignId, campaignName).

AI providers

ProviderEndpoints
Geministandard five, plus GET /apps/gemini/models
Claudestandard five, plus GET /apps/claude/models

Use the models endpoints to discover what the configured credentials can actually call rather than hard-coding model names. AI Genie and AI CRM chat both require Gemini to be configured and present in your plan.

Meetings and calendars

Company-level (shared configuration): /apps/zoom, /apps/google-calendar, /apps/offline-meeting — each with the standard five plus a POST .../redirect for OAuth.

Member-level (the calling member's own account):

MethodEndpoint
GET / POST/my-zoom, /my-google-calendar
POST/my-zoom/redirect, /my-google-calendar/redirect
GET / PUT/my-zoom/default, /my-google-calendar/default
GET/my-zoom/:id, /my-google-calendar/:id

Since an API key is a member, the /my-* endpoints act on the account of the member who created the key.

Meetings themselves: GET / POST /meeting, GET /meeting/:id. Update and cancel routes exist in source but are commented out.

Storage and OCR

  • /apps/s3bucket — standard five, plus PUT /apps/s3bucket for a bulk update. Setting a default bucket changes where uploads land.
  • /apps/ocr — standard five, plus POST /apps/ocr/image to run OCR on an image (business-card capture).