Collections

Create and manage CMS collections using the Collections tools. Collections define the structure and schema for your content.


List collections

List all CMS collections in a site. Returns collection metadata including IDs, names, and schemas.

Tool: collections_list

site_id
stringRequired

Unique identifier for the site

Returns

Response
1{
2 "collections": [
3 {
4 "id": "63692ab61fb2852f582ba8f5",
5 "displayName": "Products",
6 "singularName": "Product",
7 "slug": "product",
8 "createdOn": "2019-06-12T13:35:14.238Z",
9 "lastUpdated": "2022-11-17T15:08:50.480Z"
10 },
11 {
12 "id": "63692ab61fb2856e6a2ba8f6",
13 "displayName": "Categories",
14 "singularName": "Category",
15 "slug": "category",
16 "createdOn": "2019-06-12T13:35:14.238Z",
17 "lastUpdated": "2022-11-17T15:08:50.481Z"
18 },
19 {
20 "id": "63692ab61fb285a8562ba8f4",
21 "displayName": "SKUs",
22 "singularName": "SKU",
23 "slug": "sku",
24 "createdOn": "2019-06-12T13:35:14.238Z",
25 "lastUpdated": "2022-11-17T15:08:50.478Z"
26 }
27 ]
28}

Get collection details

Get detailed information about a specific CMS collection including its schema and field definitions.

Tool: collections_get

collection_id
stringRequired

Unique identifier for the collection

Returns

