SDK migration notes

This page records customer-facing compatibility changes between the public API and @adeli/sdk. It contains no private rollout links or internal release details.

Current release

@adeli/sdk 0.2.1 is published on npm. Upgrading from 0.1.x has one breaking change: see 0.2.0 — Instagram Unified Login below. 0.2.1 changes only the package README.

Unreleased — Meta full campaigns

Pre-release: not yet in a published @adeli/sdk version. The API change ships first.

Affected operations: createCampaign, updateAdGroup, listAdTargeting, getAdInsights, setAdStatus, and the new updateCampaign, deleteAdGroup, deleteAd, estimateAdReach, and listAdInstagramAccounts.

  • createCampaign accepts a Meta body with objective (budget, schedule, bid, targeting, a new or boosted creative, validateOnly). The Page-post boost body is unchanged. A validateOnly request answers 200 with { validateOnly: true, steps } instead of a campaign, so code that reads campaign from every 200 should check validateOnly first.
  • The Meta campaign record gains source and objective, and pagePostId is null for campaigns not built from a Page post.
  • updateAdGroup and listAdTargeting serve Meta too, so their responses can now carry platform: "meta_ads" with Meta-shaped adGroup and options. Exhaustive checks over platform or type need the new values.
  • getAdInsights on Meta adds result fields to each point and accepts Meta breakdowns, whose rows carry the same fields.
  • setAdStatus on Meta now answers 404 object_not_found for an object outside adAccountId, where it used to pass Meta's own answer through.

Unreleased — Scheduled publications and drafts

Pre-release: not yet in a published @adeli/sdk version. The API change ships first.

Affected operations: createPublication, getPublication, retryPublication, listPosts, and the new listPublications, updatePublication, publishPublication, and cancelPublication.

  • Publication['status'] gains "scheduled", "draft", and "canceled". Only publications created with the new scheduledFor or draft fields ever have them, but an exhaustive switch over the status needs the three branches before you adopt the new types.
  • createPublication answers 201 (not 202) for a scheduled publication or a draft. Requests without those fields still answer 202.
  • listPosts lists posts waiting in a scheduled publication first, with status: "scheduled", scheduledFor, and publicationId, and an empty providerId. Code that assumes every listed post is live should check status.

0.2.0 — Instagram Unified Login

Released in @adeli/sdk 0.2.0. The API change is live: every new Instagram connection goes through Meta's Instagram API with Unified Login.

Affected operations: startConnection, getConnection, listAccounts, listProfileAccounts, getAccount, and refreshAccounts.

Minimum SDK: 0.2.0.

  • authMethod gains "unified_login", the value every new Instagram connection reports. Exhaustive switch statements over it need a unified_login branch. "instagram_login" and "facebook_login" remain for accounts connected earlier, until they reconnect.
  • On startConnection, authMethod stays optional. The "instagram_login" and "facebook_login" values are deprecated. They are still accepted, and they run Unified Login too, so existing requests keep working.
  • Breaking: refreshAccounts can return expiresAt: null for an Instagram account connected with Unified Login, whose token does not expire. Code that parses expiresAt as a date must handle null.

Update, November 10, 2026: new Instagram connections run Instagram Login (the default) or Facebook Login again. "instagram_login" and "facebook_login" on startConnection are no longer deprecated, and 409 auth_method_conflict again refuses switching between them. "unified_login" stays in the type: accounts connected with it keep working and report it, and sending it starts an Instagram Login connect. No SDK upgrade is needed; keep the unified_login branch and the null handling.

ts
// Before: every refreshed account had an expiry.
const expires = new Date(result.expiresAt);

// After: a Unified Login Instagram token has none.
const expires = result.expiresAt === null ? null : new Date(result.expiresAt);

There is no compatibility window for the null. It appears only for accounts connected or reconnected since the change. Accounts on the older logins keep returning a date until their owners reconnect.

0.2.0 — Node.js 22 and Cloudflare Workers

0.2.0 lowers the minimum Node.js version from 24 to 22, and supports Cloudflare Workers with nodejs_compat. No code change is needed. See Runtimes for what each entry point needs.

Candidate contract review — not a release notice

The initial SDK candidate replaces broad response placeholders with typed contracts for all 48 operations. Consumers regenerating their own types should review these areas before adopting the candidate:

  • Required account capability fields and nullable profile metadata are represented explicitly; do not assume missing fields and null are interchangeable.
  • Account detail and connection routes retain their profile scope. Ads operations retain required account/query scope and idempotency keys where applicable.
  • Accepted publishing (202) and partial outcomes (207) are successful HTTP responses, not proof that every provider action finished successfully. Inspect the returned status and per-item outcomes.
  • Comment and campaign deletion can return 204 with no JSON body. Do not attempt to decode an empty response.
  • Error responses retain the nested error envelope; permission/reconnection details vary and must be narrowed safely.
  • Generated response fixtures and validators may need updates for the concrete field, enum, and union definitions instead of accepting arbitrary objects.

LinkedIn organization candidate

The candidate adds linkedin to generic connection, account, and post platform unions and adds a LinkedIn request branch to createPost. Existing wire requests remain valid, but TypeScript consumers that use exhaustive switch statements over platform or connection-status unions must add a LinkedIn branch (or an explicit unknown-provider fallback) before adopting the candidate. The new post body is { platform: "linkedin", accountId, profileId?, commentary, image? }, where image is one JPEG, PNG, or GIF as base64. LinkedIn is available on the production deployment.

LinkedIn media and mentions candidate

The candidate widens the LinkedIn createPost branch and adds linkedin to the createMediaUploads platform enum. Every request that was valid before stays valid. A LinkedIn post now takes at most one of image (now also { upload_id, title? }), images (2–20 { upload_id, alt_text? }), video ({ upload_id, title? }), or document ({ upload_id, title }), plus optional mentions of { urn, name, offset }. Code that narrows image to the base64 shape, or switches exhaustively over the media-upload platform enum, must handle the new members. A video request can now fail with 503 processing_timeout when LinkedIn has not finished processing it; no post is created in that case.

How future entries are structured

Each released change will name the affected operation IDs, API availability and deprecation dates, the minimum SDK version, and a before/after migration example. Breaking API changes will include a compatibility window or staged rollout; an SDK major version alone does not protect existing HTTP API clients.

For example, a future entry will state the actual values rather than placeholders:

FieldRelease entry will include
Affected operationsExact operationId names and public routes
Minimum SDKPublished @adeli/sdk version
API timingAvailability date and any deprecation date
MigrationA before/after request or SDK call that compiles against that release

See the TypeScript SDK page to install it, and the API reference for the wire contract.