Articles are the core of the API. You send a topic, and Unspar researches and writes the article in the background. Because this takes a few minutes, your code doesn’t wait for the result. It starts the article, checks the status every so often, and reads the text once it’s ready.
Every article belongs to a project. The project’s settings control most of what the article looks like, including its language and template. Every article you create through the API also shows up in Articles in the web app, so someone can review it before it goes out.
A typical integration makes these calls in this order:
POST /articles/estimate to check the price.
POST /articles to start the article.
GET /articles/{article}/status until it is finished.
GET /articles/{article} to read the text.
POST /articles/{article}/publish once a person is happy with it.
What does an article cost?
The price depends on the size of the article, which Unspar calls the article class. A standard article costs 1 credit.
| Class |
Credits |
Fact-check on top |
| Short text |
1 |
1 |
| Article |
1 |
1 |
| In-depth |
4 |
3 |
| Report |
15 |
6 |
To check the price before you start, send the same request body you plan to use for POST /articles to POST /articles/estimate. This doesn’t create an article or hold any credits.
curl -X POST https://app.unspar.com/api/v1/articles/estimate \
-H "Authorization: Bearer $UNSPAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"project":"<project-id>","brief":"How to fix a flat bike tyre"}'
These fields in the response matter most:
| Field |
What it tells you |
tier |
The class and its credits. tier.drivers shows what pushed the class up, like deep research. |
text_reservation |
What the text costs. |
media_reservation_cap |
The most the images can cost. Each image costs 1 credit. |
total_reservation |
What Unspar holds when the article starts: the text plus the image cap. |
credits.reason |
insufficient_credits when your balance can’t cover the total. Credits already held for other articles are subtracted first. |
available |
Whether Unspar can price the article at all. It doesn’t tell you whether you can pay for it. |
Because an estimate holds nothing, your balance can change before you start. Unspar checks again when the article is queued and returns 402 insufficient_credits if your balance is too low.
If tier.tier_key is project, the article is too large to start on your own and needs a quote from us. tier.reduction_hints lists what would bring it down, such as a shorter length or fewer sources.
Start an article
POST /articles needs two fields: project and brief. The brief is the topic, like “How to fix a flat bike tyre”. Leave writing instructions out of it. The project’s site context already says who the readers are, and the template sets the structure and style.
curl -X POST https://app.unspar.com/api/v1/articles \
-H "Authorization: Bearer $UNSPAR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: flat-tyre-1" \
-d '{
"project": "<project-id>",
"brief": "How to fix a flat bike tyre",
"fact_check": true
}'
Unspar responds with 202 and returns the article in data, with its ID in data.id. The article is now queued and will start as soon as there is room. Including an Idempotency-Key header makes it safe to retry the request if the connection drops; Conventions explains how it works.
The response can also include warnings, such as “This article has no research configured.” They won’t stop anything, but you should show them to the person who asked for the article.
These optional fields override settings for this article only:
| Field |
What it does |
template |
Another template than the project’s default. |
voice |
Another voice than the default. |
language |
Another language, as a tag like de-AT. |
title |
A title you set yourself, up to 255 characters. |
outlet |
Where the article goes when you publish it. |
additional_context |
Up to 5,000 characters of background for this article, on top of the site context. |
fact_check |
true adds the fact-check, false leaves it out. Without the field, the template decides. You pay for it only when the check completes. |
queue |
false saves the article as a draft without starting it. See below. |
Create an article explains the same settings in the web app.
Save a draft first
If you pass "queue": false, Unspar responds with 201 instead of 202 and saves the article as a draft. Drafts cost nothing.
While the article is a draft or failed, PATCH /articles/{article} can change three fields: title, brief, and additional_context. All other settings stay as you created them.
GET /articles/{article}/queue-readiness tells you whether the draft can start or what blocks it, without holding any credits. POST /articles/{article}/queue starts it.
Wait until the article is finished
GET /articles/{article}/status returns only the status fields, so use it for polling. Check every 10 to 30 seconds. A standard article takes a few minutes, while articles with deep research take longer.
curl https://app.unspar.com/api/v1/articles/<article-id>/status \
-H "Authorization: Bearer $UNSPAR_API_KEY"
Stop polling when the status is completed, failed, or cancelled. You can only publish a completed article.
| Status |
What it means |
draft |
Saved, not started. No credits are held. |
queued |
Waiting for its turn. Its credits are held. |
processing |
Unspar is writing. |
completed |
Finished. The credits are charged, and you can read the text. |
failed |
Stopped before it was finished. The text costs nothing. status_reason and failure say why. |
cancelled |
Someone stopped it. The credits held for the text come back. |
action_required |
Written, but the charge didn’t go through cleanly. Unspar settles this on its own with a check that runs every 10 minutes. Until then you can’t publish it. Don’t create the article again. |
status_reason adds detail. source_unavailable, for example, means Unspar couldn’t read a link you gave it, so a retry won’t help until you change that source. Publishing has its own field, publishing_status, and published_at is set once the article reaches its outlet.
Read the finished article
GET /articles/{article} returns the full article.
| Field |
What it has |
content |
The text as Markdown. |
media |
The images with their alt texts. |
fact_check |
The fact-check report, if the article had one. |
sources |
The links and files you attached as sources. The pages that the web research read are not in here. |
The article’s files are listed under GET /articles/{article}/artifacts. Each one has a kind, a content_url, and its size. The final Markdown has the kind final_markdown. You can download a file with GET /articles/{article}/artifacts/{artifact}/content.
Ask for changes
When a finished article is close to what you want, you don’t need to start over. A revision round sends feedback in plain words, and Unspar edits the existing text to match. It doesn’t research again, and it can’t add links or images. It tries to leave the rest alone, but other sentences can change too, so read the whole article again.
curl -X POST https://app.unspar.com/api/v1/articles/<article-id>/revisions \
-H "Authorization: Bearer $UNSPAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"feedback": "Shorten the introduction to two sentences."}'
A round usually takes about a minute. These rules apply:
| Rule |
Detail |
| Price |
The first successful round is free. Each later one costs 1 credit, charged only when it succeeds. |
| Limit |
Up to 10 rounds per article, one at a time. Failed rounds count toward the 10 but cost nothing. |
| Feedback |
3 to 4,000 characters. |
| When it works |
The article is completed and not yet published or approved for publishing. No publishing attempt is running. |
| Undo |
POST /articles/{article}/revisions/{revision}/restore brings the earlier text back right away, for free. |
GET /articles/{article}/revisions lists the rounds, and tells you whether a new round is possible right now and what it would cost. While a round runs, approving or publishing the article returns 409. The article page shows the same in the web app.
Make a short post from an article
POST /articles/{article}/derivatives writes one short text from a finished article, like a LinkedIn post. It uses only the finished text, with no new research, and normally costs 1 credit.
The format field takes one of these values:
format |
What you get |
newsletter_note |
A short note for a newsletter. |
linkedin_post |
A LinkedIn post. |
long_linkedin_post |
A longer LinkedIn post. |
x_post |
A post for X. |
The short post is saved as a new article, and Unspar doesn’t publish it anywhere on its own. Because the text has no links, the response gives you the source article’s published address in parent_published_url so you can add it yourself. The new article also points back to its source in derived_from_article.
What if something goes wrong?
These calls fix or stop an article:
| Request |
What happens |
POST /articles/{article}/retry |
A failed article continues from its last saved step. Finished steps aren’t paid for again. Unspar holds the price again and charges once, when it finishes. |
POST /articles/{article}/cancel |
A queued or running article stops. The credits held for the text come back. |
POST /articles/{article}/unqueue |
An article that was queued from an idea goes back to draft. |
DELETE /articles/{article} |
The article and its files are deleted in Unspar. A post already on your site stays there. |
Publish the article
Publishing sends the article out of Unspar to an outlet, such as your WordPress site. GET /outlets lists your outlets with their IDs, and Outlets shows how to connect one.
POST /articles/{article}/publish publishes to the article’s outlet, or to the outlet you send. Without scheduled_at, it goes out as soon as possible. With a timestamp, it waits until then.
curl -X POST https://app.unspar.com/api/v1/articles/<article-id>/publish \
-H "Authorization: Bearer $UNSPAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"outlet":"<outlet-id>","scheduled_at":"2026-12-01T08:00:00+00:00"}'
To save the outlet or the earliest publish time without publishing yet, use PATCH /articles/{article}/publishing-settings.
Your token needs a publishing permission. Check this before you publish, because a Full access token doesn’t have all of them:
| What you do |
Permission |
| Publish right away |
Publish execute |
| Publish at a later time |
Publish schedule |
Approve with POST /articles/{article}/approve |
Publish approval. A Full access token doesn’t have it. Choose Custom under Preset when you create the token and select it there. |
You only need to approve when the project has Require human review before auto-publish turned on. Scheduling and auto-publish explains that setting.
GET /articles/{article}/publishing-attempts lists every attempt with its result. Once the article is out, it also includes the address of the post on your site. Outlets and publishing explains what each kind of outlet receives.
Endpoint reference
Generated from the OpenAPI document. Paths are relative to https://app.unspar.com.
GET/api/v1/articles
List visible articles.
Operation listArticles. Permission: unspar:articles:read
| Parameter | In | Type | Description |
|---|
page | query | integer | Minimum 1. |
per_page | query | integer | Minimum 1. Maximum 100. |
q | query | string | |
project | query | string | |
status | query | "draft", "queued", "processing", "completed", "action_required", "failed", "cancelled" | |
created_from | query | string (date-time) | |
created_to | query | string (date-time) | |
updated_from | query | string (date-time) | |
updated_to | query | string (date-time) | |
sort | query | "created_at", "-created_at", "updated_at", "-updated_at" | |
200 Visible article list.
POST/api/v1/articles
Create an article from a brief and, by default, start generation.
Generation spends credits when queue is true (the default). The response is the article resource; poll GET /api/v1/articles/{article}/status until the status is completed, failed or cancelled, then fetch the final markdown through the artifacts endpoints. A valid template can still configure media that requires browser-only gate actions; article creation then returns validation details containing media_gate_actions_web_only, which must be resolved in the web app rather than by spend confirmation. Images: set each project's look once with its visual identity (show three options, pick one). New illustrations, or new photos if the look is a photo style, then follow it. Do not describe image styles or colors in briefs.
Operation createArticle. Permission: unspar:generation:write
| Parameter | In | Type | Description |
|---|
Idempotency-Key | header | string | Optional client key that makes a repeated POST replay the first response instead of running twice. Up to 255 characters. |
| Body field | Type | Description |
|---|
projectrequired | string | Project public id. |
briefrequired | string | The topic or headline of the article. Audience, structure and style come from the template and site context from the project; do not put writing instructions here. Images: set each project's look once with its visual identity (show three options, pick one). New illustrations, or new photos if the look is a photo style, then follow it. Do not describe image styles or colors in briefs. Up to 10000 characters. |
title | string | Up to 255 characters. |
language | string | Language code; defaults to the project language. |
template | string | Built-in (template:builtin:<key>) or team template public id. Omit it to use the project's default template, which is usually right. |
outlet | string | Outlet public id to publish to. |
scheduled_at | string (date-time) | |
queue | boolean | Start generation immediately (spends credits). Default true. |
client_reference | string | Up to 128 characters. |
additional_context | string | Up to 5000 characters. |
economy | boolean | Economy mode. Uses cheaper models and lighter research. The estimate and the charge are the same as for a normal article. Default false. |
voice | string | Writing voice for this article: voice:builtin:<key> or an active team voice id from GET /api/v1/voices. Validated like a project's default voice. Omit it to use the template or project default voice. Up to 64 characters. |
fact_check | boolean | Optional fact-check for this new article. It checks the finished text against the article's research and the web, fixes clear errors that a primary source shows, and lists claims to check yourself. It adds 1 credit (Short text, Article), 3 (In-depth) or 6 (Report), charged only when the check completes; otherwise only the article price is charged. true turns it on, false turns off a template's check, omit it to follow the template. Not available for refreshes or translations. |
201 Draft created without starting generation (queue was false).202 Article created and queued for generation.402 The team does not have enough credits for this operation.422 The request body failed validation; error.details lists the fields.
POST/api/v1/articles/estimate
Estimate article generation credit reservations.
Returns the credits a queued create would reserve without creating an article, reserving credits, or spending credits. The request body matches article create; queue, scheduled_at, and client_reference are accepted but do not affect the estimate. A valid template can still configure media that requires browser-only gate actions; estimates then return validation details containing media_gate_actions_web_only, which must be resolved in the web app rather than by spend confirmation.
Operation estimateArticle. Permission: unspar:generation:write
| Body field | Type | Description |
|---|
projectrequired | string | Project public id. |
briefrequired | string | The topic or headline of the article. Audience, structure and style come from the template and site context from the project; do not put writing instructions here. Images: set each project's look once with its visual identity (show three options, pick one). New illustrations, or new photos if the look is a photo style, then follow it. Do not describe image styles or colors in briefs. Up to 10000 characters. |
title | string | Up to 255 characters. |
language | string | Language code; defaults to the project language. |
template | string | Built-in (template:builtin:<key>) or team template public id. Omit it to use the project's default template, which is usually right. |
outlet | string | Outlet public id to publish to. |
scheduled_at | string (date-time) | |
queue | boolean | Start generation immediately (spends credits). Default true. |
client_reference | string | Up to 128 characters. |
additional_context | string | Up to 5000 characters. |
economy | boolean | Economy mode. Uses cheaper models and lighter research. The estimate and the charge are the same as for a normal article. Default false. |
voice | string | Writing voice for this article: voice:builtin:<key> or an active team voice id from GET /api/v1/voices. Validated like a project's default voice. Omit it to use the template or project default voice. Up to 64 characters. |
fact_check | boolean | Optional fact-check for this new article. It checks the finished text against the article's research and the web, fixes clear errors that a primary source shows, and lists claims to check yourself. It adds 1 credit (Short text, Article), 3 (In-depth) or 6 (Report), charged only when the check completes; otherwise only the article price is charged. true turns it on, false turns off a template's check, omit it to follow the template. Not available for refreshes or translations. |
200 Article generation credit estimate.422 The request body failed validation; error.details lists the fields.
GET/api/v1/articles/{article}
Show one visible article.
Operation getArticle. Permission: unspar:articles:read
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
PATCH/api/v1/articles/{article}
Update a draft or failed article's editable starting fields.
Operation updateArticle. Permission: unspar:articles:manage
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
| Body field | Type | Description |
|---|
title | string | Up to 255 characters. |
brief | string | The topic or headline of the article. Audience, structure and style come from the template and site context from the project; do not put writing instructions here. Images: set each project's look once with its visual identity (show three options, pick one). New illustrations, or new photos if the look is a photo style, then follow it. Do not describe image styles or colors in briefs. Up to 10000 characters. |
additional_context | string | Up to 5000 characters. |
200 Visible article.409 The request conflicts with current resource state or required confirmation.422 The request body failed validation; error.details lists the fields.
DELETE/api/v1/articles/{article}
Delete an article and its generated artifacts.
Operation deleteArticle. Permission: unspar:articles:manage
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
204 Article deleted.409 The request conflicts with current resource state or required confirmation.
GET/api/v1/articles/{article}/queue-readiness
Inspect queue readiness without starting generation.
Requires the same generation capability and project scope as queueArticle. Reuses the cached provider-agnostic inspection without modifying the article, reserving credits, writing artifacts or probing providers. A ready result is advisory; queueArticle rechecks admission. Not-ready results also return 200. Shares the article-queue-readiness per-team throttle with the legacy endpoint (60 requests per minute by default). The inspection cache defaults to 30 seconds.
Operation getArticleQueueReadiness. Permission: unspar:generation:write
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
200 Cached readiness, including blocked or not-queueable states.401 Missing or invalid team bearer key.403 Key lacks generation capability or team API access.404 Article not found in the key's team and project scope.429 Per-team readiness throttle or a general API rate limit exceeded.
POST/api/v1/articles/{article}/derivatives
Create and queue a short post from a completed article.
One child per request, using a frozen copy of the finished text as its only source. Uses project language and voice, Humanizer and Simplifier. No research, web fact-check, internal links or media. Normal text pricing, normally 1 credit. The body has no links; parent_published_url is returned beside it. No automatic publishing destination is inherited.
Operation deriveArticle. Permission: unspar:generation:write
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
Idempotency-Key | header | string | Optional client key that makes a repeated POST replay the first response instead of running twice. Up to 255 characters. |
| Body field | Type | Description |
|---|
formatrequired | "linkedin_post", "long_linkedin_post", "x_post", "newsletter_note" | |
202 Visible article.402 The team does not have enough credits for this operation.404 Article not found in the authorized team and project scope.422 The request body failed validation; error.details lists the fields.
POST/api/v1/articles/{article}/queue
Start generation for a draft article.
Operation queueArticle. Permission: unspar:generation:write
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
Idempotency-Key | header | string | Optional client key that makes a repeated POST replay the first response instead of running twice. Up to 255 characters. |
202 Visible article.402 The team does not have enough credits for this operation.409 The request conflicts with current resource state or required confirmation.
POST/api/v1/articles/{article}/unqueue
Move an idea-created queued article back to draft.
Operation unqueueArticle. Permission: unspar:generation:cancel
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
Idempotency-Key | header | string | Optional client key that makes a repeated POST replay the first response instead of running twice. Up to 255 characters. |
200 Unqueued idea article.409 The request conflicts with current resource state or required confirmation.
POST/api/v1/articles/{article}/cancel
Cancel a queued or running generation.
Operation cancelArticle. Permission: unspar:generation:cancel
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
200 Visible article.409 The request conflicts with current resource state or required confirmation.
POST/api/v1/articles/{article}/retry
Retry a failed generation.
Operation retryArticle. Permission: unspar:generation:retry
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
202 Visible article.409 The request conflicts with current resource state or required confirmation.
POST/api/v1/articles/{article}/completed-repair
Regenerate a rejected completed article on the same public ID.
Requires article management authority and a review-only project with automation,
automatic publishing and default outlet disabled. The article must be completed,
unapproved, unpublished, unscheduled, without an outlet, replacement or media.
Reuses normal validation, tier billing, credit reservation and queue admission.
Captures the exact original body and artifacts in private custody before resetting.
No publication is started. Supply the exact current title and content SHA-256.
This is a full regeneration, so include the original brief plus the correction and
a complete media-disabled configuration. It is not an append operation.
Supply a durable idempotency key in the header or body. If both are supplied they
must match. Keys are 16-128 characters from A-Z, a-z, 0-9, dot, underscore, colon
and hyphen. The repair ledger owns replay without the generic HTTP replay cache.
Identical retries return the same attempt and credit hold; request drift or a
second key for the same source conflicts. Replay returns current repair state.
The CLI supports this through unspar api post /articles/<id>/completed-repair
--body-file repair.json --idempotency-key <stable-key> --json.
Operation repairCompletedArticle. Permission: unspar:articles:manage
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
Idempotency-Key | header | string | Up to 128 characters. |
| Body field | Type | Description |
|---|
idempotency_key | string | Required when the header is absent. Up to 128 characters. |
expected_content_sha256required | string | |
title_or_topicrequired | string | Exact stored article title. Up to 255 characters. |
article_briefrequired | string | Up to 10000 characters. |
additional_contextrequired | string | Up to 5000 characters. |
keep_title_verbatimrequired | boolean | Must equal the saved article setting. |
language | string | |
configurationrequired | object | Complete article configuration. Media must be disabled. Uses the retained article configuration validator. |
200 Existing attempt replay, including completed or rolled-back state. Same envelope as 202; Idempotent-Replayed is true.202 Repair accepted; poll article status. A replay can still be awaiting dispatch or settlement.403 Missing article management capability.404 Article absent or outside the team or selected project scope.409 The request conflicts with current resource state or required confirmation.422 Validation failure, including insufficient credits at retained queue admission or mismatched body and header idempotency keys. No second credit hold is created on replay.503 Workflow auto-start or admission is unavailable.
POST/api/v1/articles/{article}/approve
Approve an article that waits for approval before publishing.
Operation approveArticle. Permission: unspar:publish:approve
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
200 Visible article.409 The request conflicts with current resource state or required confirmation.
POST/api/v1/articles/{article}/publish
Start a manual publish attempt for a completed article.
Without scheduled_at the article is published as soon as possible. Use the publishing-settings endpoint to save outlet or not-before settings without starting a manual publish.
Operation publishArticle. Permission: unspar:publish:schedule
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
Idempotency-Key | header | string | Optional client key that makes a repeated POST replay the first response instead of running twice. Up to 255 characters. |
| Body field | Type | Description |
|---|
outlet | string | Outlet public id; defaults to the article's outlet. |
scheduled_at | string (date-time) | Optional requested publish time; omit for as soon as possible. |
202 Visible article.409 The request conflicts with current resource state or required confirmation.422 The request body failed validation; error.details lists the fields.
PATCH/api/v1/articles/{article}/publishing-settings
Update a completed article's publishing outlet or not-before time.
Operation updateArticlePublishingSettings. Permission: unspar:publish:targets
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
| Body field | Type | Description |
|---|
outlet | string | Outlet public id, or null to clear the outlet. |
scheduled_at | string (date-time) | ISO-8601 time with an explicit offset, or null to clear the not-before time. |
200 Visible article.409 The request conflicts with current resource state or required confirmation.422 The request body failed validation; error.details lists the fields.
GET/api/v1/articles/{article}/status
Show public generation and publishing status for an article.
Operation getArticleStatus. Permission: unspar:articles:read
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
GET/api/v1/articles/{article}/publishing-attempts
List publish attempts for one visible article.
Operation listArticlePublishingAttempts. Permission: unspar:articles:read
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
200 Article publishing attempts.
GET/api/v1/articles/{article}/revisions
Revision state and history of one article.
Whether changes can be requested now, what the next round costs, and every round so far, newest first (up to 100). Poll it, or GET the round, after requesting changes.
Operation getArticleRevisions. Permission: unspar:articles:read
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
200 Article revision state.404 The resource does not exist or belongs to another team (resource_not_found).
POST/api/v1/articles/{article}/revisions
Ask for changes to a finished article.
An editor applies the feedback to the existing text and keeps everything else word for word. It adds no new facts, links or images. Only completed articles that are not approved, scheduled, publishing or published. One round at a time, at most max_rounds per article (failed rounds count). The first free_rounds rounds per article are free; later rounds hold price_credits (normally 1) and charge them only when the round succeeds. A round runs in the background, usually for about a minute; poll the returned round. While it runs, approve, publish and scheduling return 409 conflict with details.reason revision_active.
Operation requestArticleRevision. Permission: unspar:generation:write
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
Idempotency-Key | header | string | Optional client key that makes a repeated POST replay the first response instead of running twice. Up to 255 characters. |
| Body field | Type | Description |
|---|
feedbackrequired | string | What to change, written like a note to an editor. Up to 4000 characters. |
202 One article revision round.402 The team does not have enough credits for this operation.404 The resource does not exist or belongs to another team (resource_not_found).409 No round can start now (error.code conflict; error.details.reason is one of disabled, not_finished, published, publishing, approved, repair, not_allowed, active, max_rounds or price_changed), or the Idempotency-Key was reused with a different body (error.code idempotency_conflict).422 The request body failed validation; error.details lists the fields.
GET/api/v1/articles/{article}/revisions/{revision}
One revision round, with the text before and after it.
Operation getArticleRevision. Permission: unspar:articles:read
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
revisionrequired | path | string | |
200 One article revision round.404 The resource does not exist or belongs to another team (resource_not_found).
POST/api/v1/articles/{article}/revisions/{revision}/restore
Bring back the text from before a completed round.
Free and instant. The restore is itself a new round of kind restore, so it can be undone the same way. Allowed while can_restore is true, also after the last allowed round.
Operation restoreArticleRevision. Permission: unspar:generation:write
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
revisionrequired | path | string | |
Idempotency-Key | header | string | Optional client key that makes a repeated POST replay the first response instead of running twice. Up to 255 characters. |
200 One article revision round.404 The resource does not exist or belongs to another team (resource_not_found).409 The version cannot come back now (error.code conflict; error.details.reason is one of the request reasons except max_rounds, or not_restorable or same_version), or the Idempotency-Key was reused (error.code idempotency_conflict).
GET/api/v1/articles/{article}/artifacts
List public downloadable artifacts for an article.
Operation listArticleArtifacts. Permission: unspar:artifacts:read
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
page | query | integer | Minimum 1. |
per_page | query | integer | Minimum 1. Maximum 100. |
kind | query | "final_markdown" | |
created_from | query | string (date-time) | |
created_to | query | string (date-time) | |
sort | query | "kind", "created_at", "-created_at" | |
200 Article artifact list.
GET/api/v1/articles/{article}/artifacts/{artifact}/content
Download public artifact content.
Operation getArticleArtifactContent. Permission: unspar:artifacts:read
| Parameter | In | Type | Description |
|---|
articlerequired | path | string | |
artifactrequired | path | string | |