n8n-nodes-pilot-status 2.24.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `n8n-nodes-pilot-status`.
|
|
4
4
|
|
|
5
|
+
## 2.24.1 - 2026-12-01
|
|
6
|
+
|
|
7
|
+
### Changed (BREAKING)
|
|
8
|
+
|
|
9
|
+
- Number → List Contacts / Get Contact / Get Contact Picture / Block / Unblock descriptions
|
|
10
|
+
follow the simplified API responses. Contacts are `{ phone, name, whatsappName }` (removed
|
|
11
|
+
`lid`, `jid`, `firstName`, `fullName`, `businessName`, `pushName`, `found`); the list lost
|
|
12
|
+
`totalPages`; the picture is `{ phone, url }` (removed `jid`, `pictureId`,
|
|
13
|
+
`cachedForSeconds`); block/unblock answer `{ phone, blocked }` (removed `success`,
|
|
14
|
+
`numberId`, `provider`, `jid`, `occurredAt`). `phone` is E.164 or `<id>@lid` (opaque).
|
|
15
|
+
|
|
5
16
|
## 2.24.0 - 2026-11-30
|
|
6
17
|
|
|
7
18
|
### Added
|
package/README.md
CHANGED
|
@@ -123,12 +123,12 @@ The **Pilot Status** node provides several resources and operations to manage yo
|
|
|
123
123
|
|
|
124
124
|
> ⚠️ **Delete changed meaning.** It used to destroy the number and free the phone for immediate reconnection. It is now a **30-day soft delete**: the device is logged out, the row survives, and the response carries `restorableUntil`. Use **Restore** to undo it (you must reconnect afterwards) or **Purge** for the old, irreversible behaviour. Deleting still does **not** reduce paid capacity — the freed slot stays available to reconnect another number this cycle.
|
|
125
125
|
|
|
126
|
-
- **Create:** Provision a new WhatsApp number instance. It returns a base64 QR Code and optional `pairingCode` (letter code) for WhatsApp “link a device”, plus `numberId` — the **number** id (the one Get Many, Delete and the webhooks' `data.numberId` use)
|
|
126
|
+
- **Create:** Provision a new WhatsApp number instance. It returns a base64 QR Code and optional `pairingCode` (letter code) for WhatsApp “link a device”, plus `numberId` — the **number** id (the one Get Many, Delete and the webhooks' `data.numberId` use). By default, the number is linked to the API Key used in the request.
|
|
127
127
|
- **Connect (QR + pairing code):** Regenerate QR and pairing code for an existing instance (only when not `OPEN`).
|
|
128
128
|
- **Get Status:** Check the connection status of a WhatsApp instance (e.g., `CONNECTING`, `OPEN`).
|
|
129
129
|
- **Get:** Full detail of one number, including the `settings` block and — for official Meta numbers — the nested `meta` block.
|
|
130
130
|
- **Delete:** Soft-delete (30 days, reversible — see the warning above).
|
|
131
|
-
- **Restore:** Undo a soft-delete inside the window. Gives back the **row**, not the connection: run **Connect** afterwards
|
|
131
|
+
- **Restore:** Undo a soft-delete inside the window. Gives back the **row**, not the connection: run **Connect** afterwards. Answers `{ id }`.
|
|
132
132
|
- **Purge:** Irreversible hard delete. Cascades chat, messages, templates and keys, and tears the number down at Meta.
|
|
133
133
|
- **Logout:** Unpair the device without deleting anything — id, keys, webhooks and history are kept.
|
|
134
134
|
- **Pay Extra Charge:** Pay now the extra-number charge of one number (`POST /numbers/{id}/pay`, no body). A number past the paid capacity is charged when it first connects; if that charge is refused, **sending** from it is blocked (`409 NUMBER_BLOCKED`, `reason: "extra_charge_unpaid"`) until it is paid — **Get** shows `extraChargeUnpaidSince` and, for a non-Meta number, `extraChargeDisconnectAt` (when it is disconnected if it stays unpaid). With a card on file this **charges** it, and it needs a **tenant-scoped API key** with the `billing:manage` permission. Answers `status: "paid"`, or `"not_required"` when nothing is owed (safe to repeat). Fails with `402 PAYMENT_FAILED` / `INSUFFICIENT_FUNDS`, `409 PAYMENT_IN_PROGRESS`, or `502 PAYMENT_PROVIDER_ERROR` (retried by Pilot Status on its own).
|
|
@@ -139,11 +139,11 @@ The **Pilot Status** node provides several resources and operations to manage yo
|
|
|
139
139
|
- **Always Online**, **Reject Call**, **Reject Call Message**, **Read Messages**, **Ignore Groups**, **Ignore Status** are the Evolution GO advanced settings, in the GO dialect (`ignoreGroups`, not the v2 `groupsIgnore`). They are tri-state: *Inherit From Provider* leaves the field untouched, *Reset to Provider Default* clears the stored value. On a Meta number they are stored but never applied.
|
|
140
140
|
|
|
141
141
|
- **Get Many:** `GET /v1/numbers` → every number of the workspace (web and official Meta). Needs an **account** (tenant/workspace) credential: a number key gets `403 NUMBER_SCOPE_NOT_ALLOWED`.
|
|
142
|
-
- **Create Meta Number:** `POST /v1/numbers/meta` with `{ name, number, metaPhoneId, metaWabaId, metaAccessToken, metaAppSecret, metaAppId, routeWebhooksToPilot }` → `201 { number, webhook
|
|
142
|
+
- **Create Meta Number:** `POST /v1/numbers/meta` with `{ name, number, metaPhoneId, metaWabaId, metaAccessToken, metaAppSecret, metaAppId, routeWebhooksToPilot }` → `201 { number, webhook }`. Your own WABA credentials: the ids are node fields, `metaAccessToken` and `metaAppSecret` come from the **Pilot Status Meta Number** credential. **Route Webhooks to Pilot Status** subscribes the WHOLE WABA to our callback. A number key cannot create numbers; an existing number is `409`.
|
|
143
143
|
- **Get Many API Keys:** `GET /v1/numbers/{id}/api-keys` → `{ data }`, masked. **Create API Key:** `POST /v1/numbers/{id}/api-keys` with `{ name }` → `201 { apiKey }` — the secret `apiKey.key` is returned **only once**; `409 NUMBER_KEY_LIMIT_REACHED` at the limit. **Revoke API Key:** `DELETE /v1/numbers/{id}/api-keys/{keyId}` → `{ revoked, id }`; the default key is `409 PRIMARY_KEY_USE_REGENERATE` (use API Key → Regenerate). All three need an account credential (`403 NUMBER_SCOPE_NOT_ALLOWED` for a number key).
|
|
144
144
|
- **Archive / Unarchive Chat:** `POST` / `DELETE /v1/numbers/{id}/chats/{jid}/archive`, no body. QR (Evolution GO) numbers only — an official number is `422 NOT_AVAILABLE_FOR_OFFICIAL_NUMBERS`. **Chat JID** (E.164 or full JID) is URL-encoded.
|
|
145
|
-
- **List Contacts / Get Contact / Get Contact Picture:** `GET /v1/numbers/{id}/contacts` (Search, Page, Page Size — same pagination as Conversation → Get Many; `{ contacts, total, page, pageSize,
|
|
146
|
-
- **Block / Unblock Contact:** `POST` / `DELETE /v1/numbers/{id}/contacts/{phone}/block`, no body
|
|
145
|
+
- **List Contacts / Get Contact / Get Contact Picture:** `GET /v1/numbers/{id}/contacts` (Search, Page, Page Size — same pagination as Conversation → Get Many; `{ contacts, total, page, pageSize }`, each contact `{ phone, name, whatsappName }`), `GET …/contacts/{phone}` (`{ contact, inAddressBook }`) and `GET …/contacts/{phone}/picture` (`{ phone, url }`; 404 when there is none). `phone` is E.164 or, when WhatsApp hasn't exposed the number yet, `<id>@lid` — treat it as opaque. QR numbers only: an official number answers `422 FEATURE_NOT_SUPPORTED`. Need `chat:read`.
|
|
146
|
+
- **Block / Unblock Contact:** `POST` / `DELETE /v1/numbers/{id}/contacts/{phone}/block`, no body; answers `{ phone, blocked }`. QR and official numbers; any other rail is `422 FEATURE_NOT_SUPPORTED`. **Contact Phone** is URL-encoded. Archive and block need `contacts:manage`.
|
|
147
147
|
|
|
148
148
|
### 3. API Key
|
|
149
149
|
- **Regenerate:** Regenerate the default API Key of a single WhatsApp number (tenant-scoped), identified by its `whatsappNumberId`. The previous key for that number is rotated and the new key is returned.
|
|
@@ -171,16 +171,16 @@ The **Pilot Status** node provides several resources and operations to manage yo
|
|
|
171
171
|
|
|
172
172
|
Read-only, and requires a **number-scoped API key**: a lead belongs to the number whose Page is linked in the dashboard.
|
|
173
173
|
|
|
174
|
-
- **Get Many:** `GET /v1/leads` — the number's leads, newest first by the time the person **submitted** the form. Filters: **Form ID**, **Ad ID**, **Page ID** (exact match), **Start Date** / **End Date** (Meta's `created_time`, not when Pilot Status received the lead), **Page**, **Page Size** (max 100). Answers `{ leads, total, page, pageSize,
|
|
174
|
+
- **Get Many:** `GET /v1/leads` — the number's leads, newest first by the time the person **submitted** the form. Filters: **Form ID**, **Ad ID**, **Page ID** (exact match), **Start Date** / **End Date** (Meta's `created_time`, not when Pilot Status received the lead), **Page**, **Page Size** (max 100). Answers `{ leads, total, page, pageSize, notice? }`.
|
|
175
175
|
- **Get:** `GET /v1/leads/{id}` — one lead by its Pilot Status `id` (= `data.leadId` on the `lead.received` webhook, **not** Meta's `leadgenId`). Answers `{ lead, notice? }`; a lead of another number is `404 LEAD_NOT_FOUND`.
|
|
176
176
|
|
|
177
|
-
Each lead: `{ id,
|
|
177
|
+
Each lead: `{ id, whatsappNumberId, pageName, formId, formName, adId, adName, adsetName, campaignName, platform, isOrganic, createdAt, fullName, email, phone, fields, consentGiven, conversationId, autoSendStatus, autoSendReason, redacted }`, with `fields` as `{ key, label, values }`. ⚠️ `consentGiven: null` means **unknown** (no consent checkbox configured, or not answered) — never read it as a refusal. On a **RELAY_ONLY** number a lead keeps its ids, attribution and status but comes back with `redacted: true` and no name, e-mail, phone or answers, and the response carries `notice: "PII_RELAY_ONLY"`.
|
|
178
178
|
|
|
179
179
|
### 9. Referral (Click-to-WhatsApp ad attribution)
|
|
180
180
|
|
|
181
181
|
Read-only. Acts on **one number**: a number-scoped API key, or a workspace key with **WhatsApp Number ID** set in the credential (sent as `x-whatsapp-number-id`) — without it a workspace key gets `403 TENANT_SCOPE_NOT_ALLOWED`. Needs `chat:read`. In practice only official (Meta Cloud API) numbers have referrals.
|
|
182
182
|
|
|
183
|
-
- **Get Many:** `GET /v1/referrals` — inbound messages that arrived from a Meta ad or post, newest first. Meta attaches the referral to the **first** message of a conversation only, so each row amounts to one conversation started by that ad. Filters: **Source ID** (one ad/post id), **Source Type** (`ad` / `post`), **Start Date** / **End Date** (when the message happened), **Page**, **Page Size** (max 100). Answers `{ referrals, total, page, pageSize,
|
|
183
|
+
- **Get Many:** `GET /v1/referrals` — inbound messages that arrived from a Meta ad or post, newest first. Meta attaches the referral to the **first** message of a conversation only, so each row amounts to one conversation started by that ad. Filters: **Source ID** (one ad/post id), **Source Type** (`ad` / `post`), **Start Date** / **End Date** (when the message happened), **Page**, **Page Size** (max 100). Answers `{ referrals, total, page, pageSize, notice? }`; each row is a chat message with a `referral` block `{ sourceId, sourceType, sourceUrl, headline, body, mediaType, imageUrl, videoUrl, thumbnailUrl, ctwaClid, adName, adsetId, adsetName, campaignId, campaignName, namesResolvedAt }`.
|
|
184
184
|
- **Summary:** `GET /v1/referrals/summary` — traffic grouped by ad, ordered by conversations. Filters: **Start Date** / **End Date**. Answers `{ ads, total, limit, truncated, notice?, piiNotice? }`, each ad `{ sourceId, sourceType, conversations, messages, firstAt, lastAt, lastSourceUrl, lastHeadline, adName, adsetId, adsetName, campaignId, campaignName, namesResolvedAt }`. ⚠️ `conversations` counts **distinct** conversations (the lead count); `messages` counts messages. Capped at 200 ads: `truncated: true` means a **partial** answer — narrow the dates.
|
|
185
185
|
|
|
186
186
|
`sourceId` is Meta's ad id and the **stable** identity: names are editable in Meta, so never key on them. The campaign / ad set / ad names are filled only when the advertiser has shared the ad account with the Pilot Status business portfolio as a partner; `namesResolvedAt: null` = never resolved, set with names = snapshot at that time, set without names = Meta returned nothing (ad deleted or access missing). On a **RELAY_ONLY** number the ad id and names stay, while `ctwaClid`, the ad copy and the message content come back null with `redacted: true` (Summary: `lastSourceUrl` / `lastHeadline` null, `piiNotice: "PII_RELAY_ONLY"`).
|
|
@@ -195,7 +195,7 @@ Workspace (tenant-scoped) API key only, `integrations:manage`. Access to an ad a
|
|
|
195
195
|
|
|
196
196
|
- **Get Many:** `GET /v1/ads/accounts` — `{ linked, candidates, partnerBusinessId, sharingLookup }`. `linked[].sharingActive: null` means Meta could not be asked, not "revoked".
|
|
197
197
|
- **Link:** `POST /v1/ads/accounts` with **Ad Account ID** (`act_<digits>`) → `201 { link }`. Refusals: `409 AD_ACCOUNT_NOT_PROVEN`, `409 AD_ACCOUNT_NOT_SHARED`, `502 ADS_LOOKUP_UNAVAILABLE`, `503 ADS_NOT_CONFIGURED`.
|
|
198
|
-
- **Unlink:** `DELETE /v1/ads/accounts/{adAccountId}` → `{
|
|
198
|
+
- **Unlink:** `DELETE /v1/ads/accounts/{adAccountId}` → `{ adAccountId }`. Soft: names already resolved stay.
|
|
199
199
|
|
|
200
200
|
### 12. Lead Page and Lead Form (Meta Lead Ads configuration)
|
|
201
201
|
|
|
@@ -204,8 +204,8 @@ Workspace (tenant-scoped) API key only, `integrations:manage`. Access to an ad a
|
|
|
204
204
|
- **Lead Page → Get Many:** `GET /v1/lead-pages` — `{ linked, candidates, configured, partnerBusinessId, candidatesLookup, eligibilityBlocker }`.
|
|
205
205
|
- **Lead Page → Link:** `POST /v1/lead-pages` with **Facebook Page ID** and **WhatsApp Number ID** (optional only when the credential reaches exactly one number) → `201 { link }`; the last 90 days of leads are backfilled.
|
|
206
206
|
- **Lead Page → Update:** `PATCH /v1/lead-pages/{pageLinkId}` with **New WhatsApp Number ID** → `{ link, autoSendDisabled }`. `autoSendDisabled: true` = every auto-send of the Page's forms was switched off.
|
|
207
|
-
- **Lead Page → Unlink:** `DELETE /v1/lead-pages/{pageLinkId}` → `{
|
|
208
|
-
- **Lead Page → Resync:** `POST /v1/lead-pages/{pageLinkId}/resync` → `202 {
|
|
207
|
+
- **Lead Page → Unlink:** `DELETE /v1/lead-pages/{pageLinkId}` → `{ deletedLeads }`. ⚠️ **Destructive:** it erases every lead captured through the Page and deletes its form configurations. There is no undo.
|
|
208
|
+
- **Lead Page → Resync:** `POST /v1/lead-pages/{pageLinkId}/resync` → `202 { pageLinkId, subscribedAt?, subscriptionError? }`. Within the cooldown: `429 RESYNC_COOLDOWN` with `retryAfterSeconds`.
|
|
209
209
|
- **Lead Form → Get Many:** `GET /v1/lead-pages/{pageLinkId}/forms` — `{ forms, formsTruncated, numberIsOfficial, templates }`, each form with questions, consent checkboxes and its stored `config` (`null` = never configured).
|
|
210
210
|
- **Lead Form → Update:** `PUT /v1/lead-pages/{pageLinkId}/forms/{formId}` — creates or **replaces** the whole config: **Auto-Send Enabled**, **Consent Checkbox Key**, **Template ID** (official numbers), **Free Text** (other numbers), **Variable Map (JSON)**, **Form Name**. Empty Consent Checkbox Key / Template ID / Free Text go out as `null`. ⚠️ With Auto-Send Enabled, new leads get a WhatsApp message without a human.
|
|
211
211
|
|
|
@@ -251,7 +251,7 @@ Events: `phone_line.purchased`, `phone_line.audio_received`, `phone_line.code_re
|
|
|
251
251
|
- **Get Many:** `GET /v1/phone-lines/webhooks` → `{ webhooks, events }` as **one item** (like every other Get Many of this node): `webhooks` oldest first, each `{ id, name, url, events, active, lastDeliveryAt, lastStatusCode, createdAt }`; `events` is the subscribable catalogue. Never the secrets.
|
|
252
252
|
- **Get:** `GET /v1/phone-lines/webhooks/{id}` → `{ webhook }` (same shape, no secret).
|
|
253
253
|
- **Update:** `PATCH /v1/phone-lines/webhooks/{id}` with only the fields added under **Update Fields** — **Name**, **URL**, **Events** (replaces the list) and **Active** (off **pauses** the webhook without deleting it). Fields not added stay unchanged; a blank Name/URL or an empty Events selection is ignored rather than sent. Answers `{ webhook }`; the secret does not change.
|
|
254
|
-
- **Delete:** `DELETE /v1/phone-lines/webhooks/{id}` → `{
|
|
254
|
+
- **Delete:** `DELETE /v1/phone-lines/webhooks/{id}` → `{ id }`. ⚠️ Also deletes the webhook's **delivery history**. No undo.
|
|
255
255
|
- **Get Deliveries:** `GET /v1/phone-lines/webhooks/{id}/deliveries?limit=` (**Limit** 1–200, default 50) → `{ deliveries }`, newest first, each `{ id, event, status (PENDING|DELIVERED|FAILED), attempts, responseStatus, lastError, createdAt, deliveredAt }`. Never the payload.
|
|
256
256
|
- **Get Delivery:** `GET /v1/phone-lines/webhooks/{id}/deliveries/{deliveryId}` → `{ delivery }` with `durationMs`, `responseBody` and `payload` — the **exact signed JSON string** that was sent (parse it yourself; it is a string so the signature can be re-checked byte for byte). ⛔ A `phone_line.code_received` payload carries the **activation code** — treat this output as a credential.
|
|
257
257
|
|
|
@@ -263,19 +263,19 @@ Events: `phone_line.purchased`, `phone_line.audio_received`, `phone_line.code_re
|
|
|
263
263
|
|
|
264
264
|
Tenant-scoped credential. Nothing here charges by itself — a human pays the hosted page or the Pix, and a Stripe intent is confirmed by Stripe.js in a browser.
|
|
265
265
|
|
|
266
|
-
- **Create Checkout:** `POST /v1/billing/checkout`. **Purpose** *Wallet Top-Up* (needs **Amount**, in the workspace currency) or *Add Card*. For a top-up, **Method** *Card* (default) answers `{ url, purpose, method, orderId, amount, currency }` — a hosted Stripe page; *Pix* (BRL workspaces only, else `400 PIX_NOT_ELIGIBLE`) answers `{ purpose, method: "pix", orderId,
|
|
266
|
+
- **Create Checkout:** `POST /v1/billing/checkout`. **Purpose** *Wallet Top-Up* (needs **Amount**, in the workspace currency) or *Add Card*. For a top-up, **Method** *Card* (default) answers `{ url, purpose, method, orderId, amount, currency }` — a hosted Stripe page; *Pix* (BRL workspaces only, else `400 PIX_NOT_ELIGIBLE`) answers `{ purpose, method: "pix", orderId, amount, currency, pix: { transactionId, copyPaste, qrCode, expiresAt } }` — show the copy-and-paste code or the QR to the payer. Success/Cancel URL are card-only and are never sent with Pix (the API would answer `400 FIELD_NOT_APPLICABLE`); `method` is never sent with Add Card.
|
|
267
267
|
- **Get Top-Up:** `GET /v1/billing/topups/{id}` → `{ topup: { id, status (pending|paid|expired|failed), amount, currency, method, provider, createdAt, paidAt, expiresAt } }`. Read-only; poll it after a checkout or payment intent. `404 TOPUP_NOT_FOUND`.
|
|
268
268
|
- **Create Card Setup Intent:** `POST /v1/billing/card/setup-intent` → `{ clientSecret, setupIntentId, publishableKey }` for the Stripe Payment Element (`stripe.confirmSetup`). OWNER (`billing:payment_method:manage`).
|
|
269
|
-
- **Sync Card Setup Intent:** `POST /v1/billing/card/setup-intent/{id}/sync` → `{
|
|
269
|
+
- **Sync Card Setup Intent:** `POST /v1/billing/card/setup-intent/{id}/sync` → `{ status, saved, card }` — makes the confirmed card the workspace's saved card now. Idempotent.
|
|
270
270
|
- **Create Payment Intent:** `POST /v1/billing/payment-intents` with `{ purpose: "wallet_topup", amount, saveCard? }` → `{ clientSecret, paymentIntentId, orderId, amount, currency, publishableKey }` for `stripe.confirmPayment`. Optional **Idempotency Key** (header `Idempotency-Key`): a retry within 24 h with the same key and body gets the same intent (`Idempotent-Replayed: true`); same key with another body → `409 IDEMPOTENCY_KEY_REUSED`, first call still running → `409 IDEMPOTENCY_KEY_IN_USE`.
|
|
271
|
-
- **Sync Payment Intent:** `POST /v1/billing/payment-intents/{id}/sync` → `{
|
|
271
|
+
- **Sync Payment Intent:** `POST /v1/billing/payment-intents/{id}/sync` → `{ status, orderId, orderStatus, amount, currency, credited, balance, cardSaved }` — credits the wallet exactly once; never charges.
|
|
272
272
|
- ⛔ Never log a `clientSecret`. `503 PAYMENTS_NOT_CONFIGURED` when card payments are unavailable.
|
|
273
273
|
|
|
274
274
|
### 17. Template
|
|
275
275
|
|
|
276
276
|
- **Get Many** / **Get:** `GET /v1/templates[/{id}]`. Only `sendable: true` templates can be sent.
|
|
277
277
|
- **Get Insights:** `GET /v1/templates/{id}/insights?days=7|30|90` (default 30) — Meta's
|
|
278
|
-
sent/delivered/read totals,
|
|
278
|
+
sent/delivered/read totals (read rate = read / delivered), button `clicks` and a `daily` series for a META
|
|
279
279
|
template. WhatsApp Business App / coexistence accounts answer `422
|
|
280
280
|
TEMPLATE_INSIGHTS_UNAVAILABLE_SMB` (Meta gives no insights there); a non-Meta template
|
|
281
281
|
answers `409 TEMPLATE_NOT_ON_META`. The first call may enable insights on the WABA at Meta.
|
|
@@ -309,7 +309,7 @@ These need an **account key** (`ps_account_...`); any other key or an OAuth toke
|
|
|
309
309
|
|
|
310
310
|
- **Workspace (Account Key) → Get Many:** `GET /v1/workspaces` → `{ data: [{ id, name, role, plan, createdAt, sharedCard: { linked, sourceWorkspaceId } }] }` — the workspaces the key's user is an active member of.
|
|
311
311
|
- **Workspace (Account Key) → Create:** `POST /v1/workspaces` with `{ name }` → `201 { id, name, plan, createdAt, role: "OWNER", apiKey, sharedCard }`, `apiKey` being the new workspace's primary `ps_workspace_...` key, **shown only here** — or `null` if minting failed (the workspace exists: mint a key with Workspace API Key → Create, do not create again). `409 WORKSPACE_LIMIT_REACHED`. **Share Reserve Card** (off by default) sends `{ name, shareCard: true }` and links the new workspace to your reserve card source; off sends no `shareCard`, and the workspace is **not** shared. With it on, `409 SHARED_CARD_NOT_CONFIGURED`, `SOURCE_ARCHIVED` or `NO_SHARED_OWNER` create **no** workspace.
|
|
312
|
-
- **Workspace (Account Key) → Link / Unlink Shared Card:** `PUT` / `DELETE /v1/workspaces/{workspaceId}/shared-card`, no body, OWNER of that workspace only → `{
|
|
312
|
+
- **Workspace (Account Key) → Link / Unlink Shared Card:** `PUT` / `DELETE /v1/workspaces/{workspaceId}/shared-card`, no body, OWNER of that workspace only → `{ sharedCard, changed }` (idempotent: `changed: false` when nothing changed). Unlink is how a reseller stops its card from paying a defaulting customer's renewals. `409 SHARED_CARD_NOT_CONFIGURED`, `SOURCE_ARCHIVED`, `NO_SHARED_OWNER`; `400 SELF_SOURCE` when linking the source workspace itself.
|
|
313
313
|
- **Workspace API Key → Get Many / Create / Revoke:** `GET|POST /v1/workspaces/{workspaceId}/api-keys`, `DELETE .../api-keys/{keyId}`, with the user's live role (ADMIN and up). Create mints a named key (`apiKey.key` shown once; `409 WORKSPACE_KEY_LIMIT_REACHED`); Revoke answers `{ id, revokedAt }` (`409 PRIMARY_KEY_NOT_REVOCABLE` for the primary, `404 API_KEY_NOT_FOUND`).
|
|
314
314
|
|
|
315
315
|
### 18. Current Workspace (`/v1/workspace`, the credential's workspace)
|
|
@@ -321,8 +321,8 @@ Not the account-level **Workspace (Account Key)** resource (`/v1/workspaces`, pl
|
|
|
321
321
|
- **Get Settings:** `GET /v1/workspace/settings` → `{ settings: { mainCurrency, mainTimezone, mainLanguage, billingMode, currencyLocked }, phoneLinePrice: { currency, price } }`. Any role.
|
|
322
322
|
- **Update Settings:** `PATCH /v1/workspace/settings` with only the fields added under **Update Fields** — **Main Timezone** (IANA) and **Main Language** (`pt`, `en`, `es`); at least one → `{ settings }`. `400 INVALID_TIMEZONE` / `INVALID_LANGUAGE`. Currency and billing mode are not offered (the API refuses them here: the OWNER changes them in the dashboard billing).
|
|
323
323
|
- Rename and Update Settings need `workspace:settings:update`: a workspace `ps_` key passes; an account key needs **ADMIN** and up.
|
|
324
|
-
- **Archive:** `POST /v1/workspace/archive` with `{ confirmName }` — the workspace name typed **exactly** (Get returns it; sent as typed, never trimmed) → `{
|
|
325
|
-
- **Transfer Ownership:** `POST /v1/workspace/transfer-ownership` with `{ email }` of an **active** member → `{
|
|
324
|
+
- **Archive:** `POST /v1/workspace/archive` with `{ confirmName }` — the workspace name typed **exactly** (Get returns it; sent as typed, never trimmed) → `{ archivedAt }`. ⛔ **Irreversible from the API**: it locks **everyone** out, the caller included; the workspace's `ps_` keys stop authenticating; there is no unarchive (support only). `400 CONFIRMATION_MISMATCH`, `409 ALREADY_ARCHIVED`.
|
|
325
|
+
- **Transfer Ownership:** `POST /v1/workspace/transfer-ownership` with `{ email }` of an **active** member → `{ newOwnerId }`. You become ADMIN; both sides get their OAuth refresh tokens revoked; it changes who **pays** the bill. `400 NOT_A_MEMBER` / `TARGET_NOT_ACTIVE`, `409 ALREADY_OWNER` / `NOT_OWNER` / `OWNERSHIP_CHANGED`.
|
|
326
326
|
- ⛔ Archive and Transfer Ownership are **OWNER only** and need a **user** on the wire: the OWNER's **account key** (`ps_account_...`) + **Workspace ID**. Any `ps_` workspace or number key answers `403 MACHINE_CREDENTIAL_CANNOT_MANAGE_WORKSPACE`.
|
|
327
327
|
|
|
328
328
|
### 19. Webhook (number webhooks, `/v1/webhooks`)
|
|
@@ -333,8 +333,8 @@ The registry the **Pilot Status Trigger** registers in. Create and delete stay o
|
|
|
333
333
|
- **Update:** `PATCH /v1/webhooks/{id}` with only the **Update Fields** you add: Name, URL, Events (comma-separated, replaces the list), Active (off pauses). The number cannot be changed (`400 NUMBER_RESCOPE_NOT_SUPPORTED`).
|
|
334
334
|
- **Get Logs:** `GET /v1/webhooks/{id}/logs?limit=&event=` → `{ webhookId, logs }`, newest first; Limit 1–50, Event optional.
|
|
335
335
|
|
|
336
|
-
- **Rotate Secret:** `POST /v1/webhooks/{id}/rotate-secret`, no body → `{
|
|
337
|
-
- **Reactivate:** `POST /v1/webhooks/{id}/reactivate`, no body → `{
|
|
336
|
+
- **Rotate Secret:** `POST /v1/webhooks/{id}/rotate-secret`, no body → `{ secret }` — the new signing secret **in clear, once** (no read returns it). Immediate, **no overlap**: the old secret stops at once; deliveries already in flight may still be signed with it — accept both briefly, or rotate when quiet. The only way to get a secret for a webhook created before 2026-09-15.
|
|
337
|
+
- **Reactivate:** `POST /v1/webhooks/{id}/reactivate`, no body → `{ released, stillHeld, circuitOpen, circuitOpenedAt, circuitSuccessPct, heldCount, droppedCount }` — resumes a destination paused by the circuit breaker (it only closes by hand), re-queuing `released` held events. Idempotent.
|
|
338
338
|
- `deliveryTimeoutMs` on create/update is platform-staff only (`403 DELIVERY_TIMEOUT_STAFF_ONLY`).
|
|
339
339
|
|
|
340
340
|
### 20. Story (WhatsApp status, `/v1/stories`)
|
|
@@ -356,11 +356,11 @@ The groups of the credential's number. **Group ID** is the JID (`…@g.us`) from
|
|
|
356
356
|
- **Get Many:** `GET /v1/groups`.
|
|
357
357
|
- **Create:** `POST /v1/groups` with `{ subject, participants? }` → `201 { id, subject, participants }`. **Subject** 1–100 characters.
|
|
358
358
|
- **Get:** `GET /v1/groups/{id}` → `{ id, subject, participants }`. While the provider backs off: `503 GROUP_INFO_TEMPORARILY_UNAVAILABLE` with `Retry-After`.
|
|
359
|
-
- **Leave:** `DELETE /v1/groups/{id}` → `{
|
|
359
|
+
- **Leave:** `DELETE /v1/groups/{id}` → `{ id }` — the number leaves; the group stays for the others.
|
|
360
360
|
- **Add Participants** / **Remove Participants:** `POST` / `DELETE /v1/groups/{id}/participants` with `{ participants }` → `{ affected }`. At least one participant (the node stops before calling with an empty list).
|
|
361
361
|
- **Promote Participants** / **Demote Participants:** `POST /v1/groups/{id}/participants/promote` / `…/demote`, same body and answer.
|
|
362
362
|
- **Get Invite Link:** `POST /v1/groups/{id}/invite` → `{ link }`. **Reset Link** sends `{ reset: true }` and revokes the current link.
|
|
363
|
-
- **Pin Message:** `POST /v1/groups/{id}/pin` with `{ messageId, action: "pin" | "unpin" }` → `{
|
|
363
|
+
- **Pin Message:** `POST /v1/groups/{id}/pin` with `{ messageId, action: "pin" | "unpin" }` → `{ id }`.
|
|
364
364
|
|
|
365
365
|
### 22. Chatwoot (`/v1/chatwoot`)
|
|
366
366
|
|
|
@@ -379,13 +379,13 @@ The Chatwoot integration of the credential's number. A tenant key needs the numb
|
|
|
379
379
|
|
|
380
380
|
Meta (Cloud API) numbers only — a web number answers `422 FLOW_REQUIRES_META_NUMBER`. The credential must be a **number-scoped key**: the number and its WABA come from the key, and naming one in the body (`whatsappNumberId`, `numberId`, `wabaId`) is `400 FLOW_NUMBER_FROM_KEY`. **Flow ID** is always the LOCAL `id` from **Get Many**, never Meta's `metaFlowId` (`404 FLOW_NOT_FOUND`). Seventeen operations: Get Many, Create, Update, Delete, Upload Flow JSON, Publish, Deprecate, Get Many Responses, Get / Register Endpoint Key, and the seven below.
|
|
381
381
|
|
|
382
|
-
- **Get Flow JSON:** `GET /v1/flows/{id}/json` → `{
|
|
383
|
-
- **Preview:** `POST /v1/flows/{id}/preview` with `{ invalidate }` (**Invalidate Previous Link**, default off) → `{
|
|
382
|
+
- **Get Flow JSON:** `GET /v1/flows/{id}/json` → `{ flowJson }`. `flowJson` is the document Meta holds, as a **string**, byte for byte — the same field Upload Flow JSON takes. Works on a published Flow (the starting point of a clone). Can be megabytes. Reads Meta, writes nothing; `502 FLOW_JSON_UNAVAILABLE`. `flows:read`.
|
|
383
|
+
- **Preview:** `POST /v1/flows/{id}/preview` with `{ invalidate }` (**Invalidate Previous Link**, default off) → `{ previewUrl, expiresAt, invalidated, warning }` (`warning` is one bilingual "English | Portuguese" string). ⛔ The link **always** needs **no login** — treat it as a secret. Calls Meta; works on a DRAFT. ⚠️ Not a sandbox: on a `data_exchange` Flow the preview calls your endpoint for real. `502 FLOW_PREVIEW_UNAVAILABLE`. `flows:manage`.
|
|
384
384
|
- **Get Many Traces:** `GET /v1/flows/{id}/traces` → `{ traces }`, what our proxy saw on the `data_exchange` calls (bodies withheld under `RELAY_ONLY`). Not paginated (`page`/`pageSize` → `400 FLOW_TRACES_NOT_PAGINATED`); ~24 h retention, and an empty list carries `notice: "FLOW_TRACES_RETENTION_WINDOW"`. `flows:read`.
|
|
385
385
|
- **Get Endpoint:** `GET /v1/flows/{id}/endpoint` → `{ flowId, url, hasSecret, endpointUri, metaEndpointUri, drift, numberHasKey, numberKeyUploadedAt, warnings }`. `numberHasKey: false` (`FLOW_ENDPOINT_NUMBER_HAS_NO_KEY`) means Meta can never call it. `flows:manage`.
|
|
386
386
|
- **Set Endpoint:** `PUT /v1/flows/{id}/endpoint` with `{ url }` (**Destination URL**, https only) or `{ url: null }` (**Remove Destination**, keeps the secret), plus `rotateSecret: true` with **Rotate Secret**. Answers the Get Endpoint fields plus `secret`, returned **once**, on the response that minted it. Does not touch Meta. `flows:manage`.
|
|
387
387
|
- **Register Endpoint:** `POST /v1/flows/{id}/endpoint` with `{ confirmOverwrite }` (**Confirm Overwrite**, default off). ⚠️ **Writes on Meta**: points the Flow's `endpoint_uri` at our proxy (needed to publish a `data_exchange` Flow); answers the Get Endpoint fields plus `republished`, `finalStatus`. Pointing somewhere else already → `409` unless confirmed. `flows:manage`.
|
|
388
|
-
- **Sync From Meta:** `POST /v1/flows/meta/sync`, no body → `{ created, updated
|
|
388
|
+
- **Sync From Meta:** `POST /v1/flows/meta/sync`, no body → `{ created, updated }`. Mirrors the WABA's catalogue now (creates/updates rows; calls Meta). One at a time per number: `429 FLOW_SYNC_IN_PROGRESS`. `flows:manage`.
|
|
389
389
|
|
|
390
390
|
### 24. Workspace Member (`/v1/workspace/members`)
|
|
391
391
|
|
|
@@ -395,7 +395,7 @@ Members and pending invites of the credential's workspace, one list (same row).
|
|
|
395
395
|
- **Invite:** `POST /v1/workspace/members` with `{ email, role, sendEmail }` and `allowedNumberIds` (**Number IDs**, comma-separated; blank = not sent, every number). ⚠️ By default **emails the invitee**. With **Send Email** off nothing is emailed and `inviteUrl` comes back **once** — a live link to join the workspace, treat it as a secret. `201`, or `200 resent: true` for a pending invite; expires in 7 days. `403 ROLE_NOT_ASSIGNABLE` / `FEATURE_DISABLED`, `409 ALREADY_MEMBER`, `429` (30/h per workspace, 3/h per address). `members:invite` (ADMIN and up).
|
|
396
396
|
- **Update Role:** `PATCH /v1/workspace/members/{id}` with `{ role }` (+ `allowedNumberIds` when **Number IDs** is filled). OWNER is never given or taken here. `400 ROLE_NOT_ASSIGNABLE`, `409 OWNER_IMMUTABLE` / `WOULD_ORPHAN_WORKSPACE`. `members:role:update` (OWNER).
|
|
397
397
|
- **Update Numbers:** `PATCH /v1/workspace/members/{id}/numbers` with `{ allowedNumberIds }`, which **replaces** the list. `[]` (= every number, including ones connected later) is sent only with **All Numbers** on; a blank list is refused in the node. `409 SCOPE_NOT_APPLICABLE` for OWNER/ADMIN. `members:scope:update` (ADMIN and up).
|
|
398
|
-
- **Remove:** `DELETE /v1/workspace/members/{id}` → `{
|
|
398
|
+
- **Remove:** `DELETE /v1/workspace/members/{id}` → `{ email, apiKeysRevoked, apiKeysReassigned, oauthTokensRevoked }`. ⛔ An ACTIVE member loses access **at once** and their OAuth tokens are revoked; a PENDING invite is revoked (its link dies). No undo — invite again. If they own working API keys the call stops with `409 MEMBER_HAS_API_KEYS` and the list: repeat with **API Key Action** (query `apiKeyAction`) — **Revoke** takes down every integration on those keys, **Keep** reassigns them to you. `members:remove` (OWNER).
|
|
399
399
|
- **Resend Invite:** `POST /v1/workspace/members/{id}/resend` with `{ sendEmail }`. ⚠️ Always rotates the token: the link the invitee holds **stops working**. New email by default, or the new `inviteUrl` once with Send Email off. `409 ALREADY_ACCEPTED`. `members:invite`.
|
|
400
400
|
|
|
401
401
|
### 25. Branding (`/v1/branding`)
|
|
@@ -419,7 +419,7 @@ The **paid capacity** (slots) of the workspace, not the connected numbers: delet
|
|
|
419
419
|
- **API Key → Regenerate Own Key:** `POST /v1/api-keys/regenerate`, no body → `201 { id, name, key, keyPrefix, keyLast4, scope, whatsappNumberId, createdAt }`. ⛔ **Revokes the key this credential is calling with, at once** (no grace period): a number key rotates itself, the workspace's primary key rotates itself (a named `ps_workspace_` key rotates the primary and survives). ⚠️ If this n8n credential holds that key, **every later node and workflow using it answers `401`** until you paste the new key into the credential. The new `key` is shown **once** — store it first and keep the output out of logs. Zero-downtime: create a named key, switch to it, then revoke the old one. Account key: `apikeys:reveal` (OWNER); per-number OAuth grant: `403 NUMBERS_GRANT_NOT_ALLOWED`. Different from **Regenerate** (`POST /v1/api-keys`), which rotates a given number's default key.
|
|
420
420
|
- **Conversation → Get Many:** `GET /v1/conversations?page=&pageSize=&startDate=&endDate=` → `{ conversations, total, page, pageSize, totalPages }`, latest activity first; dates filter by `lastMessageAt`. RELAY_ONLY redacts peer/preview and adds a `notice`. Number-scoped key, `chat:read` (AGENT and up).
|
|
421
421
|
- **Meta Pricing → Get:** `GET /v1/meta/pricing` — Meta's **published** per-message rate, not your bill. All of **Market**, **Currency**, **Category** blank → the catalogue; all three → `{ market, marketName, currency, category, pricePerMessage, fetchedAt, source }` (+ `volumeTiers` with **Include Volume Tiers**, `tiers=true`); some → `400`. Any key.
|
|
422
|
-
- **Embed → Create Session:** `POST /v1/embed/sessions` with `{ surface, allowedOrigins }` (+ `whatsappNumberIds` from **Number IDs** on chat, `ttlSeconds` when > 0, `brandingOverride` from **Branding Override (JSON)**) → `201 { token,
|
|
422
|
+
- **Embed → Create Session:** `POST /v1/embed/sessions` with `{ surface, allowedOrigins }` (+ `whatsappNumberIds` from **Number IDs** on chat, `ttlSeconds` when > 0, `brandingOverride` from **Branding Override (JSON)**) → `201 { token, whatsappNumberIds, allowedOrigins, expiresAt }`. ⚠️ The `token` is a bearer credential until `expiresAt` (chat: read and send on those numbers; connect: connect a number to the workspace) — give it only to that user's page. Chat on a workspace key needs Number IDs (`400 NUMBERS_REQUIRED`); connect needs a workspace key (`403 NUMBER_SCOPE_NOT_ALLOWED`). TTL default 15 min chat / 30 min connect, max 3600 s. Chat `messages:send`, connect `numbers:connect`.
|
|
423
423
|
- **Knowledge → Search:** `POST /v1/knowledge/search` with `{ query, limit }` (+ `type` doc/blog/page, `language` pt-BR/en/es) → `{ results: [{ title, url, type, language, updated, snippet, score }] }`. The public Pilot Status docs, blog and site pages; no workspace data. Any key.
|
|
424
424
|
|
|
425
425
|
---
|
|
@@ -7,9 +7,9 @@ export declare const DEFAULT_BASE_URL = "https://pilotstatus.com.br";
|
|
|
7
7
|
* `/v1` callers by User-Agent and recognises this node only when the header STARTS
|
|
8
8
|
* with `pilot-status-n8n/<version>`; without it n8n would send its generic `n8n`.
|
|
9
9
|
*/
|
|
10
|
-
export declare const USER_AGENT = "pilot-status-n8n/
|
|
10
|
+
export declare const USER_AGENT = "pilot-status-n8n/3.0.0";
|
|
11
11
|
/** `x-pilot-status-client: n8n/<version>`, read by the API BEFORE the User-Agent. */
|
|
12
|
-
export declare const CLIENT_HEADER = "n8n/
|
|
12
|
+
export declare const CLIENT_HEADER = "n8n/3.0.0";
|
|
13
13
|
export declare class PilotStatusApi implements ICredentialType {
|
|
14
14
|
name: string;
|
|
15
15
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "
|
|
1
|
+
export declare const PACKAGE_VERSION = "3.0.0";
|
|
@@ -2514,7 +2514,7 @@ class PilotStatus {
|
|
|
2514
2514
|
{
|
|
2515
2515
|
name: 'Create',
|
|
2516
2516
|
value: 'create',
|
|
2517
|
-
description: 'Create/Connect a WhatsApp Number. Answers 201 {numberId,
|
|
2517
|
+
description: 'Create/Connect a WhatsApp Number. Answers 201 {numberId, qrcodeBase64, pairingCode, …}: numberId is the NUMBER id (the id of Get Many, Delete and the webhooks\' data.numberId).',
|
|
2518
2518
|
action: 'Create a number',
|
|
2519
2519
|
routing: { request: { method: 'POST', url: '/numbers' } },
|
|
2520
2520
|
},
|
|
@@ -2542,7 +2542,7 @@ class PilotStatus {
|
|
|
2542
2542
|
{
|
|
2543
2543
|
name: 'Restore',
|
|
2544
2544
|
value: 'restore',
|
|
2545
|
-
description: 'Undo a soft-delete inside the 30-day window. Gives back the ROW, not the connection — the device was logged out on delete, so run Connect afterwards (the
|
|
2545
|
+
description: 'Undo a soft-delete inside the 30-day window. Gives back the ROW, not the connection — the device was logged out on delete, so run Connect afterwards. Answers {id} (the restored number id).',
|
|
2546
2546
|
action: 'Restore a number',
|
|
2547
2547
|
routing: { request: { method: 'POST', url: '=/numbers/{{$parameter.numberId}}/restore' } },
|
|
2548
2548
|
},
|
|
@@ -2605,7 +2605,7 @@ class PilotStatus {
|
|
|
2605
2605
|
{
|
|
2606
2606
|
name: 'Create Meta Number',
|
|
2607
2607
|
value: 'createMeta',
|
|
2608
|
-
description: 'Create an official Meta Cloud API number with your own WABA credentials (Phone Number ID, WABA ID and app ID here; access token and app secret in the "Pilot Status Meta Number" credential). Answers 201 {number, webhook
|
|
2608
|
+
description: 'Create an official Meta Cloud API number with your own WABA credentials (Phone Number ID, WABA ID and app ID here; access token and app secret in the "Pilot Status Meta Number" credential). Answers 201 {number, webhook}. A number key cannot create numbers; 409 when the number already exists.',
|
|
2609
2609
|
action: 'Create a meta number',
|
|
2610
2610
|
routing: {
|
|
2611
2611
|
request: { method: 'POST', url: '/numbers/meta' },
|
|
@@ -2665,7 +2665,7 @@ class PilotStatus {
|
|
|
2665
2665
|
{
|
|
2666
2666
|
name: 'List Contacts',
|
|
2667
2667
|
value: 'listContacts',
|
|
2668
|
-
description: "The number's address book: {contacts, total, page, pageSize
|
|
2668
|
+
description: "The number's address book: {contacts, total, page, pageSize}; each contact {phone, name, whatsappName} (name = best resolved name, whatsappName = WhatsApp push name or null); phone is E.164 or, when WhatsApp has not exposed the number yet, <id>@lid (treat it as opaque), or null when neither is known. Search filters by name or phone. QR numbers only: an official number answers 422 FEATURE_NOT_SUPPORTED. Needs chat:read.",
|
|
2669
2669
|
action: 'List contacts of a number',
|
|
2670
2670
|
routing: {
|
|
2671
2671
|
request: { method: 'GET', url: '=/numbers/{{$parameter.numberId}}/contacts' },
|
|
@@ -2675,7 +2675,7 @@ class PilotStatus {
|
|
|
2675
2675
|
{
|
|
2676
2676
|
name: 'Get Contact',
|
|
2677
2677
|
value: 'getContact',
|
|
2678
|
-
description: 'One contact of the address book: {phone,
|
|
2678
|
+
description: 'One contact of the address book: {contact: {phone, name, whatsappName}, inAddressBook}; phone may be null when neither a phone nor a LID is known. 404 when not found. QR numbers only (official: 422 FEATURE_NOT_SUPPORTED). Needs chat:read.',
|
|
2679
2679
|
action: 'Get a contact of a number',
|
|
2680
2680
|
routing: {
|
|
2681
2681
|
request: {
|
|
@@ -2687,7 +2687,7 @@ class PilotStatus {
|
|
|
2687
2687
|
{
|
|
2688
2688
|
name: 'Get Contact Picture',
|
|
2689
2689
|
value: 'getContactPicture',
|
|
2690
|
-
description: "A contact's profile picture: {phone,
|
|
2690
|
+
description: "A contact's profile picture: {phone, url}. 404 when there is none. QR numbers only (official: 422 FEATURE_NOT_SUPPORTED). Needs chat:read.",
|
|
2691
2691
|
action: 'Get the profile picture of a contact',
|
|
2692
2692
|
routing: {
|
|
2693
2693
|
request: {
|
|
@@ -2699,7 +2699,7 @@ class PilotStatus {
|
|
|
2699
2699
|
{
|
|
2700
2700
|
name: 'Block Contact',
|
|
2701
2701
|
value: 'block',
|
|
2702
|
-
description: 'Block a contact. QR (Evolution GO) and official (Meta) numbers; any other rail is 422 FEATURE_NOT_SUPPORTED. Needs contacts:manage.',
|
|
2702
|
+
description: 'Block a contact: {phone, blocked}. QR (Evolution GO) and official (Meta) numbers; any other rail is 422 FEATURE_NOT_SUPPORTED. Needs contacts:manage.',
|
|
2703
2703
|
action: 'Block a contact',
|
|
2704
2704
|
routing: {
|
|
2705
2705
|
request: {
|
|
@@ -2711,7 +2711,7 @@ class PilotStatus {
|
|
|
2711
2711
|
{
|
|
2712
2712
|
name: 'Unblock Contact',
|
|
2713
2713
|
value: 'unblock',
|
|
2714
|
-
description: 'Unblock a contact. QR (Evolution GO) and official (Meta) numbers. Needs contacts:manage.',
|
|
2714
|
+
description: 'Unblock a contact: {phone, blocked}. QR (Evolution GO) and official (Meta) numbers. Needs contacts:manage.',
|
|
2715
2715
|
action: 'Unblock a contact',
|
|
2716
2716
|
routing: {
|
|
2717
2717
|
request: {
|
|
@@ -3054,7 +3054,7 @@ class PilotStatus {
|
|
|
3054
3054
|
{
|
|
3055
3055
|
name: 'Get Insights',
|
|
3056
3056
|
value: 'getInsights',
|
|
3057
|
-
description: 'Meta analytics for one META template: sent/delivered/read totals
|
|
3057
|
+
description: 'Meta analytics for one META template: sent/delivered/read totals (read rate = read / delivered), button clicks and a daily series. WhatsApp Business App / coexistence accounts answer 422 TEMPLATE_INSIGHTS_UNAVAILABLE_SMB (Meta gives no insights there); a non-Meta template answers 409 TEMPLATE_NOT_ON_META. The first call may enable insights on the WABA at Meta.',
|
|
3058
3058
|
action: 'Get template insights',
|
|
3059
3059
|
routing: {
|
|
3060
3060
|
request: { method: 'GET', url: '=/templates/{{$parameter.templateIdForGet}}/insights' },
|
|
@@ -3207,14 +3207,14 @@ class PilotStatus {
|
|
|
3207
3207
|
{
|
|
3208
3208
|
name: 'Get Many',
|
|
3209
3209
|
value: 'getAll',
|
|
3210
|
-
description: 'List the Flows of the WABA behind the key\'s number, most recently updated first. Answers an ENVELOPE — {flows, total, page, pageSize
|
|
3210
|
+
description: 'List the Flows of the WABA behind the key\'s number, most recently updated first. Answers an ENVELOPE — {flows, total, page, pageSize} — and not a bare array like Template: Get Many does. Meta (Cloud API) numbers only; a web number answers 422 FLOW_REQUIRES_META_NUMBER.',
|
|
3211
3211
|
action: 'Get many flows',
|
|
3212
3212
|
routing: { request: { method: 'GET', url: '/flows' } },
|
|
3213
3213
|
},
|
|
3214
3214
|
{
|
|
3215
3215
|
name: 'Create',
|
|
3216
3216
|
value: 'create',
|
|
3217
|
-
description: 'Create a Flow in DRAFT, or clone an existing one into a new draft. Answers 201 {id
|
|
3217
|
+
description: 'Create a Flow in DRAFT, or clone an existing one into a new draft. Answers 201 {id}. Cloning is the ONLY way to change a published Flow — Meta never lets a published one be edited again — so Clone From Flow ID is what ties the versions of one form together.',
|
|
3218
3218
|
action: 'Create a flow',
|
|
3219
3219
|
routing: { request: { method: 'POST', url: '/flows' } },
|
|
3220
3220
|
},
|
|
@@ -3266,7 +3266,7 @@ class PilotStatus {
|
|
|
3266
3266
|
{
|
|
3267
3267
|
name: 'Get Many Responses',
|
|
3268
3268
|
value: 'getResponses',
|
|
3269
|
-
description: 'List the forms customers submitted to ONE Flow, newest first. Answers {responses, total, page, pageSize
|
|
3269
|
+
description: 'List the forms customers submitted to ONE Flow, newest first. Answers {responses, total, page, pageSize}. ⚠️ Responses expire: rows past the retention window are excluded here, so a submission that is gone from the window is gone from this list too. A notice of FLOW_RESPONSES_WINDOW_TRUNCATED on the page means the Flow has more sends than one request correlates — the page is short and says so.',
|
|
3270
3270
|
action: 'Get many flow responses',
|
|
3271
3271
|
routing: {
|
|
3272
3272
|
request: { method: 'GET', url: '=/flows/{{encodeURIComponent($parameter.flowId)}}/responses' },
|
|
@@ -3299,7 +3299,7 @@ class PilotStatus {
|
|
|
3299
3299
|
{
|
|
3300
3300
|
name: 'Get Flow JSON',
|
|
3301
3301
|
value: 'getJson',
|
|
3302
|
-
description: 'Read back the Flow JSON document Meta holds: {
|
|
3302
|
+
description: 'Read back the Flow JSON document Meta holds: {flowJson}, a STRING, byte for byte — the same field and type Upload Flow JSON accepts, so read → edit → upload is a copy of one field. Works on a PUBLISHED Flow too (the starting point of a clone). Can be MEGABYTES (base64 images). Reads from Meta; changes nothing. 502 FLOW_JSON_UNAVAILABLE when Meta returns no document. Needs flows:read.',
|
|
3303
3303
|
action: 'Get the flow JSON',
|
|
3304
3304
|
routing: {
|
|
3305
3305
|
request: {
|
|
@@ -3311,7 +3311,7 @@ class PilotStatus {
|
|
|
3311
3311
|
{
|
|
3312
3312
|
name: 'Preview',
|
|
3313
3313
|
value: 'preview',
|
|
3314
|
-
description: '⛔ Mints a link that renders the Flow the way WhatsApp will, and the link needs NO LOGIN
|
|
3314
|
+
description: '⛔ Mints a link that renders the Flow the way WhatsApp will, and the link ALWAYS needs NO LOGIN: anyone holding the URL sees the form — treat previewUrl as a secret. {previewUrl, expiresAt, invalidated, warning} (warning is one bilingual "English | Portuguese" string). Calls Meta. Works on a DRAFT. ⚠️ Not a sandbox: on a data_exchange Flow the preview calls your endpoint for real, and whatever it writes stays written. 502 FLOW_PREVIEW_UNAVAILABLE. Needs flows:manage (ADMIN and up).',
|
|
3315
3315
|
action: 'Preview a flow',
|
|
3316
3316
|
routing: {
|
|
3317
3317
|
request: {
|
|
@@ -3372,7 +3372,7 @@ class PilotStatus {
|
|
|
3372
3372
|
{
|
|
3373
3373
|
name: 'Sync From Meta',
|
|
3374
3374
|
value: 'syncFromMeta',
|
|
3375
|
-
description: "Mirror the key's WABA Flow catalogue from Meta now, instead of waiting for the hourly sweep: {created, updated
|
|
3375
|
+
description: "Mirror the key's WABA Flow catalogue from Meta now, instead of waiting for the hourly sweep: {created, updated}. CREATES and UPDATES Flow rows; calls Meta (a paged walk that shares the WABA's Graph budget). truncated is the page ceiling, not a failure. One at a time per number: 429 FLOW_SYNC_IN_PROGRESS (Retry-After). No body. Needs flows:manage.",
|
|
3376
3376
|
action: 'Sync flows from meta',
|
|
3377
3377
|
routing: { request: { method: 'POST', url: '/flows/meta/sync' } },
|
|
3378
3378
|
},
|
|
@@ -3686,7 +3686,7 @@ class PilotStatus {
|
|
|
3686
3686
|
{
|
|
3687
3687
|
name: 'Leave',
|
|
3688
3688
|
value: 'leave',
|
|
3689
|
-
description: 'The number LEAVES the group (DELETE /v1/groups/{id}): {
|
|
3689
|
+
description: 'The number LEAVES the group (DELETE /v1/groups/{id}): {id} (the group JID). The group keeps existing for the others.',
|
|
3690
3690
|
action: 'Leave a group',
|
|
3691
3691
|
routing: {
|
|
3692
3692
|
request: { method: 'DELETE', url: '=/groups/{{encodeURIComponent($parameter.groupJid)}}' },
|
|
@@ -3745,7 +3745,7 @@ class PilotStatus {
|
|
|
3745
3745
|
{
|
|
3746
3746
|
name: 'Pin Message',
|
|
3747
3747
|
value: 'pin',
|
|
3748
|
-
description: 'Pin or unpin a message in the group: {
|
|
3748
|
+
description: 'Pin or unpin a message in the group: {id} (the group JID).',
|
|
3749
3749
|
action: 'Pin or unpin a group message',
|
|
3750
3750
|
routing: {
|
|
3751
3751
|
request: { method: 'POST', url: '=/groups/{{encodeURIComponent($parameter.groupJid)}}/pin' },
|
|
@@ -4106,7 +4106,7 @@ class PilotStatus {
|
|
|
4106
4106
|
{
|
|
4107
4107
|
name: 'Get Many',
|
|
4108
4108
|
value: 'getAll',
|
|
4109
|
-
description: 'List the leads captured from Meta Lead Ads Instant Forms (Facebook / Instagram) of the Pages linked to the key\'s number, newest first by the time the person SUBMITTED the form. Answers {leads, total, page, pageSize,
|
|
4109
|
+
description: 'List the leads captured from Meta Lead Ads Instant Forms (Facebook / Instagram) of the Pages linked to the key\'s number, newest first by the time the person SUBMITTED the form. Answers {leads, total, page, pageSize, notice?}. ⚠️ consentGiven is three-state: null means UNKNOWN (no consent checkbox configured, or not answered) — never a refusal. On a RELAY_ONLY number a lead keeps its ids and attribution but comes back with redacted=true and no name, email, phone or answers, and the page carries notice=PII_RELAY_ONLY. Requires a number-scoped API key.',
|
|
4110
4110
|
action: 'Get many leads',
|
|
4111
4111
|
routing: { request: { method: 'GET', url: '/leads' } },
|
|
4112
4112
|
},
|
|
@@ -4245,7 +4245,7 @@ class PilotStatus {
|
|
|
4245
4245
|
{
|
|
4246
4246
|
name: 'Get Many',
|
|
4247
4247
|
value: 'getAll',
|
|
4248
|
-
description: 'List the inbound messages that arrived from a Click-to-WhatsApp ad or post, newest first. Meta attaches the referral to the FIRST message of a conversation only, so each row amounts to one conversation started by that ad. Answers {referrals, total, page, pageSize,
|
|
4248
|
+
description: 'List the inbound messages that arrived from a Click-to-WhatsApp ad or post, newest first. Meta attaches the referral to the FIRST message of a conversation only, so each row amounts to one conversation started by that ad. Answers {referrals, total, page, pageSize, notice?}; each row carries referral {sourceId, sourceType, sourceUrl, headline, body, ctwaClid, adName, adsetName, campaignName, namesResolvedAt, ...}. sourceId is the STABLE ad id — names are editable in Meta and filled only when the advertiser shared the ad account with Pilot Status. On a RELAY_ONLY number the ad id and names stay, while ctwaClid, ad copy and content come back null with redacted=true. Acts on one number (needs chat:read).',
|
|
4249
4249
|
action: 'Get many referrals',
|
|
4250
4250
|
routing: { request: { method: 'GET', url: '/referrals' } },
|
|
4251
4251
|
},
|
|
@@ -4455,7 +4455,7 @@ class PilotStatus {
|
|
|
4455
4455
|
{
|
|
4456
4456
|
name: 'Unlink',
|
|
4457
4457
|
value: 'unlink',
|
|
4458
|
-
description: 'Disconnect one ad account. Soft: names already resolved stay. Answers {
|
|
4458
|
+
description: 'Disconnect one ad account. Soft: names already resolved stay. Answers {adAccountId}; 404 NOT_FOUND when it is not linked to this workspace (or, with a number key, not linked to that number). A number key whose number is not official answers 422 ADS_REQUIRE_OFFICIAL_NUMBER.',
|
|
4459
4459
|
action: 'Unlink an ad account',
|
|
4460
4460
|
routing: { request: { method: 'DELETE', url: '=/ads/accounts/{{$parameter.adAccountId}}' } },
|
|
4461
4461
|
},
|
|
@@ -4543,7 +4543,7 @@ class PilotStatus {
|
|
|
4543
4543
|
{
|
|
4544
4544
|
name: 'Unlink',
|
|
4545
4545
|
value: 'unlink',
|
|
4546
|
-
description: '⚠️ DESTRUCTIVE — unlinking a Page ERASES every lead captured through it and deletes its form configurations. There is no undo. Answers {
|
|
4546
|
+
description: '⚠️ DESTRUCTIVE — unlinking a Page ERASES every lead captured through it and deletes its form configurations. There is no undo. Answers {deletedLeads}.',
|
|
4547
4547
|
action: 'Unlink a lead page and delete its leads',
|
|
4548
4548
|
routing: { request: { method: 'DELETE', url: '=/lead-pages/{{$parameter.pageLinkId}}' } },
|
|
4549
4549
|
},
|
|
@@ -5488,7 +5488,7 @@ class PilotStatus {
|
|
|
5488
5488
|
{
|
|
5489
5489
|
name: 'Delete',
|
|
5490
5490
|
value: 'delete',
|
|
5491
|
-
description: 'Delete a phone line webhook AND its delivery history. There is no undo. Answers {
|
|
5491
|
+
description: 'Delete a phone line webhook AND its delivery history. There is no undo. Answers {id}.',
|
|
5492
5492
|
action: 'Delete a phone line webhook',
|
|
5493
5493
|
routing: {
|
|
5494
5494
|
request: {
|
|
@@ -5685,7 +5685,7 @@ class PilotStatus {
|
|
|
5685
5685
|
{
|
|
5686
5686
|
name: 'Delete',
|
|
5687
5687
|
value: 'delete',
|
|
5688
|
-
description: 'Delete a workspace webhook AND its delivery history. There is no undo. Answers {
|
|
5688
|
+
description: 'Delete a workspace webhook AND its delivery history. There is no undo. Answers {id}.',
|
|
5689
5689
|
action: 'Delete a workspace webhook',
|
|
5690
5690
|
routing: { request: { method: 'DELETE', url: '=/workspace/webhooks/{{encodeURIComponent($parameter.workspaceWebhookId)}}' } },
|
|
5691
5691
|
},
|
|
@@ -5897,7 +5897,7 @@ class PilotStatus {
|
|
|
5897
5897
|
{
|
|
5898
5898
|
name: 'Sync Card Setup Intent',
|
|
5899
5899
|
value: 'syncCardSetupIntent',
|
|
5900
|
-
description: 'After stripe.confirmSetup resolves: reads the SetupIntent from Stripe and, if it succeeded, makes the card the workspace\'s saved card now. Answers {
|
|
5900
|
+
description: 'After stripe.confirmSetup resolves: reads the SetupIntent from Stripe and, if it succeeded, makes the card the workspace\'s saved card now. Answers {status, saved, card: {brand, last4, expMonth, expYear} | null}; not succeeded yet = saved false. Idempotent. Unknown or another workspace\'s id: 404 SETUP_INTENT_NOT_FOUND.',
|
|
5901
5901
|
action: 'Sync a card setup intent',
|
|
5902
5902
|
routing: {
|
|
5903
5903
|
request: {
|
|
@@ -5919,7 +5919,7 @@ class PilotStatus {
|
|
|
5919
5919
|
{
|
|
5920
5920
|
name: 'Sync Payment Intent',
|
|
5921
5921
|
value: 'syncPaymentIntent',
|
|
5922
|
-
description: 'After stripe.confirmPayment resolves: reads the PaymentIntent from Stripe and, if it succeeded, credits the wallet — exactly once (a replay, or the racing webhook, gets credited false). Answers {
|
|
5922
|
+
description: 'After stripe.confirmPayment resolves: reads the PaymentIntent from Stripe and, if it succeeded, credits the wallet — exactly once (a replay, or the racing webhook, gets credited false). Answers {status, orderId, orderStatus, amount, currency, credited, balance, cardSaved}. It never charges. Unknown or another workspace\'s id: 404 PAYMENT_INTENT_NOT_FOUND.',
|
|
5923
5923
|
action: 'Sync a payment intent',
|
|
5924
5924
|
routing: {
|
|
5925
5925
|
request: {
|
|
@@ -6078,7 +6078,7 @@ class PilotStatus {
|
|
|
6078
6078
|
{
|
|
6079
6079
|
name: 'Link Shared Card',
|
|
6080
6080
|
value: 'linkSharedCard',
|
|
6081
|
-
description: 'Link the caller\'s RESERVE card source to this workspace, so its renewals fall back to that card (its own card is still tried first). OWNER of the workspace only (403 otherwise). Answers {
|
|
6081
|
+
description: 'Link the caller\'s RESERVE card source to this workspace, so its renewals fall back to that card (its own card is still tried first). OWNER of the workspace only (403 otherwise). Answers {sharedCard: {linked, sourceWorkspaceId}, changed} — idempotent: already linked → changed: false. 409 SHARED_CARD_NOT_CONFIGURED (no reserve card for this user), SOURCE_ARCHIVED, NO_SHARED_OWNER; 400 SELF_SOURCE when the workspace IS the source.',
|
|
6082
6082
|
action: 'Link the shared card of a workspace',
|
|
6083
6083
|
routing: {
|
|
6084
6084
|
request: {
|
|
@@ -6090,7 +6090,7 @@ class PilotStatus {
|
|
|
6090
6090
|
{
|
|
6091
6091
|
name: 'Unlink Shared Card',
|
|
6092
6092
|
value: 'unlinkSharedCard',
|
|
6093
|
-
description: 'Unlink the reserve card from this workspace, so the reseller\'s card stops paying its renewals (e.g. a defaulting customer). OWNER of the workspace only (403 otherwise). Answers {
|
|
6093
|
+
description: 'Unlink the reserve card from this workspace, so the reseller\'s card stops paying its renewals (e.g. a defaulting customer). OWNER of the workspace only (403 otherwise). Answers {sharedCard, changed} — idempotent: not linked → changed: false. 409 NO_SHARED_OWNER when it is linked to a source the caller is not an active OWNER of.',
|
|
6094
6094
|
action: 'Unlink the shared card of a workspace',
|
|
6095
6095
|
routing: {
|
|
6096
6096
|
request: {
|
|
@@ -6143,7 +6143,7 @@ class PilotStatus {
|
|
|
6143
6143
|
{
|
|
6144
6144
|
name: 'Create',
|
|
6145
6145
|
value: 'create',
|
|
6146
|
-
description: 'Mint a NAMED ps_workspace_ key (never the primary). Answers 201 {apiKey: {id, name, key, prefix, last4,
|
|
6146
|
+
description: 'Mint a NAMED ps_workspace_ key (never the primary). Answers 201 {apiKey: {id, name, key, prefix, last4, createdAt}} — apiKey.key is shown ONLY here. 409 WORKSPACE_KEY_LIMIT_REACHED at the limit.',
|
|
6147
6147
|
action: 'Create a workspace API key',
|
|
6148
6148
|
routing: {
|
|
6149
6149
|
request: {
|
|
@@ -6264,7 +6264,7 @@ class PilotStatus {
|
|
|
6264
6264
|
{
|
|
6265
6265
|
name: 'Archive',
|
|
6266
6266
|
value: 'archive',
|
|
6267
|
-
description: 'IRREVERSIBLE from the API: archives the workspace and LOCKS EVERYONE OUT, the caller included; its ps_ keys stop authenticating and there is no unarchive (support only). OWNER only, with the OWNER\'s account key + Workspace ID — any ps_ workspace or number key answers 403 MACHINE_CREDENTIAL_CANNOT_MANAGE_WORKSPACE. Answers {
|
|
6267
|
+
description: 'IRREVERSIBLE from the API: archives the workspace and LOCKS EVERYONE OUT, the caller included; its ps_ keys stop authenticating and there is no unarchive (support only). OWNER only, with the OWNER\'s account key + Workspace ID — any ps_ workspace or number key answers 403 MACHINE_CREDENTIAL_CANNOT_MANAGE_WORKSPACE. Answers {archivedAt}. 400 CONFIRMATION_MISMATCH when the typed name differs; 409 ALREADY_ARCHIVED.',
|
|
6268
6268
|
action: 'Archive the current workspace',
|
|
6269
6269
|
routing: {
|
|
6270
6270
|
request: { method: 'POST', url: '/workspace/archive' },
|
|
@@ -6274,7 +6274,7 @@ class PilotStatus {
|
|
|
6274
6274
|
{
|
|
6275
6275
|
name: 'Transfer Ownership',
|
|
6276
6276
|
value: 'transferOwnership',
|
|
6277
|
-
description: 'Make an ACTIVE member the OWNER; you become ADMIN, and BOTH sides have their OAuth refresh tokens revoked. It changes who PAYS the bill. OWNER only, with the OWNER\'s account key + Workspace ID — any ps_ workspace or number key answers 403 MACHINE_CREDENTIAL_CANNOT_MANAGE_WORKSPACE. Answers {
|
|
6277
|
+
description: 'Make an ACTIVE member the OWNER; you become ADMIN, and BOTH sides have their OAuth refresh tokens revoked. It changes who PAYS the bill. OWNER only, with the OWNER\'s account key + Workspace ID — any ps_ workspace or number key answers 403 MACHINE_CREDENTIAL_CANNOT_MANAGE_WORKSPACE. Answers {newOwnerId}. 400 NOT_A_MEMBER / TARGET_NOT_ACTIVE; 409 ALREADY_OWNER / NOT_OWNER / OWNERSHIP_CHANGED.',
|
|
6278
6278
|
action: 'Transfer the ownership of the current workspace',
|
|
6279
6279
|
routing: {
|
|
6280
6280
|
request: { method: 'POST', url: '/workspace/transfer-ownership' },
|
|
@@ -6384,7 +6384,7 @@ class PilotStatus {
|
|
|
6384
6384
|
{
|
|
6385
6385
|
name: 'Rotate Secret',
|
|
6386
6386
|
value: 'rotateSecret',
|
|
6387
|
-
description: 'Mint a NEW signing secret and return it in clear ONCE: {
|
|
6387
|
+
description: 'Mint a NEW signing secret and return it in clear ONCE: {secret} — no read path returns it, store it now. Immediate, with NO overlap: the old secret stops at once (deliveries already in flight may still carry it — accept both briefly, or rotate when quiet). The only way to get a secret for a webhook created before 2026-09-15 (unsigned until rotated). 404 WEBHOOK_NOT_FOUND.',
|
|
6388
6388
|
action: 'Rotate the secret of a webhook',
|
|
6389
6389
|
routing: {
|
|
6390
6390
|
request: { method: 'POST', url: '=/webhooks/{{encodeURIComponent($parameter.webhookId)}}/rotate-secret' },
|
|
@@ -6393,7 +6393,7 @@ class PilotStatus {
|
|
|
6393
6393
|
{
|
|
6394
6394
|
name: 'Reactivate',
|
|
6395
6395
|
value: 'reactivate',
|
|
6396
|
-
description: 'Resume delivery to a destination paused by the circuit breaker (it only closes by hand). Idempotent: already delivering → released 0. Answers {
|
|
6396
|
+
description: 'Resume delivery to a destination paused by the circuit breaker (it only closes by hand). Idempotent: already delivering → released 0. Answers {released (held events re-queued), stillHeld, circuitOpen, circuitOpenedAt, circuitSuccessPct, heldCount, droppedCount}.',
|
|
6397
6397
|
action: 'Reactivate a webhook',
|
|
6398
6398
|
routing: {
|
|
6399
6399
|
request: { method: 'POST', url: '=/webhooks/{{encodeURIComponent($parameter.webhookId)}}/reactivate' },
|
|
@@ -6679,7 +6679,7 @@ class PilotStatus {
|
|
|
6679
6679
|
{
|
|
6680
6680
|
name: 'Remove',
|
|
6681
6681
|
value: 'remove',
|
|
6682
|
-
description: "⛔ Removes an ACTIVE member — they lose access to the workspace AT ONCE and their OAuth tokens are revoked — or revokes a PENDING invite (its link stops working). There is no undo: to bring them back, invite again. {
|
|
6682
|
+
description: "⛔ Removes an ACTIVE member — they lose access to the workspace AT ONCE and their OAuth tokens are revoked — or revokes a PENDING invite (its link stops working). There is no undo: to bring them back, invite again. {email, apiKeysRevoked, apiKeysReassigned, oauthTokensRevoked}. If the member created API keys that still work, the call STOPS with 409 MEMBER_HAS_API_KEYS and the list, removing nothing: repeat with API Key Action — Revoke takes down every integration using those keys, Keep hands them to you. 409 WOULD_ORPHAN_WORKSPACE (the last OWNER). Account key only, OWNER only (members:remove).",
|
|
6683
6683
|
action: 'Remove a workspace member',
|
|
6684
6684
|
routing: {
|
|
6685
6685
|
request: { method: 'DELETE', url: '=/workspace/members/{{encodeURIComponent($parameter.workspaceMemberId)}}' },
|
|
@@ -6909,7 +6909,7 @@ class PilotStatus {
|
|
|
6909
6909
|
{
|
|
6910
6910
|
name: 'Buy Extra Numbers',
|
|
6911
6911
|
value: 'addExtraNumbers',
|
|
6912
|
-
description: "💸 CHARGES YOUR ACCOUNT on the spot: buys Quantity extra number slots, prorated for the rest of the cycle (proratedTotal in Preview), wallet credits first, then the saved card; from the next cycle each slot is billed monthly until a removal is scheduled. ⚠️ On a FREE plan it CONVERTS the account to On Demand — every number becomes paid, the one you already use included — and answers 409 CONFIRMATION_REQUIRED (with the preview) unless Confirm Plan Conversion is on. Answers {
|
|
6912
|
+
description: "💸 CHARGES YOUR ACCOUNT on the spot: buys Quantity extra number slots, prorated for the rest of the cycle (proratedTotal in Preview), wallet credits first, then the saved card; from the next cycle each slot is billed monthly until a removal is scheduled. ⚠️ On a FREE plan it CONVERTS the account to On Demand — every number becomes paid, the one you already use included — and answers 409 CONFIRMATION_REQUIRED (with the preview) unless Confirm Plan Conversion is on. Answers {charged, …}; never a checkout link. Retry with the SAME Idempotency Key (24 h window): a recognised retry returns the original result without charging again. 402 INSUFFICIENT_FUNDS (no credits, no card) / PAYMENT_FAILED; 502 PAYMENT_PROVIDER_ERROR (no slot added; check Preview before retrying); 409 UNUSED_CAPACITY_AVAILABLE (a paid slot is already free — connect a number there), IDEMPOTENCY_KEY_REUSED / IN_USE. Needs billing:manage (OWNER only).",
|
|
6913
6913
|
action: 'Buy extra numbers',
|
|
6914
6914
|
routing: {
|
|
6915
6915
|
request: { method: 'POST', url: '/subscription/extra-numbers' },
|
|
@@ -6919,7 +6919,7 @@ class PilotStatus {
|
|
|
6919
6919
|
{
|
|
6920
6920
|
name: 'Schedule Removal',
|
|
6921
6921
|
value: 'scheduleRemoval',
|
|
6922
|
-
description: "SCHEDULES giving back Quantity paid extra slots at the NEXT cycle
|
|
6922
|
+
description: "SCHEDULES giving back Quantity paid extra slots at the NEXT cycle (the 200 carries the resulting capacity). Nothing changes now and there is NO refund — the period already paid is kept, and the slots stay usable until it ends; the bill drops from the next cycle. Calling again OVERWRITES the scheduled target (does not add up); undo with Cancel Scheduled Removal. 409 NUMBER_LIMIT_EXCEEDED if the target would fall below the numbers connected (disconnect first). Needs billing:manage (OWNER only).",
|
|
6923
6923
|
action: 'Schedule the removal of extra numbers',
|
|
6924
6924
|
routing: {
|
|
6925
6925
|
request: {
|
|
@@ -6932,7 +6932,7 @@ class PilotStatus {
|
|
|
6932
6932
|
{
|
|
6933
6933
|
name: 'Cancel Scheduled Removal',
|
|
6934
6934
|
value: 'cancelScheduledRemoval',
|
|
6935
|
-
description: "Cancels the reduction scheduled with Schedule Removal: the next cycle KEEPS the current paid capacity — and its charge. A no-op if nothing was scheduled. Answers
|
|
6935
|
+
description: "Cancels the reduction scheduled with Schedule Removal: the next cycle KEEPS the current paid capacity — and its charge. A no-op if nothing was scheduled. Answers with the resulting capacity. No body. Needs billing:manage (OWNER only).",
|
|
6936
6936
|
action: 'Cancel the scheduled removal of extra numbers',
|
|
6937
6937
|
routing: { request: { method: 'DELETE', url: '/subscription/extra-numbers/schedule' } },
|
|
6938
6938
|
},
|
|
@@ -7106,7 +7106,7 @@ class PilotStatus {
|
|
|
7106
7106
|
{
|
|
7107
7107
|
name: 'Create Session',
|
|
7108
7108
|
value: 'createSession',
|
|
7109
|
-
description: "Mint a short-lived token your end user's BROWSER uses to mount the chat or connect iframe: 201 {token,
|
|
7109
|
+
description: "Mint a short-lived token your end user's BROWSER uses to mount the chat or connect iframe: 201 {token, whatsappNumberIds, allowedOrigins, expiresAt}. ⚠️ The token is a bearer credential until expiresAt: whoever holds it can read and SEND on the chosen numbers (chat) or connect a number to the workspace (connect), from the allowed origins. Hand it only to that user's page; do not log it. Chat on a workspace key needs Number IDs (400 NUMBERS_REQUIRED; 404 NUMBER_NOT_FOUND); on a number key it is always that number. Connect needs a workspace key (403 NUMBER_SCOPE_NOT_ALLOWED). 400 Validation error (origins must be exact, e.g. https://app.example.com). Default TTL 15 min (chat) / 30 min (connect), max 3600 s.",
|
|
7110
7110
|
action: 'Create an embed session',
|
|
7111
7111
|
routing: {
|
|
7112
7112
|
request: { method: 'POST', url: '/embed/sessions' },
|