cURL
curl --request GET \
--url https://api.nohead.io/v1/collections/{collection_id}/schema \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
const result = await nohead.collections.schema("posts", { version: 2 })
from nohead import Nohead
nohead = Nohead()
result = nohead.collections.schema("posts", version=2)
require "nohead"
nohead = Nohead::Client.new
result = nohead.collections.schema("posts", version: 2)
{
"object": "schema",
"collection_id": "<string>",
"version": 123,
"definition": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"fields": [
{
"id": "<string>",
"name": "<string>",
"key": "<string>",
"type": "text",
"required": true,
"multiple": true,
"position": 123,
"configuration": {
"description": "<string>",
"searchable": true,
"filterable": true,
"sortable": true,
"min_length": 1,
"max_length": 1,
"format": "slug",
"unique": true
},
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"public_search": true
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}Schema changes
Get the schema at a version
Published-only API keys read only the current version; earlier ones are 403.
GET
/
v1
/
collections
/
{collection_id}
/
schema
cURL
curl --request GET \
--url https://api.nohead.io/v1/collections/{collection_id}/schema \
--header 'Authorization: Bearer <token>'import { Nohead } from "@nohead/sdk"
const nohead = new Nohead()
const result = await nohead.collections.schema("posts", { version: 2 })
from nohead import Nohead
nohead = Nohead()
result = nohead.collections.schema("posts", version=2)
require "nohead"
nohead = Nohead::Client.new
result = nohead.collections.schema("posts", version: 2)
{
"object": "schema",
"collection_id": "<string>",
"version": 123,
"definition": {
"id": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"deleted_at": "2023-11-07T05:31:56Z",
"fields": [
{
"id": "<string>",
"name": "<string>",
"key": "<string>",
"type": "text",
"required": true,
"multiple": true,
"position": 123,
"configuration": {
"description": "<string>",
"searchable": true,
"filterable": true,
"sortable": true,
"min_length": 1,
"max_length": 1,
"format": "slug",
"unique": true
},
"deleted_at": "2023-11-07T05:31:56Z"
}
],
"public_search": true
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"request_id": "req_01J9ZQ3F8X5W2K7M4N6P0R1S2T",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>",
"usage": 123,
"limit": 123,
"current_revision": 123,
"record_id": "<string>",
"draft_id": "<string>"
}
]
}
}Authorizations
Project-scoped API key, e.g. nohead_sk_k7fz0a9c3m2q_<secret>, or
nohead_pk_… for a published-only key. Used by servers, CI, the CLI
and coding agents.
Path Parameters
Collection ID, or the collection slug when authenticating with an API key.
Query Parameters
Schema version; defaults to the current one.
Required range:
x >= 1