OverviewProductsPlatformsAPI ReferenceResources

Subscribe or opt out an iMessage contact

POSThttps://zernio.com/api/v1/imessage/audience/subscription

Opted-out contacts are refused at send time (409 recipient_opted_out) until re-subscribed. Their inbound messages still arrive. Scoped to your account: it does not change the contact's state with other businesses.

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

accountIdstringRequired
conversationIdstringRequired
subscribedbooleanRequired

Responses

Success· the request worked

Errors· the request failed

POST/v1/imessage/audience/subscription
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.imessage.setImessageSubscription({  body: {    accountId: 'account_abc123',    conversationId: 'conversation_abc123',    subscribed: false,  },});console.log(data);
{  "success": true,  "conversationId": "string",  "subscribed": true}
OpenAPI specification
Was this page helpful?