What sending this item’s alert right now would cost: eligible subscribers, credits (one per person), the chain’s balance and whether it covers the send. Nothing is sent or charged. schedule gives the window scheduled_at accepts and the lead of the low-balance warning.
An API key created by the chain owner in the panel (Integrações → Nova chave), sent as Authorization: Bearer <key>. The key (<id>|na_…) is shown once, at creation; rotate or revoke it on the same screen. It is a server secret: never ship it in browser or mobile code.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Need Alert","description":"Avise seus clientes no momento em que o que eles esperam fica disponível.","colors":{"primary":"#465FFF","light":"#7C8CFF","dark":"#3641CC"},"logo":{"light":"https://mintcdn.com/need-alert/9mmUrKHe_2MF526d/logo/light.svg?fit=max\u0026auto=format\u0026n=9mmUrKHe_2MF526d\u0026q=85\u0026s=373a6fb813b58847213edb4a69e07fc2","dark":"https://mintcdn.com/need-alert/9mmUrKHe_2MF526d/logo/dark.svg?fit=max\u0026auto=format\u0026n=9mmUrKHe_2MF526d\u0026q=85\u0026s=30c19faa6f0c69ad4ce03787eb0be7fd"},"favicon":"https://mintcdn.com/need-alert/9mmUrKHe_2MF526d/favicon.svg?fit=max\u0026auto=format\u0026n=9mmUrKHe_2MF526d\u0026q=85\u0026s=3232d54c500467b3b6694a4c942ed879","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","javascript","python","php"]}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"languages":[{"language":"pt-BR","default":true,"href":""},{"language":"en","href":"en"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"need-alert","hasAudioNarration":false,"actualSubdomain":"need-alert","customDomains":["docs.needalert.app"],"gitSource":{"type":"github","owner":"claudiusnascimento","repo":"docs-need-alert","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6ad760e76e89f16d0373b3c1","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"pt-BR","tag":"API","count":26},{"language":"en","tag":"API","count":26},{"language":"pt-BR","tag":"Guias","count":18},{"language":"pt-BR","tag":"Endpoints","count":18},{"language":"en","tag":"Guides","count":18},{"language":"en","tag":"Endpoints","count":18},{"language":"pt-BR","tag":"Para estabelecimentos","count":8},{"language":"pt-BR","tag":"Items","count":8},{"language":"en","tag":"For establishments","count":8},{"language":"en","tag":"Items","count":8},{"language":"pt-BR","tag":"Dispatches","count":6},{"language":"en","tag":"Dispatches","count":6},{"language":"pt-BR","tag":"Para quem espera","count":4},{"language":"en","tag":"For people waiting","count":4},{"language":"pt-BR","tag":"Introdução","count":3},{"language":"pt-BR","tag":"Começando","count":3},{"language":"en","tag":"Introduction","count":3},{"language":"en","tag":"Getting started","count":3},{"language":"pt-BR","tag":"Convenções","count":2},{"language":"en","tag":"Conventions","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api/reference/dispatches/preview-an-alert","slug":"/api/reference/dispatches/preview-an-alert","pageMetadata":{"title":"Preview an alert","description":"What sending this item's alert right now would cost: eligible subscribers, credits (one per person), the chain's balance and whether it covers the send. Nothing is sent or charged. `schedule` gives the window `scheduled_at` accepts and the lead of the low-balance warning.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}/items/{item}/dispatch-preview","href":"/api/reference/dispatches/preview-an-alert","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"What sending this item’s alert right now would cost: eligible subscribers, credits (one per person), the chain’s balance and whether it covers the send. Nothing is sent or charged. \", _jsx(_components.code, {\n children: \"schedule\"\n }), \" gives the window \", _jsx(_components.code, {\n children: \"scheduled_at\"\n }), \" accepts and the lead of the low-balance warning.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Preview an alert","description":"What sending this item's alert right now would cost: eligible subscribers, credits (one per person), the chain's balance and whether it covers the send. Nothing is sent or charged. `schedule` gives the window `scheduled_at` accepts and the lead of the low-balance warning.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}/items/{item}/dispatch-preview","href":"/api/reference/dispatches/preview-an-alert","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"v1.establishments.items.dispatch-preview","description":"What sending this item's alert right now would cost: eligible subscribers, credits (one per person), the chain's balance and whether it covers the send. Nothing is sent or charged. `schedule` gives the window `scheduled_at` accepts and the lead of the low-balance warning.","summary":"Preview an alert","tags":["Dispatches"],"parameters":["cea6f304-a967-44d1-a2af-9c1e7b51b363","9d0c4c75-f1fb-492e-a0f2-df865a429d60","2c65190b-6156-4cc5-ab5c-e38e45005803","1c5cc739-37cd-48be-9e65-180d3b96bbba"],"responses":{"200":"28d5b823-8696-4b3f-b07c-dffe9c146d2a","401":"c84eab4b-b8de-4329-a314-30aa75dfdf8e","403":"e65b1b01-efaf-40df-b4fa-808927ba6660","404":"514ef830-c79c-4f9d-9cc7-a77b2ddc61c6","429":"ddcbc7bf-339d-4a72-b600-57f88c89c225"},"method":"get","type":"path","servers":["4881b565-21c9-481f-ab04-2e9faf758340"],"security":["bba8f998-d38f-418f-a418-f9c23b32760a"],"path":"/establishments/{establishment}/items/{item}/dispatch-preview","baseUrlOptions":["https://needalert.app/api/v1"],"title":"Preview an alert","codeSamples":[],"requestExampleLanguages":["bash","javascript","python","php"],"requiredOnlyExamples":true,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"cea6f304-a967-44d1-a2af-9c1e7b51b363":{"name":"establishment","in":"path","required":true,"description":"The establishment ID","schema":{"type":"integer","isRequired":true,"description":"The establishment ID","uniqueKey":"","typeLabel":"integer"}},"9d0c4c75-f1fb-492e-a0f2-df865a429d60":{"name":"item","in":"path","required":true,"description":"The item ID","schema":{"type":"integer","isRequired":true,"description":"The item ID","uniqueKey":"","typeLabel":"integer"}},"2c65190b-6156-4cc5-ab5c-e38e45005803":{"name":"Accept-Language","in":"header","description":"Language of `message` and of translated content such as item names (`pt-BR` or `en`). Without it, the chain's default language.","schema":{"type":"string","enum":["pt-BR","en"],"description":"Language of `message` and of translated content such as item names (`pt-BR` or `en`). Without it, the chain's default language.","uniqueKey":"","typeLabel":"enum\u003cstring>"},"example":"pt-BR"},"1c5cc739-37cd-48be-9e65-180d3b96bbba":{"name":"X-Request-Id","in":"header","description":"Your own correlation id (1–64 characters of `A-Za-z0-9._-`), echoed back; generated when absent. Quote it to support.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{1,64}$","minLength":1,"maxLength":64,"description":"Your own correlation id (1–64 characters of `A-Za-z0-9._-`), echoed back; generated when absent. Quote it to support.","uniqueKey":"","typeLabel":"string"}}},"responses":{"28d5b823-8696-4b3f-b07c-dffe9c146d2a":{"description":"`DispatchPreview`","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"recipients_count":{"type":"integer","description":"Subscribers eligible right now.","isRequired":true,"uniqueKey":"data.recipients_count","typeLabel":"integer"},"credits_cost":{"type":"integer","description":"Credits the send would debit: one per recipient.","isRequired":true,"uniqueKey":"data.credits_cost","typeLabel":"integer"},"current_balance":{"type":"integer","isRequired":true,"uniqueKey":"data.current_balance","typeLabel":"integer"},"sufficient":{"type":"boolean","description":"Whether `current_balance` covers `credits_cost`.","isRequired":true,"uniqueKey":"data.sufficient","typeLabel":"boolean"},"schedule":{"type":"object","description":"The window `scheduled_at` accepts (minutes ahead at least, days ahead at most) and the lead, in minutes, of the low-balance warning.","properties":{"min_lead_minutes":{"type":"integer","isRequired":true,"uniqueKey":"data.schedule.min_lead_minutes","typeLabel":"integer"},"max_lead_days":{"type":"integer","isRequired":true,"uniqueKey":"data.schedule.max_lead_days","typeLabel":"integer"},"warning_lead_minutes":{"type":"integer","isRequired":true,"uniqueKey":"data.schedule.warning_lead_minutes","typeLabel":"integer"}},"required":["min_lead_minutes","max_lead_days","warning_lead_minutes"],"isRequired":true,"uniqueKey":"data.schedule","typeLabel":"object"}},"required":["recipients_count","credits_cost","current_balance","sufficient","schedule"],"title":"DispatchPreview","isRequired":true,"uniqueKey":"data","typeLabel":"DispatchPreview · object"}},"required":["data"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"data":{"recipients_count":123,"credits_cost":123,"current_balance":123,"sufficient":true,"schedule":{"min_lead_minutes":123,"max_lead_days":123,"warning_lead_minutes":123}}}}},"exampleType":"generated"}},"headers":{"Content-Language":{"description":"The language of the body, BCP 47 (`pt-BR`, `en`).","schema":{"type":"string"}},"X-Request-Id":{"description":"The request id, yours or the one generated here.","schema":{"type":"string"}}},"exampleType":"generated"},"c84eab4b-b8de-4329-a314-30aa75dfdf8e":{"description":"- `unauthenticated`: Missing, malformed, expired or revoked API key.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"The shape of every error response of the API.","required":["message","code"],"properties":{"message":{"type":"string","description":"Translated (see `Content-Language`), for display only. Never program against it.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"Stable `snake_case` identifier of the error. Program against it.","enum":["unauthenticated"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"errors":{"type":"object","description":"Only on some errors: the invalid fields of a `validation_failed`, or extra data of a business-rule refusal.","uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","code":"unauthenticated","errors":{}}}},"exampleType":"generated"}},"headers":{"Content-Language":{"description":"The language of the body, BCP 47 (`pt-BR`, `en`).","schema":{"type":"string"}},"X-Request-Id":{"description":"The request id, yours or the one generated here.","schema":{"type":"string"}}},"exampleType":"generated"},"e65b1b01-efaf-40df-b4fa-808927ba6660":{"description":"- `establishment_unavailable`: The unit is inactive or suspended.\n- `forbidden`: The key lacks the permission this operation needs in this unit (`view`, `create_items`, `edit_items`, `dispatch_events` or `manage_billing`).\n- `tenant_suspended`: The chain that owns the key is suspended.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"The shape of every error response of the API.","required":["message","code"],"properties":{"message":{"type":"string","description":"Translated (see `Content-Language`), for display only. Never program against it.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"Stable `snake_case` identifier of the error. Program against it.","enum":["establishment_unavailable","forbidden","tenant_suspended"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"errors":{"type":"object","description":"Only on some errors: the invalid fields of a `validation_failed`, or extra data of a business-rule refusal.","uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","code":"establishment_unavailable","errors":{}}}},"exampleType":"generated"}},"headers":{"Content-Language":{"description":"The language of the body, BCP 47 (`pt-BR`, `en`).","schema":{"type":"string"}},"X-Request-Id":{"description":"The request id, yours or the one generated here.","schema":{"type":"string"}}},"exampleType":"generated"},"514ef830-c79c-4f9d-9cc7-a77b2ddc61c6":{"description":"- `not_found`: No such resource, or it is outside the key's scope. The API never reveals whether a resource you cannot see exists.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"The shape of every error response of the API.","required":["message","code"],"properties":{"message":{"type":"string","description":"Translated (see `Content-Language`), for display only. Never program against it.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"Stable `snake_case` identifier of the error. Program against it.","enum":["not_found"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"errors":{"type":"object","description":"Only on some errors: the invalid fields of a `validation_failed`, or extra data of a business-rule refusal.","uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","code":"not_found","errors":{}}}},"exampleType":"generated"}},"headers":{"Content-Language":{"description":"The language of the body, BCP 47 (`pt-BR`, `en`).","schema":{"type":"string"}},"X-Request-Id":{"description":"The request id, yours or the one generated here.","schema":{"type":"string"}}},"exampleType":"generated"},"ddcbc7bf-339d-4a72-b600-57f88c89c225":{"description":"- `too_many_requests`: Over the key's budget of 300 requests per minute. Wait the seconds in `Retry-After`.","content":{"application/json":{"schema":{"type":"object","title":"ErrorEnvelope","description":"The shape of every error response of the API.","required":["message","code"],"properties":{"message":{"type":"string","description":"Translated (see `Content-Language`), for display only. Never program against it.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"code":{"type":"string","description":"Stable `snake_case` identifier of the error. Program against it.","enum":["too_many_requests"],"isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"errors":{"type":"object","description":"Only on some errors: the invalid fields of a `validation_failed`, or extra data of a business-rule refusal.","uniqueKey":"errors","typeLabel":"object"}},"uniqueKey":"","typeLabel":"ErrorEnvelope · object"},"examples":{"Example":{"title":"Example","value":{"message":"\u003cstring>","code":"too_many_requests","errors":{}}}},"exampleType":"generated"}},"headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}},"Content-Language":{"description":"The language of the body, BCP 47 (`pt-BR`, `en`).","schema":{"type":"string"}},"X-Request-Id":{"description":"The request id, yours or the one generated here.","schema":{"type":"string"}}},"exampleType":"generated"}},"security":{"bba8f998-d38f-418f-a418-f9c23b32760a":{"apiKey":{"type":"http","description":"An API key created by the chain owner in the panel (**Integrações** → **Nova chave**), sent as `Authorization: Bearer \u003ckey>`. The key (`\u003cid>|na_…`) is shown once, at creation; rotate or revoke it on the same screen. It is a server secret: never ship it in browser or mobile code.","scheme":"bearer","scopes":[],"schemeName":"apiKey"}}},"servers":{"4881b565-21c9-481f-ab04-2e9faf758340":{"url":"https://needalert.app/api/v1","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","description":"An API key created by the chain owner in the panel (**Integrações** → **Nova chave**), sent as `Authorization: Bearer \u003ckey>`. The key (`\u003cid>|na_…`) is shown once, at creation; rotate or revoke it on the same screen. It is a server secret: never ship it in browser or mobile code.","scheme":"bearer","scopes":[],"schemeName":"apiKey"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"An API key created by the chain owner in the panel (**Integrações** → **Nova chave**), sent as `Authorization: Bearer \u003ckey>`. The key (`\u003cid>|na_…`) is shown once, at creation; rotate or revoke it on the same screen. It is a server secret: never ship it in browser or mobile code.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"apiKey","name":"Authorization"}],"title":"apiKey"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"need-alert","siteName":"Need Alert","title":"Preview an alert - Need Alert","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"pt-BR":{"href":"/api/reference/dispatches/preview-an-alert","matchLevel":0},"en":{"href":"/en/api/reference/dispatches/preview-an-alert","matchLevel":1}}},"lastModified":"2026-10-19T04:16:33.233Z","originalFileLocation":"api/reference/dispatches/preview-an-alert.mdx","locale":"pt-BR"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"What sending this item\u0026#x27;s alert right now would cost: eligible subscribers, credits (one per person), the chain\u0026#x27;s balance and whether it covers the send. Nothing is sent or charged. schedule gives the window scheduled_at accepts and the lead of the low-balance warning.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Need Alert\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Preview an alert - Need Alert\">\u003cmeta data-mint-head property=\"og:description\" content=\"What sending this item\u0026#x27;s alert right now would cost: eligible subscribers, credits (one per person), the chain\u0026#x27;s balance and whether it covers the send. Nothing is sent or charged. schedule gives the window scheduled_at accepts and the lead of the low-balance warning.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Need Alert\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://need-alert.mintlify.site/_mintlify/api/og/v2?division=Dispatches\u0026amp;title=Preview+an+alert\u0026amp;description=What+sending+this+item%27s+alert+right+now+would+cost%3A+eligible+subscribers%2C+credits+%28one+per+person%29%2C+the+chain%27s+balance+and+whether+it+covers+the+send.+Nothing\u0026amp;theme=bdfac1a245537d76f0edd834\u0026amp;signature=d06696fac91ee8a141b55990d6ce3e2b16f5cfc6959cee059c14fb90cef7451e\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Preview an alert - Need Alert\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"What sending this item\u0026#x27;s alert right now would cost: eligible subscribers, credits (one per person), the chain\u0026#x27;s balance and whether it covers the send. Nothing is sent or charged. schedule gives the window scheduled_at accepts and the lead of the low-balance warning.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://need-alert.mintlify.site/_mintlify/api/og/v2?division=Dispatches\u0026amp;title=Preview+an+alert\u0026amp;description=What+sending+this+item%27s+alert+right+now+would+cost%3A+eligible+subscribers%2C+credits+%28one+per+person%29%2C+the+chain%27s+balance+and+whether+it+covers+the+send.+Nothing\u0026amp;theme=bdfac1a245537d76f0edd834\u0026amp;signature=d06696fac91ee8a141b55990d6ce3e2b16f5cfc6959cee059c14fb90cef7451e\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/need-alert/RuPQ-F31d7vVQjKt/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Need Alert\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#465FFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api/reference/dispatches/preview-an-alert.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt-BR\" href=\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.needalert.app/en/api/reference/dispatches/preview-an-alert\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.needalert.app/#organization\",\"name\":\"Need Alert\",\"url\":\"https://docs.needalert.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/need-alert/9mmUrKHe_2MF526d/logo/light.svg?fit=max\u0026auto=format\u0026n=9mmUrKHe_2MF526d\u0026q=85\u0026s=373a6fb813b58847213edb4a69e07fc2\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.needalert.app#website\",\"name\":\"Need Alert\",\"url\":\"https://docs.needalert.app\",\"publisher\":{\"@id\":\"https://docs.needalert.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert#webpage\",\"url\":\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert\",\"name\":\"Preview an alert\",\"description\":\"What sending this item's alert right now would cost: eligible subscribers, credits (one per person), the chain's balance and whether it covers the send. Nothing is sent or charged. schedule gives the window scheduled_at accepts and the lead of the low-balance warning.\",\"dateModified\":\"2026-10-19T04:16:33.233Z\",\"isPartOf\":{\"@id\":\"https://docs.needalert.app#website\"},\"breadcrumb\":{\"@id\":\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.needalert.app/api/reference/establishments/list-units\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Preview an alert\",\"item\":\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert#apireference\",\"headline\":\"Preview an alert\",\"name\":\"Preview an alert\",\"description\":\"What sending this item's alert right now would cost: eligible subscribers, credits (one per person), the chain's balance and whether it covers the send. Nothing is sent or charged. schedule gives the window scheduled_at accepts and the lead of the low-balance warning.\",\"url\":\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert\",\"mainEntityOfPage\":{\"@id\":\"https://docs.needalert.app/api/reference/dispatches/preview-an-alert#webpage\"},\"dateModified\":\"2026-10-19T04:16:33.233Z\",\"publisher\":{\"@id\":\"https://docs.needalert.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.needalert.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Need Alert\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Need Alert\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api/reference/dispatches/preview-an-alert.md","siteName":"Need Alert","nav":{"global":null,"languages":[{"language":"pt-BR","default":true,"tabs":[{"tab":"Guias","pages":[{"title":"Guias","href":""}]},{"tab":"API","groups":[{"group":"Introdução","pages":[{"title":"Visão geral da API","icon":"code","href":"/api/overview"},{"title":"Autenticação","icon":"key","href":"/api/authentication"},{"title":"Primeira requisição","icon":"rocket","href":"/api/first-request"}]},{"group":"Guias","pages":[{"title":"Idempotência","icon":"rotate","href":"/api/idempotency"},{"title":"Referência externa","icon":"barcode","href":"/api/external-reference"},{"title":"Casos de uso","icon":"diagram-project","href":"/api/use-cases"}]},{"group":"Convenções","pages":[{"title":"Convenções","icon":"book","href":"/api/conventions"},{"title":"Changelog","icon":"clock-rotate-left","href":"/api/changelog"}]},{"group":"Endpoints","pages":[{"group":"Establishments","pages":[{"title":"List units","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments","href":"/api/reference/establishments/list-units"},{"title":"Get a unit","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}","href":"/api/reference/establishments/get-a-unit"}]},{"group":"Items","pages":[{"title":"List items","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}/items","href":"/api/reference/items/list-items"},{"title":"Create an item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /establishments/{establishment}/items","href":"/api/reference/items/create-an-item"},{"title":"Get an item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}/items/{item}","href":"/api/reference/items/get-an-item"},{"title":"Archive an item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /establishments/{establishment}/items/{item}","href":"/api/reference/items/archive-an-item"},{"title":"Update an item","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /establishments/{establishment}/items/{item}","href":"/api/reference/items/update-an-item"},{"title":"Get the item's QR code","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}/items/{item}/qr-code","href":"/api/reference/items/get-the-items-qr-code"},{"title":"Upload the item's picture","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /establishments/{establishment}/items/{item}/image","href":"/api/reference/items/upload-the-items-picture"},{"title":"Remove the item's picture","description":"The response is the item with `image_url: null`.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /establishments/{establishment}/items/{item}/image","href":"/api/reference/items/remove-the-items-picture"}]},{"group":"Dispatches","pages":[{"title":"Preview an alert","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}/items/{item}/dispatch-preview","href":"/api/reference/dispatches/preview-an-alert"},{"title":"Send or schedule an alert","description":"Without `scheduled_at`, notifies every eligible subscriber of the item now, debiting one credit per person after checking the balance; the response is the dispatch in `pending` (or already `dispatched` when nobody is waiting), and `GET` it to follow the send. With `scheduled_at` (ISO 8601, inside the window the preview's `schedule` reports), the alert is stored as `scheduled` and sent by the system at that time, after the same balance check. Send an `Idempotency-Key`: a retry after a timeout must not alert everyone twice.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /establishments/{establishment}/items/{item}/events","href":"/api/reference/dispatches/send-or-schedule-an-alert"},{"title":"List dispatches","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}/events","href":"/api/reference/dispatches/list-dispatches"},{"title":"Get a dispatch","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /establishments/{establishment}/events/{event}","href":"/api/reference/dispatches/get-a-dispatch"},{"title":"Cancel a scheduled dispatch","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /establishments/{establishment}/events/{event}","href":"/api/reference/dispatches/cancel-a-scheduled-dispatch"},{"title":"Reschedule a dispatch","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /establishments/{establishment}/events/{event}","href":"/api/reference/dispatches/reschedule-a-dispatch"}]},{"group":"Credits","pages":[{"title":"Get the credit balance","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /tenants/{tenant}/credit-balance","href":"/api/reference/credits/get-the-credit-balance"},{"title":"List credit transactions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /tenants/{tenant}/credit-transactions","href":"/api/reference/credits/list-credit-transactions"}]}]}]}]},{"language":"en","pages":[{"title":"en","href":"/en/api/reference/dispatches/preview-an-alert"}]}]},"basePath":"","title":"Preview an alert - Need Alert","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","Page-C4GwDT3_.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}