Skip to main content
POST
/
blog_posts
Typescript (SDK)
import { Crevio } from "@crevio/sdk";

const crevio = new Crevio({
  apiKey: process.env["CREVIO_API_KEY"] ?? "",
});

async function run() {
  const result = await crevio.blogPosts.create({});

  console.log(result);
}

run();
{
  "id": "<string>",
  "object": "<string>",
  "title": "<string>",
  "slug": "<string>",
  "content": "<string>",
  "status": "draft",
  "excerpt": "<string>",
  "published_at": "2023-11-07T05:31:56Z",
  "scheduled_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "url": "<string>",
  "category": "<string>"
}

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

Body

application/json
title
string
content
string
status
enum<string>
Available options:
draft,
published,
scheduled,
archived
slug
string
excerpt
string
blog_category_id
integer | null
published_at
string<date-time> | null
scheduled_at
string<date-time> | null
seo_attributes
object

Response

Blog post created

id
string
required
object
string
required
title
string
required
slug
string
required
content
string
required
status
enum<string>
required
Available options:
draft,
published,
scheduled,
archived
excerpt
string
required
published_at
string<date-time> | null
required
scheduled_at
string<date-time> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
url
string
required
category
string | null
required