Response
1{
2 "id": "7f15043107e2fc95644e93807ee25dd6",
3 "displayName": "Guide Entries",
4 "singularName": "Guide Entry",
5 "fields": [
6 {
7 "id": "5e2a1b3c4d5e6f7890a1b2c3",
8 "isRequired": true,
9 "type": "PlainText",
10 "displayName": "Entry Title",
11 "isEditable": true,
12 "slug": "name",
13 "helpText": "Name of the entry.",
14 "validations": {
15 "additionalProperties": {}
16 }
17 },
18 {
19 "id": "5e2a1b3c4d5e6f7890a1b2c4",
20 "isRequired": true,
21 "type": "PlainText",
22 "displayName": "Slug",
23 "isEditable": true,
24 "slug": "slug",
25 "helpText": "Slug of the entry.",
26 "validations": {
27 "additionalProperties": {}
28 }
29 },
30 {
31 "id": "6f7e8d9c0b1a2e3d4c5b6a7f",
32 "isRequired": false,
33 "type": "PlainText",
34 "displayName": "Summary",
35 "isEditable": true,
36 "slug": "summary",
37 "helpText": "A short summary of the entry.",
38 "validations": {
39 "additionalProperties": {}
40 }
41 },
42 {
43 "id": "1a2b3c4d5e6f7a8b9c0d1e2f",
44 "isRequired": false,
45 "type": "RichText",
46 "displayName": "Entry HTML",
47 "isEditable": true,
48 "slug": "entry-html",
49 "helpText": "The HTML content of the entry.",
50 "validations": {
51 "additionalProperties": {}
52 }
53 },
54 {
55 "id": "7e8d9c0b1a2e3d4c5b6a7f8e",
56 "isRequired": false,
57 "type": "Image",
58 "displayName": "Illustration Image",
59 "isEditable": true,
60 "slug": "illustration-image",
61 "helpText": "An image of the entry.",
62 "validations": {
63 "additionalProperties": {}
64 }
65 },
66 {
67 "id": "2f3e4d5c6b7a8e9d0c1b2a3f",
68 "isRequired": false,
69 "type": "VideoLink",
70 "displayName": "Demonstration Video",
71 "isEditable": true,
72 "slug": "demonstration-video",
73 "helpText": "A video of the entry.",
74 "validations": {
75 "additionalProperties": {}
76 }
77 },
78 {
79 "id": "8e9d0c1b2a3f4e5d6c7b8a9e",
80 "isRequired": false,
81 "type": "Link",
82 "displayName": "More Info Link",
83 "isEditable": true,
84 "slug": "more-info-link",
85 "helpText": "A link to more information about the entry.",
86 "validations": {
87 "additionalProperties": {}
88 }
89 },
90 {
91 "id": "3f4e5d6c7b8a9e0d1c2b3a4f",
92 "isRequired": false,
93 "type": "Number",
94 "displayName": "Importance Level",
95 "isEditable": true,
96 "slug": "importance-level",
97 "helpText": "The importance level of the entry.",
98 "validations": {
99 "format": "integer",
100 "allowNegative": false,
101 "allowZero": false,
102 "minValue": 1,
103 "maxValue": 5
104 }
105 },
106 {
107 "id": "9e0d1c2b3a4f5e6d7c8b9a0e",
108 "isRequired": false,
109 "type": "Switch",
110 "displayName": "Is Essential",
111 "isEditable": true,
112 "slug": "is-essential",
113 "helpText": "Is this entry essential?",
114 "validations": {
115 "additionalProperties": {}
116 }
117 },
118 {
119 "id": "4f5e6d7c8b9a0e1d2c3b4a5f",
120 "isRequired": false,
121 "type": "Color",
122 "displayName": "First Mentioned",
123 "isEditable": true,
124 "slug": "first-mentioned",
125 "helpText": "Date of the first mention of the subject.",
126 "validations": {
127 "additionalProperties": {}
128 }
129 },
130 {
131 "id": "0e1d2c3b4a5f6e7d8c9b0a1e",
132 "isRequired": false,
133 "type": "Color",
134 "displayName": "Towel Color",
135 "isEditable": true,
136 "slug": "towel-color",
137 "helpText": "The color of the towel.",
138 "validations": {
139 "additionalProperties": {}
140 }
141 },
142 {
143 "id": "5f6e7d8c9b0a1e2d3c4b5a6f",
144 "isRequired": false,
145 "type": "Reference",
146 "displayName": "Related Entry",
147 "isEditable": true,
148 "slug": "related-entry",
149 "helpText": "A related entry.",
150 "validations": {
151 "collectionId": "7f15043107e2fc95644e93807ee25dd6"
152 }
153 },
154 {
155 "id": "1e2d3c4b5a6f7e8d9c0b1a2f",
156 "isRequired": false,
157 "type": "MultiReference",
158 "displayName": "Mentioned In Entries",
159 "isEditable": true,
160 "slug": "mentioned-in-entries",
161 "helpText": "Entries that mention this subject.",
162 "validations": {
163 "collectionId": "7f15043107e2fc95644e93807ee25dd6"
164 }
165 },
166 {
167 "id": "6f7e8d9c0b1a2e3d4c5b6a8f",
168 "isRequired": false,
169 "type": "Option",
170 "displayName": "Item Type",
171 "isEditable": true,
172 "slug": "item-type",
173 "helpText": "The type of item.",
174 "validations": {
175 "options": [
176 {
177 "name": "Survival Gear",
178 "id": "66f6e966c9e1dc700a857ca3"
179 },
180 {
181 "name": "Gadget",
182 "id": "66f6e966c9e1dc700a857ca4"
183 },
184 {
185 "name": "Other",
186 "id": "66f6e966c9e1dc700a857ca5"
187 }
188 ]
189 }
190 },
191 {
192 "id": "2e3d4c5b6a7f8e9d0c1b2a4f",
193 "isRequired": false,
194 "type": "File",
195 "displayName": "Guide File",
196 "isEditable": true,
197 "slug": "guide-file",
198 "helpText": {},
199 "validations": {
200 "additionalProperties": {}
201 }
202 },
203 {
204 "id": "7f8e9d0c1b2a3f4e5d6c8b9e",
205 "isRequired": false,
206 "type": "Email",
207 "displayName": "Contributor Email",
208 "isEditable": true,
209 "slug": "contributor-email",
210 "helpText": {},
211 "validations": {
212 "additionalProperties": {}
213 }
214 },
215 {
216 "id": "3a4f5e6d7c8b9a0e1d2c4b5f",
217 "isRequired": false,
218 "type": "Phone",
219 "displayName": "Emergency Contact",
220 "isEditable": true,
221 "slug": "emergency-contact",
222 "helpText": {},
223 "validations": {
224 "additionalProperties": {}
225 }
226 }
227 ],
228 "slug": "guide-entry",
229 "createdOn": "2024-04-12T12:42:00.000Z",
230 "lastUpdated": "2024-04-12T12:42:00.000Z"
231}

Create collection

Create a new CMS collection in a site with specified name and schema.

Tool: collections_create

site_id
stringRequired

Unique identifier for the site

request
objectRequired

Collection creation request

displayName
stringRequired

Collection name

singularName
stringRequired

Singular form of the name

slug
stringRequired

URL slug for the collection

POST
/v2/sites/:site_id/collections
1from webflow import ReferenceField, ReferenceFieldMetadata, StaticField, Webflow
2
3client = Webflow(
4 access_token="YOUR_ACCESS_TOKEN",
5)
6client.collections.create(
7 site_id="580e63e98c9a982ac9b8b741",
8 display_name="Blog Posts",
9 singular_name="Blog Post",
10 slug="posts",
11 fields=[
12 StaticField(
13 is_required=True,
14 type="PlainText",
15 display_name="Title",
16 help_text="The title of the blog post",
17 ),
18 StaticField(
19 is_required=True,
20 type="RichText",
21 display_name="Content",
22 help_text="The content of the blog post",
23 ),
24 ReferenceField(
25 is_required=True,
26 type="Reference",
27 display_name="Author",
28 help_text="The author of the blog post",
29 metadata=ReferenceFieldMetadata(
30 collection_id="23cc2d952d4e4631ffd4345d2743db4e",
31 ),
32 ),
33 ],
34)