{"openapi":"3.0.0","info":{"title":"PRNow API","version":"1.0.0","description":"Public API documentation for submitting and tracking press releases via API Key."},"servers":[{"url":"https://prnow.io/api/v1","description":"PRNow API v1"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"Your PRNow API Key, passed as \"Authorization: Bearer <key>\""}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255,"example":"8f14e45f-ceea-467a-9f2b-1c2d3e4f5a6b"},"description":"Optional, recommended. A unique value you generate per order — a UUID is ideal — of 1-255 printable ASCII characters. If you never receive the response (timeout, dropped connection, 5xx), resend the SAME request with the SAME key: when the first attempt went through you get its original response back, with the header `Idempotent-Replayed: true`, and nothing is charged or created again. Keys are scoped to your account and to the endpoint, and are remembered for 24 hours. A request that is refused without taking anything (validation errors, insufficient credits) frees its key, so you can correct it and retry with the same key. Retrying after a timeout or a 5xx is always safe: you get the original result, a fresh attempt when the first provably took nothing, or 409 `idempotency_request_interrupted` when its outcome cannot be confirmed automatically — you are never charged twice."}},"schemas":{"ExistingPressRelease":{"type":"object","nullable":true,"description":"The live release this submission collides with — for `same_plan_duplicate`, typically your own earlier attempt whose response you never received.","properties":{"pressReleaseId":{"type":"string"},"slugId":{"type":"string","nullable":true,"example":"G9E1HJK"},"status":{"type":"string","nullable":true,"example":"pending"},"plan":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time","nullable":true}}},"SubmitRequest":{"type":"object","required":["title","content","categories","plan","company","contactName","contactEmail","contactPhone","country","city","website"],"properties":{"title":{"type":"string","minLength":1,"maxLength":200,"description":"Headline of the press release. Min 5 words, max 200 characters."},"content":{"type":"string","description":"Full body content (Markdown or HTML). Limits: 250–1200 words, max 5 links, max 3 inline images, max 1 YouTube embed, max 1 Google Maps embed. Allowed formatting: **bold**, *italic*, [link](url), ![alt](imageUrl), bullet lists (- item), numbered lists (1. item — rendered as 1) on output), YouTube/Maps iframe embeds. No headings or raw script tags."},"summary":{"type":"string","maxLength":500,"description":"Brief 2–3 sentence summary. Max 45 words — longer values are automatically truncated (500-character backstop), matching the dashboard limit."},"categories":{"type":"array","items":{"type":"string"},"maxItems":5,"description":"List of 1–5 category values — see GET /categories for valid values. Duplicates are removed and entries beyond the first 5 are ignored."},"company":{"type":"string","description":"Issuing company name"},"address":{"type":"string","description":"Company street address (optional)"},"contactName":{"type":"string","description":"Media contact name"},"contactEmail":{"type":"string","format":"email","description":"Media contact email"},"contactPhone":{"type":"string","description":"Media contact phone"},"country":{"type":"string","description":"Country of origin — use the `name` value from GET /countries, or the ISO-2 code (e.g. \"United States\" or \"US\")"},"city":{"type":"string","description":"City of origin. Free-text; should match the country."},"website":{"type":"string","format":"url","description":"Company website URL starting with http:// or https://"},"metaTitle":{"type":"string","maxLength":60,"description":"SEO Meta Title (max 60 chars)."},"metaDescription":{"type":"string","maxLength":200,"description":"SEO Meta Description (max 200 chars)."},"metaKeywords":{"type":"string","maxLength":250,"description":"SEO Meta Keywords (comma separated, max 250 chars)."},"imageUrl":{"type":"string","description":"URL or base64 data URI for the featured image"},"imageAlt":{"type":"string","maxLength":125,"description":"SEO/accessibility alt text for the featured image. Max 125 chars."},"imageCaption":{"type":"string","maxLength":300,"description":"Optional caption shown beneath the featured image. Max 300 chars."},"plan":{"type":"string","description":"Package to order. Accepts ANY orderable plan key from GET /packages plans[] — base plans (free, basic, standard, advanced) AND premium outlets (e.g. advanced-v2), each orderable on its own. Charged at that package credit cost."},"addons":{"type":"array","items":{"type":"string"},"description":"DEPRECATED — order each package as its own `plan` instead. Still honored and charged for backward compatibility; a deprecation `warning` is returned in the response when used. See GET /packages."},"scheduledPublishDate":{"type":"string","format":"date-time","description":"Optional \"Schedule for later\". ISO 8601 date-time, strictly in the future and at most 365 days out. With an explicit UTC offset (e.g. 2026-08-01T14:30:00Z or 2026-08-01T16:30:00+02:00) it is taken as that exact instant. WITHOUT an offset (e.g. 2026-08-01T14:30:00 or 2026-08-01) it is interpreted as wall-clock time in scheduledTimezone (UTC when scheduledTimezone is omitted) — never in the server timezone. Omit to publish as soon as approved. This is the REQUESTED publish time our editorial team honors after approval — not an automated publish trigger. Submission still enters the review queue immediately. The response echoes the normalized UTC instant that was stored."},"scheduledTimezone":{"type":"string","description":"Optional IANA timezone name (e.g. America/New_York). Sets how an offset-less scheduledPublishDate is interpreted, and how the schedule is displayed in the dashboard. Ignored for interpretation when the date carries its own offset; the stored time is always UTC."},"allowDuplicateTitle":{"type":"boolean","description":"Set true to submit a title that already exists on one of your live releases under a DIFFERENT plan. A same-title, same-plan release is always refused (409 `same_plan_duplicate`)."},"dryRun":{"type":"boolean","default":false,"description":"Set true for a QUOTE: the request runs every check of a real submit and returns the price (see `SubmitQuote`), but nothing happens: no release is created, no credits or free outlet credits are used, no image is uploaded and no Idempotency-Key is used. Validation errors are the same as a real submit's; a quote that no wallet covers answers 200 with `enoughCredits: false` instead of 402. Any value other than true or false is refused with 400."}}},"SubmitQuote":{"type":"object","description":"The answer to POST /submit with `dryRun: true`.","properties":{"success":{"type":"boolean","example":true},"dryRun":{"type":"boolean","example":true},"data":{"type":"object","properties":{"valid":{"type":"boolean","example":true,"description":"Always true: an invalid order gets the same 400/409 error a real submit would."},"plan":{"type":"string","example":"standard","description":"The package key, as stored."},"credits":{"type":"number","example":58,"description":"The order's public price in credits, before any free outlet credit."},"chargedCredits":{"type":"number","example":29,"description":"The credits a real submit of this exact request would debit now: 0 when free outlet credits cover the order; the custom-plan price when your custom wallet would pay. When no wallet covers it, the amount that would be needed."},"wallet":{"type":"object","nullable":true,"description":"The wallet that would pay; null when nothing is charged or no single wallet covers the order.","properties":{"type":{"type":"string","enum":["default","custom","reseller"]},"tierId":{"type":"string","nullable":true},"tierName":{"type":"string","nullable":true}}},"freebiesApplied":{"type":"array","items":{"type":"string"},"example":["street-insider"],"description":"Package keys a free outlet credit would pay for."},"enoughCredits":{"type":"boolean","description":"Whether one wallet covers `chargedCredits` (credits are never combined across wallets)."},"balances":{"type":"object","properties":{"default":{"type":"number"},"custom":{"type":"number","nullable":true},"reseller":{"type":"array","items":{"type":"object","properties":{"tierId":{"type":"string"},"tierName":{"type":"string"},"balance":{"type":"number"}}}}}},"scheduledPublishDate":{"type":"string","format":"date-time","nullable":true},"scheduledTimezone":{"type":"string","nullable":true}}}}}}},"paths":{"/brand":{"get":{"summary":"Get Report Branding","description":"Returns the white-label branding (name, logo, color, font) applied to reports generated for this account.","tags":["Branding"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Current brand settings","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"brandName":{"type":"string","nullable":true,"example":"Acme PR"},"brandLogo":{"type":"string","nullable":true,"example":"https://acme.com/logo.png"},"brandColor":{"type":"string","nullable":true,"example":"#0f172a"},"brandFont":{"type":"string","nullable":true,"example":"Inter"}}}}}}}}}},"put":{"summary":"Update Report Branding","description":"Updates the white-label branding applied to reports generated for this account. Send any subset of fields; null clears a field. Built for white-label platforms syncing tenant branding.","tags":["Branding"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandName":{"type":"string","nullable":true,"maxLength":120,"example":"Acme PR"},"brandLogo":{"type":"string","nullable":true,"description":"http(s) image URL","example":"https://acme.com/logo.png"},"brandColor":{"type":"string","nullable":true,"description":"Hex color","example":"#0f172a"},"brandFont":{"type":"string","nullable":true,"description":"Letters, numbers, spaces, apostrophes, hyphens (2-60 chars)","example":"Inter"}}}}}},"responses":{"200":{"description":"Updated brand settings (same shape as GET)"},"400":{"description":"Validation error"},"401":{"description":"Invalid API key"}}}},"/countries":{"get":{"summary":"List Valid Countries","description":"Returns all accepted country names and ISO codes. Use the `name` value in the `country` field when submitting.","tags":["Reference"],"responses":{"200":{"description":"List of countries","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"countries":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"France"},"code":{"type":"string","example":"FR"}}}},"note":{"type":"string"}}}}}}}}}}},"/categories":{"get":{"summary":"List Valid Categories","description":"Returns all accepted category values for the `categories` field when submitting a press release.","tags":["Reference"],"responses":{"200":{"description":"List of categories","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"categories":{"type":"array","items":{"type":"string"},"example":["Technology","Finance","Healthcare & Medicine"]},"note":{"type":"string"}}}}}}}}}}},"/packages":{"get":{"summary":"Get Available Packages","description":"Returns all orderable packages. plans[] is canonical — base plans AND premium outlets, each orderable standalone via POST /submit plan. addons[] is DEPRECATED, retained only for backward compatibility (addonsDeprecated: true).\n\n**Optional authentication.** Without an `Authorization` header you get the public catalog. Send `Authorization: Bearer <key>` to get the packages YOUR account can order: the public ones plus any private plan made for your account, marked `private: true`. An invalid key returns 401.","tags":["Public"],"responses":{"200":{"description":"Successfully fetched packages","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object"},"description":"Orderable packages (base plans + premium outlets)."},"addons":{"type":"array","items":{"type":"object"},"description":"DEPRECATED — use plans[] instead."},"addonsDeprecated":{"type":"boolean"}}}}}}}}}}},"/draft":{"post":{"summary":"Save a Press Release as a Draft","description":"Create a press release in a DRAFT state (status \"draft\") WITHOUT charging credits, selecting a package, or entering the review/distribution queue. The draft appears in the account dashboard (My Releases) so a human can review it and then submit — or submit the same content later via POST /submit. Only `title` and `content` are required; all other fields are optional (a draft may be incomplete).","tags":["Press Release"],"security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","content"],"properties":{"title":{"type":"string","description":"Headline (required)."},"content":{"type":"string","description":"Full body content — Markdown or HTML (required). Sanitized server-side."},"summary":{"type":"string","description":"Optional short summary. Max 45 words — longer values are automatically truncated, matching the dashboard limit."},"categories":{"type":"array","items":{"type":"string"},"maxItems":5,"description":"Optional categories, max 5 (deduped; values validated on submit, not on draft)."},"company":{"type":"string"},"address":{"type":"string"},"contactName":{"type":"string"},"contactEmail":{"type":"string","format":"email"},"contactPhone":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"website":{"type":"string"},"metaTitle":{"type":"string"},"metaDescription":{"type":"string"},"metaKeywords":{"type":"string"},"imageUrl":{"type":"string","description":"http(s) URL or a base64 data: URI (uploaded server-side)."},"imageAlt":{"type":"string"},"imageCaption":{"type":"string"},"plan":{"type":"string","description":"Optional pre-selected package key (placeholder only — the real package is chosen and charged at submit)."},"scheduledPublishDate":{"type":"string","format":"date-time","description":"Optional requested publish time stored for when the draft is submitted. Same interpretation as POST /submit: an explicit UTC offset is honored; an offset-less date-time is wall-clock in scheduledTimezone (UTC when omitted)."},"scheduledTimezone":{"type":"string","description":"Optional IANA timezone: sets how an offset-less scheduledPublishDate is interpreted and how it is displayed."}}}}}},"responses":{"200":{"description":"Draft saved. Returns { success: true, data: { id, slugId, status: \"draft\", scheduledPublishDate, scheduledTimezone } } — scheduledPublishDate echoes the stored UTC instant (ISO 8601, null when not scheduled)."},"400":{"description":"Validation Error (missing title/content, content too long, an invalid schedule, a body that is not a JSON object, or a malformed Idempotency-Key — `code: invalid_idempotency_key`)."},"401":{"description":"Unauthorized (Invalid API Key)"},"409":{"description":"`code: idempotency_request_in_progress` — a request with this Idempotency-Key is still running; retry after `Retry-After` seconds to receive its result."},"422":{"description":"`code: idempotency_key_reused` — this Idempotency-Key was already used with a different request body. Use a new key for a new draft."}}}},"/submit":{"post":{"summary":"Submit a Press Release","description":"Submit an article for publication using your API credits. Optionally include `scheduledPublishDate` (+ `scheduledTimezone`) to request a later publish time (honored by editorial after approval — not an automated trigger). To stage a release for human review WITHOUT charging or distributing, use POST /draft instead.\n\n**Quote first with `dryRun: true`.** The same request with `\"dryRun\": true` checks everything a real submit checks and answers with the price instead of ordering (`SubmitQuote`): the wallet that would pay, `chargedCredits` (what would be debited) and the free outlet credits that would apply. Nothing is created, charged or uploaded, and no Idempotency-Key is used.","tags":["Press Release"],"security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequest"}}}},"responses":{"200":{"description":"Successfully submitted. `data` echoes `scheduledPublishDate` (the stored UTC instant, ISO 8601, null when not scheduled) and `scheduledTimezone`. When the deprecated `addons` field is used, the response also includes a `warning` string. If your account holds a free outlet credit for a package in the order, it is applied automatically: that package costs 0 credits, `data.creditsUsed` is the reduced amount actually debited, and `data.freebiesApplied` lists the package keys that were free (empty array otherwise). A rejected or retracted release returns the free credit to your account. A retry with the same Idempotency-Key returns this same body, with the header `Idempotent-Replayed: true`.\n\nWith `dryRun: true` the 200 body is a quote instead (schema `SubmitQuote`): `{ success: true, dryRun: true, data: { valid, plan, credits, chargedCredits, wallet, freebiesApplied, enoughCredits, balances, scheduledPublishDate, scheduledTimezone } }`."},"400":{"description":"Validation Error (missing fields, a `plan` that is not an orderable package — see GET /packages — a body that is not a JSON object, or a malformed Idempotency-Key, `code: invalid_idempotency_key`). Nothing was charged."},"401":{"description":"Unauthorized (Invalid API Key)"},"402":{"description":"Payment Required (Insufficient credits). Nothing was charged."},"409":{"description":"Conflict — `code` says which. Nothing was charged by this call.\n\n- `same_plan_duplicate`: you already have a live release (pending, in progress, published or distributed) with this title and the same plan. `existingPressRelease` identifies it — typically your own earlier attempt whose response you never received.\n- `different_plan_duplicate`: the title exists under a different plan; resend with `allowDuplicateTitle: true` to proceed. `existingPressRelease` identifies it.\n- `idempotency_request_in_progress`: a request with this Idempotency-Key is still running; retry after `Retry-After` seconds to receive its result.\n- `idempotency_request_interrupted`: an earlier request with this Idempotency-Key stopped partway through and its outcome could not be confirmed automatically. Nothing more will be charged for this key; contact support with it instead of retrying with a new one.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"string"},"code":{"type":"string","enum":["same_plan_duplicate","different_plan_duplicate","idempotency_request_in_progress","idempotency_request_interrupted"]},"existingPressRelease":{"$ref":"#/components/schemas/ExistingPressRelease"}}}}}},"422":{"description":"`code: idempotency_key_reused` — this Idempotency-Key was already used with a different request body. Use a new key for a new order."}}}},"/releases":{"get":{"summary":"List Your Press Releases","description":"Your account's press releases, newest first, including drafts. Use it to reconcile what actually landed — for example after a submit whose response you never received — or to sync your records. Paginate by passing `pagination.nextCursor` back as `cursor` until it is null.","tags":["Press Release"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"description":"Page size, 1-100."},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","pending","in_progress","published","distributed","rejected","refunded"]},"description":"Only releases currently in this status."},{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time"},"description":"Only releases created at or after this instant. ISO 8601; a value without a UTC offset (or a bare date) is read as UTC."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"The `pagination.nextCursor` from the previous page, unchanged."}],"responses":{"200":{"description":"A page of releases.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pressReleaseId":{"type":"string","description":"Same UUID, under the key POST /submit returns."},"slugId":{"type":"string","example":"G9E1HJK"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","pending","in_progress","published","distributed","rejected","refunded"]},"plan":{"type":"string","nullable":true},"creditsUsed":{"type":"number","example":49},"submittedVia":{"type":"string","nullable":true,"example":"api","description":"`api` for releases created through this API; other values for the dashboard."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"publishedAt":{"type":"string","format":"date-time","nullable":true},"scheduledPublishDate":{"type":"string","format":"date-time","nullable":true},"scheduledTimezone":{"type":"string","nullable":true}}}},"pagination":{"type":"object","properties":{"limit":{"type":"integer","example":20},"hasMore":{"type":"boolean"},"nextCursor":{"type":"string","nullable":true,"description":"Pass as `cursor` for the next page; null on the last page."}}}}}}}},"400":{"description":"Invalid `limit`, `status`, `since` or `cursor` — `error` says which."},"401":{"description":"Unauthorized (Invalid API Key)"}}}},"/status/{id}":{"get":{"summary":"Check Press Release Status","description":"Get the current status of a submitted press release, including `statusReason` (why it was rejected or refunded) and `packages` (per-outlet state).\n\n**`rejected` and `refunded` are NOT sequential** — they are two independent outcomes, not consecutive stages. A rejection returns the credits as part of the same operation, so a rejected release is not followed by a separate `refunded` status: do not poll waiting for one. A `refunded` status normally means the order was cancelled — usually by your own POST /retract/{id}.\n\n**Status alone is not a refund signal.** If only some outlets of an order are rejected, those credits are refunded and the order's status does NOT change — it stays whatever it already was (`pending`, `distributed`, …). The `packages` array is the only place that shows it.\n\n**Status alone is not a placement signal either.** On a multi-outlet order one outlet can go live days before the rest; the order stays `in_progress` and GET /links/{id} stays closed until every outlet is done. The `packages` array reports that outlet as `live` with its URL the moment the placement is recorded, and reports an outlet our team had to step in on as `held`. For the sequence of what happened, see GET /status/{id}/events.","tags":["Press Release"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The press release ID — accepts either the `pressReleaseId` (UUID) or the human-visible `slugId` (the 7-char code shown in your dashboard, e.g. \"G9E1HJK\") returned by POST /submit."}],"responses":{"200":{"description":"Resource status retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","description":"The UUID of the press release."},"pressReleaseId":{"type":"string","description":"Same UUID, under the key POST /submit returns."},"slugId":{"type":"string","example":"G9E1HJK"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","pending","in_progress","published","distributed","rejected","refunded"],"example":"pending","description":"`draft` saved but not submitted · `pending` awaiting review · `in_progress` editorial work started (can no longer be retracted) · `published` live · `distributed` sent to the outlets · `rejected` declined by our editorial team, credits returned in the same operation · `refunded` order cancelled and credits returned, usually via POST /retract/{id}. `rejected` and `refunded` are independent outcomes, not consecutive stages, and neither is permanently final."},"plan":{"type":"string"},"statusReason":{"type":"string","nullable":true,"example":"Headline reads as an advertisement.","description":"Why the release was rejected or refunded, written by our editorial team (or the note from your own retraction). Null for every other status, and null when no reason was recorded. Free text: may be multi-line and long, so escape it before rendering. Note this is null for a PARTIAL rejection — per-outlet reasons appear in `packages` instead."},"packages":{"type":"array","description":"Per-package (plan/outlet) state for the order. This is the ONLY way to see a partial rejection: refunding individual outlets returns credits without changing `status`. It is also the only way to see an outlet that went live BEFORE the order completed, or one our team had to step in on.\n\nEntries appear only for packages that have actually been actioned — a package with NO entry has not been refunded, has no placement yet and is not held, so treat \"absent\" as still pending. `distributed` entries appear once the release itself is distributed/published. Empty for orders with no per-package activity.\n\nStates: `refunded` credits returned for this outlet (`creditsRefunded`, `reason`) · `distributed` delivered, once the whole order is distributed/published · `live` the placement URL is already recorded while the order is still `pending`/`in_progress` (`liveUrl`) · `held` an outlet pipeline stopped and our team is handling it (`reason` says why, in customer terms). One entry per package: refunded wins over distributed, which wins over live, which wins over held.\n\n`creditsRefunded` is per package; it is not a total for the order, and it does not include a whole-order refund made via POST /retract/{id}.","items":{"type":"object","properties":{"package":{"type":"string","example":"advanced-v2","description":"Package key, matching the plan keys from GET /packages."},"state":{"type":"string","enum":["distributed","refunded","live","held"],"example":"refunded"},"creditsRefunded":{"type":"number","nullable":true,"example":50,"description":"Credits returned for this package; null unless refunded."},"reason":{"type":"string","nullable":true,"example":"Outlet declined the topic.","description":"The refund reason, or for `held` why our team stepped in. Null otherwise."},"at":{"type":"string","format":"date-time","nullable":true},"liveUrl":{"type":"string","format":"uri","nullable":true,"example":"https://www.usatoday.com/story/...","description":"The placement URL for `live` (and `distributed`, when recorded). Null otherwise."}}}},"createdAt":{"type":"string","format":"date-time"},"publishedAt":{"type":"string","format":"date-time","nullable":true},"updatedAt":{"type":"string","format":"date-time"}}}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}},"/status/{id}/events":{"get":{"summary":"Get Press Release Status Timeline","description":"The sequence of status changes and partial rejections on a press release, oldest first — the same history our team sees, worded for your customer. Use it when GET /status/{id} tells you WHERE the order is and you need to know HOW it got there: an outlet placement that went live, a partial rejection with per-outlet reasons, or a release bounced back to the review queue by an outlet pipeline.\n\nEach event names its `actor`: `editorial` (our team), `you` (your account, via the dashboard or this API) or `automation` (an outlet pipeline, named in `source`). Notes written by people pass through in `message`; automation steps are described in fixed wording. Capped at the 200 oldest events.","tags":["Press Release"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The press release ID — accepts either the `pressReleaseId` (UUID) or the human-visible `slugId` (the 7-char code shown in your dashboard, e.g. \"G9E1HJK\") returned by POST /submit."}],"responses":{"200":{"description":"Timeline retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","description":"The UUID of the press release."},"pressReleaseId":{"type":"string","description":"Same UUID, under the key POST /submit returns."},"slugId":{"type":"string","example":"G9E1HJK"},"status":{"type":"string","example":"in_progress","description":"The current status, as GET /status/{id} reports it."},"eventCount":{"type":"integer","example":3},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":4821},"type":{"type":"string","enum":["status_change","partial_reject"]},"fromStatus":{"type":"string","nullable":true,"example":"pending"},"toStatus":{"type":"string","nullable":true,"example":"in_progress","description":"Unchanged from `fromStatus` on a `partial_reject`."},"actor":{"type":"string","enum":["editorial","you","automation"]},"source":{"type":"string","nullable":true,"example":"USA Today","description":"The outlet pipeline that acted, when `actor` is `automation`."},"message":{"type":"string","nullable":true,"example":"USA Today placement confirmed — the order was distributed."},"packages":{"type":"array","nullable":true,"description":"Per-outlet detail of a `partial_reject`; null on every other event.","items":{"type":"object","properties":{"package":{"type":"string","example":"apnews"},"reason":{"type":"string","nullable":true}}}},"creditsRefunded":{"type":"number","nullable":true,"description":"Credits returned by a `partial_reject`, summed over its packages."},"liveUrl":{"type":"string","format":"uri","nullable":true,"description":"The placement URL, when an automation recorded one with this event."},"at":{"type":"string","format":"date-time","description":"UTC."}}}}}}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"}}}},"/report/{id}":{"get":{"summary":"Get Press Release Report","description":"Get distribution report URLs for a published press release. `reportUrl` is the PDF report: the order's own uploaded PDF when there is one, otherwise the PDF of the unified branded report built from every placement. `reportExcelUrl` is the placement workbook: the order's own uploaded workbook, otherwise the unified report's Excel, otherwise the first delivered package's generated Excel. `reportWebUrl` is the unified report's web view. Each is null until that file exists; use GET /links/{id} for the individual placement URLs.","tags":["Press Release"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The press release ID — accepts either the `pressReleaseId` (UUID) or the human-visible `slugId` (the 7-char code shown in your dashboard, e.g. \"G9E1HJK\") returned by POST /submit."}],"responses":{"200":{"description":"Report links retrieved"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found or Not Published Yet"}}}},"/links/{id}":{"get":{"summary":"Get Live Article Links","description":"Get the individual live article URLs (publication pickups) for a published press release. Returns an array of outlet name + URL pairs.","tags":["Press Release"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The press release ID — accepts either the `pressReleaseId` (UUID) or the human-visible `slugId` (the 7-char code shown in your dashboard, e.g. \"G9E1HJK\") returned by POST /submit."}],"responses":{"200":{"description":"Article links retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"id":{"type":"string","description":"The press release UUID (same value as pressReleaseId)."},"pressReleaseId":{"type":"string","description":"The press release UUID — same key name returned by POST /submit."},"slugId":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","example":"published"},"plan":{"type":"string"},"publishedAt":{"type":"string","format":"date-time","nullable":true},"linkCount":{"type":"integer","example":42},"links":{"type":"array","items":{"type":"object","properties":{"outlet":{"type":"string","example":"AP News"},"url":{"type":"string","format":"uri","example":"https://apnews.com/press-release/..."}}}}}}}}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not Found or Not Published Yet"}}}},"/retract/{id}":{"post":{"summary":"Retract a Pending Press Release","description":"Cancel a press release that is still awaiting review and get its credits back — the API equivalent of the \"Retract\" action in your dashboard. The credits are returned instantly to the wallet that paid for the release, and the release moves to status `refunded`, freeing it to be edited and resubmitted from your dashboard. Only releases in `pending` status can be retracted: once editorial work has started or the release is live, retraction is no longer possible and the endpoint returns 400. Retracting a release that already received a partial refund returns only the remaining balance. This request has no body.","tags":["Press Release"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The press release ID — accepts either the `pressReleaseId` (UUID) or the human-visible `slugId` (the 7-char code shown in your dashboard, e.g. \"G9E1HJK\") returned by POST /submit."}],"responses":{"200":{"description":"Retracted. Returns { success: true, data: { id, pressReleaseId, slugId, status: \"refunded\", creditsRefunded, message } }, where `creditsRefunded` is the amount credited back by this call."},"400":{"description":"The release is not pending, so it can no longer be retracted."},"401":{"description":"Unauthorized"},"404":{"description":"Not Found — no such press release on your account."},"409":{"description":"Already retracted, or its status changed while this request was in flight. No credits were refunded by this call."}}}},"/test":{"get":{"summary":"Test API Key","description":"Validate your API key and retrieve basic account info. Use this to confirm your key is working before making other requests.","tags":["Authentication"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"API key is valid","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true},"data":{"type":"object","properties":{"message":{"type":"string","example":"API key is valid"},"account":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"name":{"type":"string","nullable":true},"company":{"type":"string","nullable":true},"credits":{"type":"number","example":5}}}}}}}}}},"401":{"description":"Unauthorized — invalid or missing API key"}}}},"/tools":{"get":{"summary":"List Tools","description":"The tools you can run (AI writers, checkers, research, URL indexer), their inputs and price per run in credits. Public. The tools are for paying customers. Send your API key to also get `access.eligible` and, per tool, `free_runs: { per_day, left }`: the free runs your account has on it today.","tags":["AI Tools"],"responses":{"200":{"description":"{ success, data: { tools: [{ slug, name, description, price, inputs, requiredOneOf?, output, free_runs? }], access } }. `output` names the keys of the `result` that running the tool returns."},"401":{"description":"An Authorization header was sent but the key is invalid"}}}},"/tools/{tool}":{"post":{"summary":"Run a Tool","description":"Runs one tool. For paying customers. Each tool is free up to your account's daily limit; after that each run costs its price in credits, taken from your wallet. A run that fails is refunded. Limits per key: runs per minute and per 24 hours. Each run is capped at 85 seconds.","tags":["AI Tools"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"tool","in":"path","required":true,"schema":{"type":"string","enum":["press-release-writer","headline-generator","topic-generator","social-posts","guidelines-review","ai-rank","ai-visibility","domain-rating","website-traffic","index-checker","dofollow-checker","best-time-to-send","press-release-keywords","press-release-database","url-indexer","document-to-text"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The tool's inputs, as listed by GET /tools."}}}},"responses":{"200":{"description":"{ success, data: { result, charge: { credits, from_allowance, from_wallet, free_run, free_runs_left } } }. The shape of `result` differs per tool: GET /tools lists it as each tool's `output`."},"400":{"description":"Invalid input ({ error, field })"},"401":{"description":"Unauthorized"},"402":{"description":"Not enough credits: today's free runs are used up and the wallet does not cover the run"},"403":{"description":"The tools API is for paying customers"},"404":{"description":"Unknown tool"},"429":{"description":"Per-key limit reached (see the Retry-After header)"},"502":{"description":"The tool failed or took longer than 85 seconds; the run was refunded"}}}}}}