OverviewProductsPlatformsAPI ReferenceResources

Connect an OpenAI Ads account

POSThttps://zernio.com/api/v1/connect/openai-ads/credentials

Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager.

The key grants full campaign write access on OpenAI's side (OpenAI does not offer a read-only key scope).

Zernio uses it to:

  • read ads and performance
  • create and manage campaigns you set up through Zernio (create, status, budget, and cancel)

Campaigns created directly in ChatGPT Ads Manager can still be managed there.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Body

application/json

What every request needs

apiKeystringRequired

API key from ChatGPT Ads Manager (Settings). Grants full read/write access on OpenAI's side; Zernio only ever reads with it.

profileIdstringRequired

Your Zernio profile ID

Optional parameters3 fields
statestring

Optional state passthrough for the connect flow.

redirect_urlstring (uri)

Optional URL to redirect to after successful connection, echoed back as redirectUrl.

redirectUriDeprecatedstring (uri)

Alias of redirect_url, kept for existing callers

Responses

Success· the request worked

Errors· the request failed

Set TikTok brand identity

Set or update the Brand Identity (display name + avatar) for a `tiktokads` SocialAccount. TikTok requires every ad to carry an `identity_id + identity_type` pair. The Brand Identity is the CUSTOMIZED_USER alternative to attributing ads to a real @username (TT_USER). ### What this route does 1. Uploads the supplied image to TikTok. 2. Creates the identity via `/v2/identity/create/`. 3. Caches the resulting `identity_id` on the account, so subsequent `POST /v1/ads/create` calls can opt into it via `identityType: 'CUSTOMIZED_USER'`. ### Linked accounts Configurable on every `tiktokads` account, including linked-mode ones (those with a posting account on the same profile). Configuration is idempotent and harmless when posting is also connected. The default ad-create path still prefers TT_USER, and CUSTOMIZED_USER is only used per-ad when the caller explicitly opts in. ### Updating an identity TikTok identities are immutable post-creation. Re-saving creates a new identity on TikTok and swaps the cached id. The old identity stays orphaned on TikTok's side (harmless, no billing impact). Alternative: pass `brandIdentity` directly on `POST /v1/ads/create` to configure on first ad creation in a single round-trip.

Connect WhatsApp via credentials

Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. ### Getting the credentials 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number) ### Warning: webhook delivery moves to Zernio Connecting subscribes your own Meta app to this WABA with an override callback that redirects its webhook delivery to Zernio. This WABA's events stop reaching any callback URL you had configured before, immediately and with no overlap window. Do not unsubscribe your app from the WABA afterward: that also cuts off Zernio's delivery, and recovery requires calling this endpoint again.

POST/v1/connect/openai-ads/credentials
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.connect.connectOpenAIAdsCredentials({  body: {    apiKey: 'tok_abc123',    profileId: 'profile_abc123',  },});console.log(data);
{  "accountId": "6507a1b2c3d4e5f6a7b8c9d0",  "adAccountName": "Acme US"}
OpenAPI specification
Was this page helpful?