Getting Started
Access API
Analytics API
Collections API
Registrations API
Short URLs API
Collections API
List collection blocks
Fetches the blocks associated with a collection. The response includes block containers and their associated blocks, ordered by the block’s position. Results can be paginated.
GET
/
v1
/
collections
/
{id}
/
blocks
Copy
Ask AI
curl --request GET \
--url https://api.oneofnone.io/v1/collections/{id}/blocks \
--header 'x-api-key: <api-key>'
Copy
Ask AI
{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blocks": [
{
"block": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"description": "<string>",
"status": "ACTIVE",
"target_size": "2x1",
"type": "text",
"action_type": "url",
"url": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"style": {
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"background_color": "<string>",
"overlay_color": "<string>",
"padding_top": "<string>",
"padding_right": "<string>",
"padding_bottom": "<string>",
"padding_left": "<string>",
"border_width": "<string>",
"border_color": "<string>",
"border_radius": "<string>"
},
"card": {
"class_name": "<string>",
"header": {
"text": "<string>",
"element": "h2",
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"text_align": "left",
"uppercase": true,
"class_name": "<string>"
},
"footer": {
"text": "<string>",
"element": "h2",
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"text_align": "left",
"uppercase": true,
"class_name": "<string>"
},
"body": {
"class_name": "<string>",
"align_vertical": "top",
"align_horizontal": "left",
"content": "<string>"
}
},
"dialog": {
"class_name": "<string>",
"carousel_style": 1,
"carousel_cta": {
"text": "<string>",
"text_class_name": "<string>",
"button_label": "<string>",
"button_href": "<string>",
"button_class_name": "<string>",
"class_name": "<string>"
},
"caption": "<string>",
"youtube": true,
"post_title": "<string>",
"post_body": "<string>",
"post_date": "<string>",
"post_date_format": "<string>",
"iframe_url": "<string>"
},
"image": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"background_image": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"video": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"gallery": [
{
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"order": 123,
"variants": [
"<string>"
],
"type": "<string>",
"caption": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"order": 1
}
]
}
],
"pagination": {
"next": "https://api.example.com/users?limit=20&offset=20",
"prev": "https://api.example.com/users?limit=20&offset=0",
"limit": 20,
"offset": 0,
"total_count": 150,
"total_pages": 8,
"current_page": 1
}
}
Authorizations
The API key required for accessing protected routes. It should be included in the request headers as x-api-key
.
Path Parameters
The unique identifier of the collection.
Query Parameters
The maximum number of items to return (1-1000).
Required range:
1 <= x <= 1000
The number of items to skip before starting to collect the result set.
Required range:
x >= 0
The sort order of the results.
Available options:
asc
, desc
The field by which to order the results.
If true, returns additional pagination metadata including total count and total pages.
Response
200
application/json
Successfully retrieved collection blocks.
The response is of type object
.
Copy
Ask AI
curl --request GET \
--url https://api.oneofnone.io/v1/collections/{id}/blocks \
--header 'x-api-key: <api-key>'
Copy
Ask AI
{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"collection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"blocks": [
{
"block": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"title": "<string>",
"description": "<string>",
"status": "ACTIVE",
"target_size": "2x1",
"type": "text",
"action_type": "url",
"url": "<string>",
"visibility": "public",
"tags": [
"<string>"
],
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"team_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"style": {
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"background_color": "<string>",
"overlay_color": "<string>",
"padding_top": "<string>",
"padding_right": "<string>",
"padding_bottom": "<string>",
"padding_left": "<string>",
"border_width": "<string>",
"border_color": "<string>",
"border_radius": "<string>"
},
"card": {
"class_name": "<string>",
"header": {
"text": "<string>",
"element": "h2",
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"text_align": "left",
"uppercase": true,
"class_name": "<string>"
},
"footer": {
"text": "<string>",
"element": "h2",
"color": "<string>",
"font_size": "<string>",
"line_height": "<string>",
"text_align": "left",
"uppercase": true,
"class_name": "<string>"
},
"body": {
"class_name": "<string>",
"align_vertical": "top",
"align_horizontal": "left",
"content": "<string>"
}
},
"dialog": {
"class_name": "<string>",
"carousel_style": 1,
"carousel_cta": {
"text": "<string>",
"text_class_name": "<string>",
"button_label": "<string>",
"button_href": "<string>",
"button_class_name": "<string>",
"class_name": "<string>"
},
"caption": "<string>",
"youtube": true,
"post_title": "<string>",
"post_body": "<string>",
"post_date": "<string>",
"post_date_format": "<string>",
"iframe_url": "<string>"
},
"image": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"background_image": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"video": {
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>"
},
"gallery": [
{
"alt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"file_type": "<string>",
"id": 123,
"poster_url": "<string>",
"size": 123,
"tags": [
"<string>"
],
"thumbnail_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"url": "<string>",
"order": 123,
"variants": [
"<string>"
],
"type": "<string>",
"caption": "<string>"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"order": 1
}
]
}
],
"pagination": {
"next": "https://api.example.com/users?limit=20&offset=20",
"prev": "https://api.example.com/users?limit=20&offset=0",
"limit": 20,
"offset": 0,
"total_count": 150,
"total_pages": 8,
"current_page": 1
}
}
Assistant
Responses are generated using AI and may contain mistakes.