hostdocs API
API Reference

Collections

List collections and forms

GET
/api/v1/collections
AuthorizationBearer <token>

A hostdocs developer API key (an opaque token issued by Clerk; create one in the dashboard under API keys).

In: header

Query Parameters

type?string
Value in"form" | "collection"

Header Parameters

x-hostdocs-account-id?string

Target workspace id. Defaults to the key’s workspace.

Formatuuid
x-hostdocs-site-id?string

Target site id. Defaults to the workspace’s default site.

Formatuuid

Response Body

curl -X GET "https://api.hostdocs.io/api/v1/collections?type=form" \  -H "x-hostdocs-account-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "x-hostdocs-site-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08"
{
  "success": true,
  "data": [
    {}
  ]
}

Create a collection or form

Requires the write scope.

POST
/api/v1/collections
AuthorizationBearer <token>

A hostdocs developer API key (an opaque token issued by Clerk; create one in the dashboard under API keys).

In: header

Header Parameters

x-hostdocs-account-id?string

Target workspace id. Defaults to the key’s workspace.

Formatuuid
x-hostdocs-site-id?string

Target site id. Defaults to the workspace’s default site.

Formatuuid
namestring
Length1 <= length <= 100
slug?string
Length1 <= length <= 64
typestring
Default"collection"
Value in"form" | "collection"

Response Body

curl -X POST "https://api.hostdocs.io/api/v1/collections" \  -H "x-hostdocs-account-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "x-hostdocs-site-id: 497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "type": "form"  }'
{
  "success": true,
  "data": {}
}