Authors
Create and manage public author profiles for post bylines.
Authors are public byline resources. Create an author before assigning its stable ID through a post's author_profile_ids field.
Choose a surface
The API, Node SDK, and CLI manage the same author records. Compare all Cli Blog tools.
| Action | HTTP API | Node SDK | CLI | Description |
|---|---|---|---|---|
| List | GET /v1/authors | blog.authors.list() or .paginate() | cli-blog authors list | Page through public byline profiles |
| Create | POST /v1/authors | blog.authors.create() | cli-blog authors create | Create a profile and receive its ID |
| Retrieve | GET /v1/authors/{id} | blog.authors.get() | cli-blog authors get | Get a profile by ID or slug |
| Update | POST /v1/authors/{id} | blog.authors.update() | cli-blog authors update | Change public profile fields |
| Delete | DELETE /v1/authors/{id} | blog.authors.delete() | cli-blog authors delete | Delete a profile by ID or slug |
Public and private keys can list and retrieve authors. Create, update, and delete actions require a private key with author permission.
Use the REST API
Call the resource from any technology that can send HTTP requests. Use a public key for allowed delivery reads and a private key for content changes.
GET or POST https://api.cli-blog.com/v1/authorsChoose an API keyUse the CLI
Use the CLI for local work, continuous integration, and JSON automation. Configure a narrowly scoped key before running content-changing commands.
cli-blog authors list --jsonRead the CLI guideUse the Node SDK
Use the Node SDK in Node.js 20+ servers, scripts, continuous integration, and trusted agent environments. Its methods map to the same resource actions.
await blog.authors.list({ limit: 20 })Read the Node SDK guideUse the agent skill
Give the agent the Cli Blog skill and a result-focused instruction. The skill helps it choose the API, CLI, or SDK and keeps publishing behind an approval gate.
List the existing authors. Create Maya Chen only if her slug does not exist, then return the author ID.Install the agent skillCreate an author
This request creates the byline used throughout the examples:
curl "https://api.cli-blog.com/v1/authors" \
--header "x-api-key: $CLI_BLOG_PRIVATE_API_KEY" \
--header "content-type: application/json" \
--data '{
"public_name": "Maya Chen",
"slug": "maya-chen",
"bio": "Engineering notes about product systems and release workflows.",
"website_url": "https://demo.cli-blog.example/authors/maya-chen"
}'The response returns a stable ID for post assignments:
{
"id": "author_8af12c",
"object": "author",
"organization_id": "org_demo_acme",
"public_name": "Maya Chen",
"slug": "maya-chen",
"bio": "Engineering notes about product systems and release workflows.",
"avatar_media_id": null,
"avatar_url": null,
"website_url": "https://demo.cli-blog.example/authors/maya-chen",
"metadata": {},
"created_at": "2026-07-11T17:00:00.000Z",
"updated_at": "2026-07-11T17:00:00.000Z"
}The SDK and CLI create the same resource:
import { CliBlog } from "@cli-blog/node";
const blog = new CliBlog({
apiKey: process.env.CLI_BLOG_PRIVATE_API_KEY!,
apiUrl: "https://api.cli-blog.com",
});
const author = await blog.authors.create({
public_name: "Maya Chen",
slug: "maya-chen",
bio: "Engineering notes about product systems and release workflows.",
});cli-blog authors create \
--public-name "Maya Chen" \
--slug maya-chen \
--bio "Engineering notes about product systems and release workflows." \
--jsonList and retrieve authors
Cursor pagination is the preferred list mode. Set limit up to 100, then pass next_cursor as after. Use numbered pagination only when a page interface requires exact totals. See Pagination.
const firstPage = await blog.authors.list({ limit: 20 });
const nextPage = firstPage.next_cursor
? await blog.authors.list({ limit: 20, after: firstPage.next_cursor })
: null;
const maya = await blog.authors.get("maya-chen");cli-blog authors list --limit 20 --json
cli-blog authors get maya-chen --jsonUpdate and delete an author
Update only the fields that changed. member_id can associate a byline with an organization member, but public responses never expose that editorial link.
await blog.authors.update("author_8af12c", {
bio: "Product engineering notes and practical release guides.",
avatar_media_id: "media_c81f20",
});
await blog.authors.delete("author_8af12c");cli-blog authors update author_8af12c \
--bio "Product engineering notes and practical release guides." \
--avatar-media-id media_c81f20 \
--json
cli-blog authors delete author_8af12c --yesReview post assignments before deleting a profile used by published content.
Author fields
| Field | Description |
|---|---|
id | Stable profile ID used in author_profile_ids |
public_name | Reader-facing byline name; required on create |
slug | Organization-unique author slug; derived from public_name when omitted |
bio | Public author biography |
avatar_media_id | Uploaded media ID used as the avatar |
avatar_url | Public avatar URL derived from the media asset |
website_url | Public author website URL |
member_id | Optional editorial link to an organization member; write-only for the public API |
metadata | Integration-defined JSON object, up to 32 KB when serialized |
created_at, updated_at | ISO timestamps returned by the API |
Common errors
| Status | Cause | Resolution |
|---|---|---|
400 | Missing name, invalid URL, invalid metadata, or mixed pagination modes | Check the error param and request body |
401 | Missing or invalid API key | Send x-api-key with the organization key |
403 | Public key used for a write or private key lacks author permission | Use a scoped private key |
404 | ID or slug does not exist in the organization | Confirm the organization and identifier |
409 | Slug already belongs to another author | Choose a unique author slug |
Complete API operations
The operation reference lists every path, request field, response field, validation rule, and error schema. Use Try it to open the request runner.
List authors
List author profiles that can be assigned to posts with author_profile_ids. Cursor pagination is the default; page and per_page opt into exact numbered pagination and cannot be combined with after or limit.
Authorization
ApiKeyAuth Organization API key. Each key selects exactly one organization; do not send an organization ID separately. Public keys use the cli_blog_pk_ prefix and are intended for published-content delivery reads. Private keys use the cli_blog_sk_ prefix, belong only in trusted environments, and are required for write, publish, delete, and editorial-state workflows when their scopes allow it.
In: header
Query Parameters
Opaque cursor returned by the previous list page.
Maximum authors to return. Defaults to 20. The maximum accepted value is 100.
One-based exact page number. Supplying page selects numbered pagination and cannot be combined with after or limit.
Items per numbered page. Requires page, defaults to 20, and cannot be combined with after or limit.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/authors"{ "object": "list", "has_more": true, "next_cursor": "string", "page": 0, "per_page": 0, "total_items": 0, "total_pages": 0, "data": [ { "id": "string", "object": "author", "organization_id": "string", "public_name": "string", "slug": "string", "bio": "string", "avatar_media_id": "string", "avatar_url": "string", "website_url": "string", "metadata": null, "created_at": "string", "updated_at": "string" } ]}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}Create an author
Send a JSON body to create a public byline profile, then assign its id to posts.
Authorization
ApiKeyAuth Organization API key. Each key selects exactly one organization; do not send an organization ID separately. Public keys use the cli_blog_pk_ prefix and are intended for published-content delivery reads. Private keys use the cli_blog_sk_ prefix, belong only in trusted environments, and are required for write, publish, delete, and editorial-state workflows when their scopes allow it.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/authors" \ -H "Content-Type: application/json" \ -d '{ "public_name": "string" }'{ "id": "string", "object": "author", "organization_id": "string", "public_name": "string", "slug": "string", "bio": "string", "avatar_media_id": "string", "avatar_url": "string", "website_url": "string", "metadata": null, "created_at": "string", "updated_at": "string"}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}Retrieve an author
Retrieve an author by author ID or author slug.
Authorization
ApiKeyAuth Organization API key. Each key selects exactly one organization; do not send an organization ID separately. Public keys use the cli_blog_pk_ prefix and are intended for published-content delivery reads. Private keys use the cli_blog_sk_ prefix, belong only in trusted environments, and are required for write, publish, delete, and editorial-state workflows when their scopes allow it.
In: header
Path Parameters
Author ID or author slug.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/authors/string"{ "id": "string", "object": "author", "organization_id": "string", "public_name": "string", "slug": "string", "bio": "string", "avatar_media_id": "string", "avatar_url": "string", "website_url": "string", "metadata": null, "created_at": "string", "updated_at": "string"}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}Update an author
Send a JSON body to update an author by author ID or author slug.
Authorization
ApiKeyAuth Organization API key. Each key selects exactly one organization; do not send an organization ID separately. Public keys use the cli_blog_pk_ prefix and are intended for published-content delivery reads. Private keys use the cli_blog_sk_ prefix, belong only in trusted environments, and are required for write, publish, delete, and editorial-state workflows when their scopes allow it.
In: header
Path Parameters
Author ID or author slug.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/authors/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "object": "author", "organization_id": "string", "public_name": "string", "slug": "string", "bio": "string", "avatar_media_id": "string", "avatar_url": "string", "website_url": "string", "metadata": null, "created_at": "string", "updated_at": "string"}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}Delete an author
Delete an author profile by author ID or author slug.
Authorization
ApiKeyAuth Organization API key. Each key selects exactly one organization; do not send an organization ID separately. Public keys use the cli_blog_pk_ prefix and are intended for published-content delivery reads. Private keys use the cli_blog_sk_ prefix, belong only in trusted environments, and are required for write, publish, delete, and editorial-state workflows when their scopes allow it.
In: header
Path Parameters
Author ID or author slug.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/v1/authors/string"{ "deleted": true, "id": "string"}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}