Get a support answer
Returns a run started by your team, with Ana's answer once it is ready. Prefer the support.run.completed and support.run.failed webhooks; use this as the fallback, waiting pollAfterSeconds between polls. costUsd is the amount billed for the question, never above maxCostUsd, and 0 for a failed run (rates on Ask a support question).
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.supportassistant.getSupportAnswer({ path: { runId: 'run_abc123', },});console.log(data);{ "runId": "string", "threadId": "string", "status": "queued", "stopReason": "answered", "answer": "string", "usage": { "inputTokens": 0, "outputTokens": 0, "cacheReadTokens": 0, "cacheWriteTokens": 0 }, "costUsd": 0, "maxCostUsd": 0, "createdAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "supportTicket": { "openedAt": "2019-08-24T14:15:22Z" }, "pollAfterSeconds": 0}Ask a support question
Asks Ana, the Zernio support agent, a question about your workspace. Each question starts a run that answers asynchronously: this returns 202 with a `runId`, and the answer arrives through the `support.run.completed` and `support.run.failed` webhooks. `GET /v1/support/runs/{runId}` is the fallback. Pass `threadId` to continue an earlier conversation, and `context` to point Ana at a post, account or profile. When Ana finds a problem on Zernio's side she opens a support ticket with the team (see `supportTicket` on the run) and the run ends as `needs_human`. **Pricing.** Each question is billed once, when its run finishes, for the tokens Ana used: - Input: $6 per million tokens - Output: $30 per million tokens - Cache reads: $0.60 per million tokens - Cache writes: $7.50 per million tokens Most questions cost between $0.10 and $0.50. A run never bills more than its `maxCostUsd` ($0.50 to $3, $3 by default): near the cap Ana stops investigating and answers with what she found. Runs that end as `needs_human` are billed like any other; failed runs are free. The run's `usage` holds the token counts and `costUsd` the amount billed. Charges appear as "Support API" on your invoice. 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.
Get persistent menu
Get the persistent menu configuration for a Facebook Messenger or Instagram account. Instagram accounts connected through Facebook Login are read through their linked Page (Meta's `platform=instagram`), Instagram Login accounts through the Instagram API.