Search + K

Command Palette

Search for a command to run...

Sign In

Create Collection

POST /sites/{site_id}/collections
Copy endpoint
https://api.webflow.com/v2

Create a Collection for a site with collection fields.

Each collection includes the required name and slug fields, which are generated automatically. You can update the displayName of these fields, but the slug for them cannot be changed. Fields slugs are automatically converted to lowercase. Spaces in slugs are replaced with hyphens.

Required scope | cms:write

Parameters

path Path Parameters

Name Type
site_id required

Unique identifier for a Site

string

Request Body

application/json required

Pass the Name of the collection, as well as the singular name of each item in the collection.

{
displayName: string;
singularName: string;
slug?: string;
fields?: ({
id?: string;
isEditable?: boolean;
isRequired?: boolean;
type: "Color" | "DateTime" | "Email" | "File" | "Image" | "Link" | "MultiImage" | "Number" | "Phone" | "PlainText" | "RichText" | "Switch" | "VideoLink";
displayName: string;
helpText?: string;
}
| {
id?: string;
isEditable?: boolean;
isRequired?: boolean;
type: "Option";
displayName: string;
helpText?: string;
metadata: { options: { ... }[]; };
}
| {
id?: string;
isEditable?: boolean;
isRequired?: boolean;
type: "MultiReference" | "Reference";
displayName: string;
helpText?: string;
metadata: { collectionId: string; };
}
)[]
;
}

Responses

200 application/json

Request was successful

{
id: string;
displayName: string;
singularName: string;
slug?: string;
createdOn?: string;
lastUpdated?: string;
fields: {
id: string;
isRequired: boolean;
isEditable?: boolean;
type: "Color" | "DateTime" | "Email" | "ExtFileRef" | "File" | "Image" | "Link" | "MultiImage" | "MultiReference" | "Number" | "Option" | "Phone" | "PlainText" | "Reference" | "RichText" | "Switch" | "VideoLink";
slug?: string;
displayName: string;
helpText?: string;
validations?: { additionalProperties?: { ... } | string | number | boolean; };
}
[]
;
}

Client Errors

400 application/json

Validation failure

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
401 application/json

Provided access token is invalid or does not have access to requested resource

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
404 application/json

Requested resource not found

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
409 application/json

Collection already exists

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}
429 application/json

The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses.

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}

Server Errors

500 application/json

We had a problem with our server. Try again later.

{
code?: "bad_request" | "collection_not_found" | "conflict" | "duplicate_collection" | "duplicate_user_email" | "ecommerce_not_enabled" | "forbidden" | "forms_require_republish" | "incompatible_webhook_filter" | "internal_error" | "invalid_auth_version" | "invalid_credentials" | "invalid_domain" | "invalid_user_email" | "item_not_found" | "missing_scopes" | "no_domains" | "not_authorized" | "not_enterprise_plan_site" | "not_enterprise_plan_workspace" | "order_not_found" | "resource_not_found" | "too_many_requests" | "unsupported_version" | "unsupported_webhook_trigger_type" | "user_limit_reached" | "user_not_found" | "users_not_enabled" | "validation_error";
message?: string;
externalReference?: string;
details?: unknown[];
}