API Reference
Collections
List collections and forms
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.
Format
uuidx-hostdocs-site-id?string
Target site id. Defaults to the workspace’s default site.
Format
uuidResponse 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.
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.
Format
uuidx-hostdocs-site-id?string
Target site id. Defaults to the workspace’s default site.
Format
uuidnamestring
Length
1 <= length <= 100slug?string
Length
1 <= length <= 64typestring
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": {}
}