OverviewProductsPlatformsAPI ReferenceResources
Support Assistant

Ask a support question

POSThttps://zernio.com/api/v1/support/runs

Asks the Zernio Support Assistant a question about your workspace. Each question starts a run that answers asynchronously.

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

messagestring, max 10000Required

The question. Leading and trailing whitespace is trimmed.

Optional parameters3 fields
threadIdstring

Continue this thread. The thread must have a run started by your team, and no run in progress.

contextobject

Ids the assistant should look at. postId, accountId and profileId must belong to your workspace (404 otherwise).

maxCostUsdnumberDefault 3

Cost cap for this run, in USD. The run stops at the cap and bills at most this amount.

Headers

Optional
Idempotency-Keystring, max 255

Optional client-generated unique key (e.g. a UUID) that makes retries safe.

  • Same key + same body: replays the original response.
  • Same key + different body: 422.
  • Key still processing: 409.

A request cut off mid-handler (e.g. by a function timeout) can leave its key in progress, answering 409 until the key expires after 24 hours.

On the Ads create, boost and duplicate endpoints, a same-body retry runs again once the cut-off request started more than 15 minutes ago.

Responses

Success· the request worked

Errors· the request failed

How it behaves

How a run works

  1. This returns 202 with a runId.
  2. The answer arrives through the support.run.completed and support.run.failed webhooks. GET /v1/support/runs/{runId} is the fallback.
  3. When the assistant finds a problem on Zernio's side, it opens a support ticket with the team (see supportTicket on the run) and the run ends as needs_human.

Pass threadId to continue an earlier conversation, and context to point the assistant at a post, account, profile or a failed request (its X-Request-Id).

Pricing

You pay per question, once it finishes. The exact amount charged is the run's costUsd.

QuestionYou pay
Typical question$0.10 to $0.50
Most one question can costIts maxCostUsd: $0.50 to $3, $3 by default
Handed to the Zernio team (needs_human)Charged like an answered question
Failed or expired$0
All questions in a UTC monthAt most $100 per account

Near its maxCostUsd a run stops investigating and answers with what it found so far, so it never charges more than the cap. With nothing to answer yet, it fails and costs nothing. Charges appear as "Support API" on your invoice.

Requirements and limits

  • Requires an unrestricted API key, usage-based billing and a card on file.
  • Limits per account: 3 active runs and $100 of runs per UTC month.
  • Send an Idempotency-Key header to make retries safe.
POST/v1/support/runs
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.supportassistant.askSupportQuestion({  body: {    message: 'Hello, world!',  },});console.log(data);
{  "runId": "64f0a1b2c3d4e5f6a7b8c9d1",  "threadId": "64f0a1b2c3d4e5f6a7b8c9d2",  "status": "queued",  "pollAfterSeconds": 5}
OpenAPI specification
Was this page helpful?