# API Changelog

Canonical: https://docs.bluehola.com/docs/reference/changelog
OpenAPI: https://docs.bluehola.com/openapi.yaml

This page records API contract and documentation changes that affect callers. Machine-readable version: [`/changelog.json`](https://docs.bluehola.com/changelog.json).

:::note

Every entry is classified as `Added`, `Changed`, `Deprecated`, `Removed`, `Fixed` or `Breaking`; anything involving a deprecation must state a sunset date and a migration path. The history here starts from 2026-09-22; earlier API changes have not been fully reconstructed.

:::

## 2026-11-23

### Added

- Customers can read their own message volume and unit prices with `GET /v1/usage/messages` (`messages:read`; customer-level API Keys only). The response groups messages by message type, billing category, destination country and the actual unit price charged, with `messageCount` per row. Only messages with a pricing record are counted — free messages have no ledger row, so a ledger-based count would drop them. Tiered pricing can produce several rows for the same country and category; sum `messageCount` across them for total volume. Country comes from the recipient number and is `null` when it cannot be resolved; `market` is the Meta billing market, which may be a region. See [Message Usage & Prices](../billing-status/get-v1-usage-messages.md).
- Onboarding can now start from a customer entity, not only from an existing Business Portfolio. [Complete Onboarding](../onboarding/post-v1-onboarding-embedded-signup.md), [Create Onboarding Link](../onboarding/post-v1-onboarding-invitations.md) and [Report an Embedded Signup Session Event](../onboarding/post-v1-onboarding-es-events.md) accept **exactly one** of `customerEntityId` (`cust_...`) or `portfolioId` (`bm_...`); passing both or neither returns `400`. With `customerEntityId`, no Portfolio needs to exist in advance: after the customer authorizes, the Business Portfolio is found from the WABA's Meta owner and reused when that customer already has the same Meta BM, or created otherwise, and the operation's `portfolioId` is backfilled. If the Meta BM already belongs to another customer or another BU, the operation ends `failed` with `lastErrorCode: ONBOARDING_META_BM_ALREADY_CONNECTED` and `requiredInput: null`; the binding is not reassigned and retrying cannot fix it. A missing customer entity returns `404` before the one-time authorization code is used. The existing `portfolioId` route is unchanged. See [Customer Onboarding](../guides/customer-onboarding.md).

### Changed

- An invitation created with `customerEntityId` returns an empty `portfolioName` in its `201` response, and the landing page shows an empty Portfolio name, because the Portfolio is created only after the customer authorizes. Invitations created with `portfolioId` are unchanged.

## 2026-11-19

### Removed

- The API reference now covers only the endpoints a customer API Key can call, plus the public health and invitation endpoints. Pages, OpenAPI operations and guide sections for endpoints that customer Keys cannot call have been removed: BU and platform-level asset management (customer entity lists and edits, creating, updating and deleting Business Portfolios, WABAs and phone numbers, delete previews, Meta account details, business profile and message routing, Pixel linking), phone number lifecycle operations other than `register`, credit line authorization, Marketing Messages onboarding, Business Verification, Flow management, `DELETE /v1/media/{id}`, the `GET /v1/messages` list, conversion event reporting, overview counts, and the credit account, customer budget and pricing endpoints. `GET /v1/wabas/{id}/analytics` was also removed, because it requires the `billing:read` scope, which customer Keys are not issued. Calling these endpoints with a customer Key has always returned `403`; server behavior is unchanged. Contact BlueMedia support for operations that are no longer documented.

## 2026-11-18

### Added

- `MARKETING` templates accept optional `optimizationSpec` on [Create Template](../templates-flows-media/post-v1-templates.md) and [Edit Template](../templates-flows-media/patch-v1-templates-id.md), and template reads return its Max Price snapshot. `bidAmount` is the integer cap per 1,000 deliveries in the Messaging account currency's smallest unit; optional country multipliers support at most 240 entries. Bid-only edits retain the review status; omitting the spec preserves it, while two explicit nulls clear it. Max Price sends require a phone number rather than a BSUID-only recipient, including broadcasts and `dryRun`; failure codes now cover `131061`, `131062` and `131065`. Delivered/read webhooks expose `pricing.category: "marketing_lite_dynamic"` and estimated `pricing.cost`; the Meta invoice remains final. BlueMedia's rate-card, balance, reservation and customer-budget rules are unchanged. See [Templates](../templates-flows-media/templates.md) and [Webhook Integration](../guides/webhook-integration.md).

### Changed

- When ownership verification fails on `POST /v1/webhook-endpoints/{id}/verify` and the receiving end's failure response carries a well-formed `CF-Ray` header (Cloudflare Ray ID), the failure reason recorded in `metadata.last_verification_error` now includes that value, so the receiver's administrators can locate the block record. The endpoint still stays `pending` on failure; no fields or statuses changed. See [Trigger Ownership Verification](../webhooks/post-v1-webhook-endpoints-id-verify.md).
- The existing `GET /health/pipeline` endpoint now has an explicit OpenAPI schema for its `200` response. Top-level `status`, `checkedAt` and `checks` are required; `checks` requires `outbox`, `accepted` and `sending`, each with required boolean `ok`, number `oldestSeconds`, integer `pending` and number `thresholdSeconds`. `status` is `ok` on `200`; when any item exceeds its threshold, `503` returns the same response shape with `status: "degraded"`. This completes the machine-readable success contract; probing behavior is unchanged. See [Pipeline Backlog Check](../billing-status/get-health-pipeline.md).

## 2026-11-17

### Added

- Customer Keys can create their own onboarding record with `POST /v1/business-portfolios` (`name` only, `onboarding:write`), then generate an invitation or complete Embedded Signup for that Portfolio. Reading operations/invitations requires `onboarding:read`; lists are automatically limited to the customer’s current Portfolios, and detail/retry/revoke requests check the same ownership. `GET /v1/onboarding/config` supplies SDK settings. Cross-customer access remains denied.

### Fixed

- Corrected the customer onboarding guide, authentication allowlist, API examples and OpenAPI: create the local record first; `portfolioId` is the returned `bm_...` ID, not the numeric Meta Business Portfolio ID. Customer Keys must omit `metaBmId` (supplying it returns 400); the backend binds it from the authorized WABA owner after Meta checks. An empty asset list is a normal starting state. Asset lists require the customer’s `customerEntityId`; onboarding lists derive it from authentication. `POST /v1/onboarding/embedded-signup` submits an authorization result and returns HTTP 201; it does not create a link or a Portfolio. Both onboarding lists reject out-of-range limits with 400. These documentation corrections describe the current behavior. See [Customer Onboarding](../guides/customer-onboarding.md).

## 2026-11-13

### Added

- `POST /v1/broadcasts` accepts `toUserId` (BSUID) for recipients without a phone. Provide `to` or `toUserId`; phone wins when both are present. Normalised phones and exact BSUIDs are de-duplicated separately (first entry wins); de-duplicate Contacts before submission because `reference` and inferred phone/BSUID links are not deduplication keys. Recipient details return the identity actually used in nullable `toNumber` / `toUserId`. One-tap / zero-tap / copy-code authentication templates targeting any BSUID are rejected at creation with `400 VALIDATION_FAILED`, including `dryRun`. A BSUID must match the sending phone's Business Portfolio scope; Meta rejects mismatches without phone fallback or sender switching, and `dryRun` / `202` does not guarantee scope validity. BSUID-only pricing uses the existing fallback estimate; budget, opt-out, cooldown and idempotency rules are unchanged. The OpenAPI contract now describes the nested recipient fields and nullable identity response. See [Create Broadcast](../messaging/post-v1-broadcasts.md) and [Recipient Details](../messaging/get-v1-broadcasts-id-recipients.md).

## 2026-11-11

### Added

- `GET /health/pipeline` reports whether the sending pipeline is actually moving, by reading three ages from the database: the oldest unpublished outbox event, the oldest message still in `accepted` and the oldest message still in `sending`. It returns `503` with each item's details once any of them is past its threshold (defaults 120s / 300s / 600s, adjustable with `PIPELINE_OUTBOX_MAX_SECONDS`, `PIPELINE_ACCEPTED_MAX_SECONDS` and `PIPELINE_SENDING_MAX_SECONDS`), and `200` otherwise. It needs no API Key. The readiness check still returns 200 when the scheduler is stuck or the message worker stops consuming — customer messages just sit in `accepted` — so this is the endpoint external probing should watch and alert on for 503. It is deliberately not folded into `/ready`, which the deploy script uses to decide whether a new API instance can take traffic. See [Pipeline Backlog Check](../billing-status/get-health-pipeline.md).

## 2026-11-09

### Added

- `GET /v1/messages` accepts `idempotencyKey` to look up the message created with that `Idempotency-Key` on `POST /v1/messages`. It returns an array of 0 or 1 items and ignores the other filters; use it when a send request timed out and you do not know whether the message was created. An optional `phoneNumberId` narrows the lookup to one sending number. A platform-level Key must pass `X-Tenant-Id`. Calls without `idempotencyKey` behave exactly as before.

## 2026-11-04

### Added

- `POST /v1/pricing/estimates` gives a read-only cost estimate for a broadcast's recipient list: numbers are grouped by pricing market and priced from your rate card, at the same customer price the real charge uses. It does not check the balance, reserve anything or store anything. Recipients that cannot be priced are listed in `unpriced` with a reason instead of being filled in with a fallback amount or reported as 0. Pass `authentication_international` explicitly when it applies; it is not inferred from the market.

## 2026-11-03

### Added

- Customer Keys can call `POST /v1/phone-numbers/{id}/register` for phone numbers their customer entity owns (other numbers return `403`), so they can register a number again themselves after a new display name is approved. deregister, request-code, verify-code and two-step-pin stay closed to customer Keys. See [Register Phone Number](../assets-phone-numbers/post-v1-phone-numbers-id-register.md).

### Changed

- After a successful `POST /v1/phone-numbers/{id}/register`, the platform refreshes the number from Meta, so `GET /v1/phone-numbers/{id}` shows the new display name right away instead of the old one until the next refresh.

### Fixed

- `GET /v1/phone-numbers/{id}/meta-status` reported `displayName.nextAction: await_review` after a number had been registered again with its approved name; it now reports `none`.

## 2026-11-02

### Changed

- The broadcast cost pre-check (`POST /v1/broadcasts`, including `dryRun`) and the amount reserved for each message are now priced from your rate card, at the highest rate that can apply, instead of a flat estimate per message. A small balance can now start a campaign it can actually afford. Recipients that cannot be priced are still counted at the flat fallback estimate. The `402 INSUFFICIENT_FUNDS` details add `requiredMicros`, `availableMicros`, `pricedRecipients`, `fallbackRecipients` and `fallbackEstimateMinor`; if `fallbackRecipients` is not 0, check the rate card before topping up. The customer budget pre-check uses the same estimate. See [Create Broadcast](../messaging/post-v1-broadcasts.md).

## 2026-11-01

### Fixed

- The signature verification samples in [Webhook Integration](../guides/webhook-integration.md) could throw instead of returning `false`. The default-scheme sample called `crypto.timingSafeEqual` without first checking that the header was present and the lengths matched, and the connection-protocol sample compared string lengths rather than byte lengths. A missing, truncated or non-ASCII signature header therefore raised an exception, which a receiver typically turns into a `500` instead of rejecting the request. Both samples now check presence and byte length first. Signing on our side is unchanged; if you copied either sample, add the same checks.

## 2026-10-31

### Added

- `GET /v1/webhook-endpoints/{id}/deliveries` lists an endpoint's delivery records, newest first: status, attempts, the receiver's response code and a response excerpt, the latest error and the next retry time, without the event payload. It accepts a `status` filter (`pending` / `queued` / `delivered` / `failed`) and `limit` (1–100, default 50), and pages with `before` = the previous `nextCursor`; invalid values return `400`. See [List Deliveries](../webhooks/get-v1-webhook-endpoints-id-deliveries.md).
- `POST /v1/webhook-endpoints/{id}/deliveries/{deliveryId}/redeliver` sends a finished (`delivered` / `failed`) delivery again, to recover events missed after automatic retries stopped (about 38.6 hours). It returns `202` with a new delivery record whose `redeliveredFrom` is the original; the original is kept. It uses the endpoint's current URL and secret. Under the connection protocol the redelivery keeps the original `Webhook-Id`; under the default scheme `X-Delivery-Id` is new, so de-duplicate on event content. It returns `409` with `details.reason` `delivery_in_progress`, `endpoint_not_active` or `redelivery_in_progress`, and `404` when the delivery does not belong to the endpoint. See [Redeliver a Delivery](../webhooks/post-v1-webhook-endpoints-id-deliveries-deliveryid-redeliver.md).
- Customer Keys can call both endpoints for endpoints that belong to their customer entity.

## 2026-10-30

### Breaking

- Customer Keys now bind webhook endpoints to their customer entity with `customerId` instead of to one Business Portfolio with `projectId`. This replaces the `projectId` rule announced earlier the same day: `POST /v1/webhook-endpoints` and `GET /v1/webhook-endpoints` from a customer Key must pass `customerId` equal to its own customer entity (the `customerEntityId` from `GET /whoami`), and a customer Key that passes only `projectId` gets `403`. One customer-bound endpoint receives events for every Portfolio the customer entity owns, including ones added later. Endpoints a customer Key already created with `projectId` keep receiving that Portfolio's events and can still be managed by ID, but `GET /v1/webhook-endpoints?customerId=` does not list them. To migrate, create one endpoint with `customerId`, then `DELETE` the Portfolio-bound ones so events are not delivered twice. See [Endpoints a customer Key can call](../guides/authentication.md#customer-key-endpoints).

### Added

- Customer Keys can now manage templates, broadcasts, the inbox and webhook endpoints for the Business Portfolios their customer entity owns: `POST /v1/templates`, `GET` / `PATCH` / `DELETE /v1/templates/{id}`, `POST /v1/templates/media`, `POST /v1/templates/sync`, template analytics; the `/v1/broadcasts` family; the `/v1/conversations` family; and the `/v1/webhook-endpoints` family. Before this they returned `403 TENANT_FORBIDDEN` (`customer-level keys cannot call …`) for customer Keys. The full list is in [Endpoints a customer Key can call](../guides/authentication.md#customer-key-endpoints).
- `GET /v1/conversations` and `GET /v1/broadcasts` accept `phoneNumberId` to limit the list to one phone number. It is optional for BU Keys; customer Keys must pass it.
- `POST /v1/webhook-endpoints` accepts `customerId` (`cust_...`): the endpoint receives events for every Business Portfolio that customer entity currently owns, resolved per event. It is mutually exclusive with `projectId` (passing both returns `400`), and the customer entity must belong to the account and have `status: active` (otherwise `400`); while its status is not `active`, its endpoints receive no events. `GET /v1/webhook-endpoints` accepts `customerId` and `projectId` filters, each matching the binding exactly. See [Create Account Callback Endpoint](../webhooks/post-v1-webhook-endpoints.md).
- Every webhook delivery, under both signature schemes, carries ownership headers `X-Account-Id`, `X-Project-Id` (Business Portfolio) and `X-Customer-Id` (customer entity). The last two are omitted when that ownership cannot be resolved. They are not part of the signature, so existing verification is unaffected. See [Webhook Integration](../guides/webhook-integration.md).
- `DELETE /v1/phone-numbers/{id}/contact-book?bsuid=` deletes one user's entry from Meta's contact book, for personal data deletion requests (scope `phone_numbers:manage`). It returns `{ deleted }`; `deleted: false` means there was no entry and is also a success. Parent BSUIDs (`US.ENT.…`) are rejected with `400`.

### Changed

- `PATCH /v1/business-portfolios/{id}` that changes `customerEntityId` returns `409 VALIDATION_FAILED` (`details.reason: "portfolio_bound_webhook_endpoints"`, with `details.endpointIds`) while webhook endpoints that are not disabled are bound directly to that Portfolio, because they would keep receiving its events after it belongs to another customer. Disable them first.
- When a user who was known only by BSUID taps a contact information request and shares their own number (`origin: contact_request`), the conversation's empty `contactWaId` is filled with the shared `wa_id`, so you can send to that number afterwards. Contact cards sent directly (`origin: other`) are not used, and an existing `contactWaId` is not overwritten.

### Fixed

- `GET /v1/media/{id}` and `GET /v1/media/{id}/content` returned `404` for media ids from inbound messages (images, stickers and other files users sent in), for every Key. Both now accept those ids as well as uploaded media, and customer Keys can call them; ownership is checked against the media's phone number. `DELETE /v1/media/{id}` still only accepts uploaded media and is not open to customer Keys.

## 2026-10-29

### Fixed

- [FAQ](faq.md) and [Rate Limits & Quotas](rate-limits.md) still described a single hard 5 MB limit on the upload endpoint and said audio, video and documents over 5 MB had to be sent by `link`. They now match the per-type check in place since 2026-10-09: 5 MB for images, 16 MB for audio, video and documents, and 100 KB / 500 KB for WebP stickers; only documents over 16 MB (up to Meta's 100 MB) need `link`. See [Upload Media](../templates-flows-media/post-v1-media.md). This corrects the documentation and does not announce an API change.


## 2026-10-23

### Added

- `GET /v1/phone-numbers/{id}/meta-status` returns a local, read-only projection of the number's Meta-side state: the display name in effect, the latest name request with `nextAction` and `reRegisterDeadline` (Meta requires registering again within 14 days of approval), Official Business Account status and business username. It does not call Meta; Refresh Status from Meta updates it.
- Business profile on the Meta side: `GET /v1/phone-numbers/{id}/business-profile/meta` reads the profile Meta holds and overwrites the local copy; `POST /v1/phone-numbers/{id}/business-profile/meta` updates it on Meta and reads it back, reporting each field as `confirmed` / `mismatch` / `unknown` / `unverifiable`; `POST /v1/phone-numbers/{id}/profile-picture` uploads a JPG/PNG of at most 5 MB and returns a `handle` (valid for about 4 days) to pass as `profilePictureHandle`. The existing `GET` / `PUT /v1/phone-numbers/{id}/business-profile` still only read and write the local record.
- `GET` / `POST /v1/wabas/{id}/meta-account` read the WABA name and time zone Meta holds, and rename the account on Meta with a read-back check (`confirmed`: `true` / `false` / `null`). Renaming requires `onboarding:write`. `GET` / `PATCH /v1/wabas/{id}` still only act on the local record.
- `POST /v1/broadcasts` accepts an `Idempotency-Key` header (at most 200 characters): the same key and body return the original campaign with `replayed: true`, and a different body returns `409 IDEMPOTENCY_CONFLICT`. `GET /v1/broadcasts` adds `idempotencyKey` to find that campaign when a create request's outcome is unknown, and `before` for pagination by `createdAt`. Without the header, a repeated POST still creates a second campaign.
- `GET /v1/broadcasts/{id}/recipients` rows now include `delivery` (`{ status, wamid, errorCode, errorMessage, updatedAt }`) and the `reference` you set per recipient at creation (`recipients[].reference`, at most 200 characters). It adds a `deliveryStatus` filter and an `after` cursor (rows sorted by `id` ascending).
- Four normalized webhook events in the platform envelope, published in addition to the original Meta-shaped events: `contact.identity_changed`, `contact.info_shared`, `marketing.preference_updated` and `phone_number.username_updated`. They can be listed in `events`, and each has a standalone JSON Schema under `/schemas/webhooks/`. Endpoints subscribed to `*` (the default when `events` is omitted) receive them too, so make sure such a receiver ignores event types it does not recognize. See [Webhook Integration](../guides/webhook-integration.md).
- The `POST /v1/phone-numbers/{id}/refresh` response adds `metaSync`: a per-field result (`updated` / `unchanged` / `not_returned`) and the outcome of the separate Official Business Account and business username reads in `sections.oba` / `sections.username`.

### Changed

- `POST /v1/templates/sync` now follows Meta's pagination for up to 5 pages of 200 templates per call instead of only the first page. When `truncated` is `true` the response includes `nextCursor`; pass it as `after` to continue. `nextCursor` is `null` once everything has been read.
- `GET /v1/broadcasts/{id}/recipients` returns `400 VALIDATION_FAILED` for a `status` or `deliveryStatus` value outside the documented set.
- Cancelling or pausing a broadcast takes effect before the dispatcher's next message, so recipients claimed in the current round but not yet sent are voided or returned to `pending`. Resume continues only with `pending` recipients and does not resend recipients whose dispatch failed.
- `POST /v1/messages` validates `interactive.type: request_contact_info` locally: it needs a non-blank `body.text` and `action.name: request_contact_info`, otherwise the request returns `400 VALIDATION_FAILED`. Other interactive subtypes are still passed through to Meta.

### Fixed

- An opt-out Meta reported with only a BSUID (no `wa_id`) was previously dropped. It is now recorded, opt-outs are stored against both the phone number and the BSUID, and a marketing send is blocked with `MARKETING_OPT_OUT` when either `to` or `toUserId` matches.
- The Recipient Details page now lists the `status` filter values correctly as `pending` / `dispatching` / `queued` / `failed` / `skipped` / `canceled`. This documents existing behaviour and does not announce an API change.

## 2026-10-21

### Breaking

- Budget caps moved from the Business Portfolio to the customer entity. `PUT` / `DELETE /v1/credit-account/allocations/{portfolioId}` are replaced by `PUT` / `DELETE /v1/credit-account/allocations/{customerEntityId}`. `GET /v1/credit-account/allocations` and `GET /v1/credit-account/allocations/audit` now return one row per customer entity, keyed by `customerEntityId`, with the customer's Portfolios in `items[].portfolios[]`, and add authoritative `*Micros` amounts. Existing caps were rolled up: a customer whose Portfolios all had caps in one currency now has their sum as its cap; any other customer has no limit, and `unlimitedReason` says why. A Portfolio frozen on its own with `0` is no longer frozen if a sibling Portfolio had a non-zero cap. To migrate, pass the customer entity ID, read the new list shape, and check each customer's `allocatedMinor`. The reference pages moved to Set Budget Cap and Remove Budget Cap; see Customer Budgets.
- An exhausted budget now returns `402 CUSTOMER_BUDGET_EXCEEDED`, and a failed message records it with `customerAction: raise_customer_budget`. Its `details` carry `customerEntityId` instead of `portfolioId`. `BM_BUDGET_EXCEEDED` is no longer returned for new requests but can remain on historical messages; handle both codes the same way.

### Added

- `GET /v1/credit-account/allocations/by-bm` returns read-only net spend per Business Portfolio. Portfolios no longer have a cap of their own.
- The OpenAPI document declares `CustomerAction` as an enum schema.

### Changed

- `DELETE /v1/customer-entities/{id}` returns 409 with `details.allocationCount` while the customer entity still has a budget cap. Remove the cap first with `DELETE /v1/credit-account/allocations/{customerEntityId}`.

### Fixed

- The Delete Customer Entity page now also lists the existing `apiKeyCount` blocker: a customer entity that still has API Keys issued for it cannot be deleted. This documents existing behaviour and does not announce an API change.

## 2026-10-16

### Breaking

- The API base URL is now `https://api.bluehola.com`, documentation is served from `https://docs.bluehola.com`, and the portal — including invitation links (`https://portal.bluehola.com/invite/<token>`) — is now at `https://portal.bluehola.com`. Update your configured API base URL and any saved documentation or portal links to the new domain.

## 2026-10-09

### Changed

- `POST /v1/media` and `POST /v1/templates/media` now check upload size per media type instead of a single 5 MB cap, matching Meta's own limits: 5 MB for `image/jpeg`/`image/png`, 16 MB for audio, video and documents (the platform caps documents stricter than Meta's own 100 MB, because the upload path buffers the whole file in memory), and 100 KB static / 500 KB animated for WebP stickers. Audio, video and documents up to 16 MB can now be uploaded directly; previously anything over 5 MB had to be sent by `link`. The generic multipart error message changed from `invalid multipart upload (max 5MB)` to `invalid multipart upload (max 16MB per file, 3 files)`; exceeding a type's limit now returns `400 VALIDATION_FAILED` with `details: { mimeType, sizeBytes, limitBytes }`.

## 2026-10-08

### Changed

- Customer API Keys now cover all current Business Portfolios under one customer entity. New single-Portfolio Keys are no longer issued; existing ones remain valid. Customer Keys must pass `customerEntityId` to list Portfolios, WABAs or phone numbers; `/whoami` now returns that ID. Migrate by issuing a customer Key and replacing the old credential.

### Fixed

- Clarified Meta’s pricing policy effective 2026-10-01: non-template service replies and utility templates in an open 24-hour customer service window are chargeable by send date. The window still controls whether a non-template reply is allowed; it does not make the reply free. This documents the pricing rule and does not announce an API contract change.

## 2026-10-02

### Fixed

- Translated all 469 Chinese `description` occurrences in the downloadable OpenAPI JSON and YAML to English, including request and response fields, parameters, component schemas and error responses. The synchronization step now fails if a new untranslated description appears.

## 2026-10-01

### Added

- Documented the five customer entity operations under `GET/POST /v1/customer-entities` and `GET/PATCH/DELETE /v1/customer-entities/{id}`. A customer entity groups Business Portfolios within one BU; it is not a new authorization boundary.
- Documented `POST /v1/wabas/{id}/marketing-messages/refresh` and `POST /v1/wabas/{id}/marketing-messages/onboarding-request`. The latter asks Meta to email the customer's Business Portfolio administrators to sign the Marketing Messages terms.

### Changed

- Synchronized the downloadable OpenAPI 3.1 contract with ApiWorker `main`: 90 public paths and 41 schemas. The new pages and navigation are available in English, Simplified Chinese and Traditional Chinese.
- Documented `customerEntityId` filters for Business Portfolios, WABAs and phone numbers, plus the `portfolioId` filter for phone numbers. Filters follow current ownership and intersect when combined.
- Clarified billing usage: `effective*` is actual spend after reversals, `charged*` and `reversed*` are gross amounts, and ledger net values can be negative at a reporting window boundary. Reconciliation uses `*Micros`.
- Documented invitation verification `mode` and server-provided `features`, the automatic Marketing Messages route for marketing templates, and how to query a message whose Meta submission outcome is uncertain.

## 2026-09-22

### Added

- Published the OpenAPI 3.1 download entry points: [`/openapi.yaml`](https://docs.bluehola.com/openapi.yaml) and [`/openapi.json`](https://docs.bluehola.com/openapi.json).
- Published `llms.txt`, the full Markdown corpus and a standalone Markdown file per page, for coding agents to read directly.
- Published standalone JSON Schemas for the 8 webhook event types, with a unified entry point under OpenAPI `webhooks`.
- Added formal success response schemas and per-status error responses for `POST /v1/messages`, `GET /v1/messages` and `GET /v1/messages/{id}`.

### Fixed

- Fixed the contradictory documentation about whether `type` is required on a message request: omitting it is backwards compatibility for text only, and new code should send it explicitly.
- Fixed `<type>` content being incorrectly described as a string; message requests now use `oneOf` + `discriminator` and express the combination constraints on recipients and media references.

### Changed

- The OpenAPI query parameters for the message list now declare accurate types, ranges, date formats and the status enum. The server's existing behaviour — ignoring invalid values and returning an empty list — is unchanged.

## 2026-09-21

**The documentation site moved from GitBook to Docusaurus.**

- Navigation became a three-level structure: business domain → resource group → endpoint. Collapsed, the sidebar went from 122 entries to 46.
- Endpoint entries in the sidebar gained HTTP method badges (GET / POST / PUT / PATCH / DELETE).
- Added 18 resource-group index pages, each giving that group's use cases, endpoint overview and common pitfalls.
- Added this "Reference" section: [Glossary](glossary.md), [Rate Limits & Quotas](rate-limits.md), [Idempotency & Retries](idempotency.md), [FAQ](faq.md).
- Added flowcharts to the guides: the message state machine, the five-step onboarding orchestration, billing reservation/settlement/reversal, phone number registration order, and webhook ownership verification.
- Added site-wide full-text search (Chinese and English).
- Fixed 7 code blocks whose incorrect language annotation broke highlighting.

:::warning

After the migration, **endpoint page URLs gained an extra segment** for the resource group, for example:

```text title="URL change"
old  /xiao-xi-fa-song-yu-zhuang-tai/post-v1-messages
new  /docs/messaging/messages/post-v1-messages
```

Old links will 404. If your internal documentation or ticket templates reference the old addresses, they need updating.

:::

## 2026-09-20

**Reorganised endpoint navigation by business domain.**

- 121 endpoint pages moved from a flat list into business-domain groups.
- Shortened over-long navigation entry names (for example "Read final status, wamid and failure reason" → "Get Message Status").
