import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.blogPosts.get({
idOrSlug: "<value>",
});
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>"
}Returns a specific blog post by ID or slug
import { Crevio } from "@crevio/sdk";
const crevio = new Crevio({
apiKey: process.env["CREVIO_API_KEY"] ?? "",
});
async function run() {
const result = await crevio.blogPosts.get({
idOrSlug: "<value>",
});
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>"
}API key in the format: Bearer {api_token}
The resource prefix ID (e.g., "prod_abc123") or slug (e.g., "my-product")
Blog post details
draft, published, scheduled, archived Was this page helpful?