Skip to content

GET /v1/post-types

List the post types configured on the site that owns the API key, along with their field schemas. Use this endpoint to discover what post_type slugs are valid before calling POST /v1/posts.

  • URL: https://api.canverly.com/v1/post-types
  • Method: GET
  • Auth: Bearer API key
  • Required scope: post_types:read
  • Rate limit: 60 req/min per key

Request

Query parameters

ParamTypeDefaultDescription
include_archivedbooleanfalseInclude post types that were soft-deleted.
qstringCase-insensitive substring filter on slug or label.
limitinteger50Page size, max 200.
cursorstringOpaque pagination cursor from previous response’s next_cursor.

Example

Terminal window
curl https://api.canverly.com/v1/post-types?q=event \
-H "Authorization: Bearer ck_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 OK

{
"data": [
{
"id": "01HZX9KPTPOST_TYPE0000000001",
"slug": "post",
"label": "Post",
"description": "Default blog post type.",
"is_builtin": true,
"fields": [
{ "name": "title", "type": "string", "required": true, "max_length": 240 },
{ "name": "slug", "type": "slug", "required": false },
{ "name": "excerpt", "type": "string", "required": false, "max_length": 500 },
{ "name": "content_html", "type": "html", "required": true },
{ "name": "cover_image_url", "type": "url", "required": false },
{ "name": "tags", "type": "string[]", "required": false },
{ "name": "published_at", "type": "datetime", "required": false }
],
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z"
},
{
"id": "01HZX9KPTPOST_TYPE0000000002",
"slug": "event",
"label": "Event",
"description": "Calendar entries with start/end times.",
"is_builtin": false,
"fields": [
{ "name": "title", "type": "string", "required": true },
{ "name": "content_html", "type": "html", "required": true },
{ "name": "starts_at", "type": "datetime", "required": true },
{ "name": "ends_at", "type": "datetime", "required": true },
{ "name": "venue", "type": "string", "required": false }
],
"created_at": "2026-03-14T10:00:00Z",
"updated_at": "2026-04-02T09:30:00Z"
}
],
"next_cursor": null
}

Field schema types

typeMeaning
stringPlain UTF-8 text. May carry max_length.
slugURL-safe lowercase, hyphenated.
htmlSanitized HTML (Canverly strips <script>, event handlers).
urlAbsolute URL. cover_image_url requires HTTPS.
datetimeISO 8601 UTC.
string[]Array of strings.
int / floatNumeric. May carry min / max.
boolBoolean.
enumCarries options[].
relationReference to another post (target_post_type slug).

Use fields[] to validate the body of POST /v1/posts client-side — anything not listed as required: true may be omitted.

Pagination

Responses are cursor-paginated. When next_cursor is non-null, fetch the next page by passing ?cursor=<value>. When it is null, you have the last page.

Errors

Statustype slugWhen
401unauthenticatedMissing/invalid Authorization.
403insufficient-scopeKey lacks post_types:read.
429rate-limitedExceeded 60 req/min.