cURL
curl -X POST https://api.neuraldraft.io/v1/blog-posts/142/publish \
-H "Authorization: Bearer ndsk_live_yourkey"
await nd.blogPosts.publish(142);
requests.post("https://api.neuraldraft.io/v1/blog-posts/142/publish",
headers={"Authorization": f"Bearer {key}"})
<?php
$client->post('blog-posts/142/publish', ['headers' => ['Authorization' => 'Bearer '.$key]]);
{
"id": 142,
"slug": "5-minute-breathwork-for-anxious-mornings",
"status": "published",
"title": "<string>",
"featured_image": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"scheduled_at": "2023-11-07T05:31:56Z",
"excerpt": "<string>",
"content": "<string>",
"meta_title": "<string>",
"meta_description": "<string>",
"category": {
"id": 7,
"name": "Wellness",
"slug": "wellness"
},
"tags": [
{
"id": 21,
"name": "breathwork",
"slug": "breathwork"
}
],
"translations": [
{
"lang": "en",
"title": "<string>",
"content": "<string>",
"excerpt": "<string>",
"meta_title": "<string>",
"meta_description": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/conflict",
"title": "Conflict",
"status": 409,
"detail": "A resource with this slug already exists.",
"code": "conflict",
"instance": "req_2Nh4PqRsTuVw"
}Blog
Publish a blog post
Sets status: published and published_at: now(). Fires
blog_post.published webhook. No credit cost.
POST
/
blog-posts
/
{id}
/
publish
cURL
curl -X POST https://api.neuraldraft.io/v1/blog-posts/142/publish \
-H "Authorization: Bearer ndsk_live_yourkey"
await nd.blogPosts.publish(142);
requests.post("https://api.neuraldraft.io/v1/blog-posts/142/publish",
headers={"Authorization": f"Bearer {key}"})
<?php
$client->post('blog-posts/142/publish', ['headers' => ['Authorization' => 'Bearer '.$key]]);
{
"id": 142,
"slug": "5-minute-breathwork-for-anxious-mornings",
"status": "published",
"title": "<string>",
"featured_image": "<string>",
"published_at": "2023-11-07T05:31:56Z",
"scheduled_at": "2023-11-07T05:31:56Z",
"excerpt": "<string>",
"content": "<string>",
"meta_title": "<string>",
"meta_description": "<string>",
"category": {
"id": 7,
"name": "Wellness",
"slug": "wellness"
},
"tags": [
{
"id": 21,
"name": "breathwork",
"slug": "breathwork"
}
],
"translations": [
{
"lang": "en",
"title": "<string>",
"content": "<string>",
"excerpt": "<string>",
"meta_title": "<string>",
"meta_description": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "https://api.neuraldraft.io/errors/unauthorized",
"title": "Unauthorized",
"status": 401,
"detail": "API key missing or invalid.",
"code": "unauthorized",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "No such resource.",
"code": "not_found",
"instance": "req_2Nh4PqRsTuVw"
}{
"type": "https://api.neuraldraft.io/errors/conflict",
"title": "Conflict",
"status": 409,
"detail": "A resource with this slug already exists.",
"code": "conflict",
"instance": "req_2Nh4PqRsTuVw"
}Authorizations
Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage
keys via /projects/me/api-keys. Test-mode keys use
the ndsk_test_ prefix.
Path Parameters
Example:
142
Response
Published.
Example:
142
Example:
"5-minute-breathwork-for-anxious-mornings"
Available options:
draft, published, scheduled, archived Example:
"published"
HTML for the requested language. Returned by GET /blog-posts/{id_or_slug} only.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes