Tags API¶
Important
This API is available only for sites that have this feature enabled. Please contact your Account Manager to enable it for your site.
The tags API supports creation, deletion, and updating of tags that can be used to categorize your content.
Creating tags¶
Creates a tag.
POST /api/1.3/tags
Parameters¶
Name |
Type |
Description |
|---|---|---|
|
String |
Title - Required |
|
String |
Slug - Required |
|
Array of strings |
Tags - Optional |
|
Integer |
Status - Optional
Choices:
-
1: Private (Default)-
2: Public-
3: Unlisted |
|
String |
About - Optional |
|
String |
Meta title - Optional |
|
Object |
Page settings - Optional |
|
String |
URL header image - Optional |
|
Integer |
ID of the uploaded header image (it takes precedence over url_header_image) - Optional |
|
Object |
Custom fields - Optional |
Response¶
{
"id": 100,
"title": "My tag",
"url": "my-tag",
"full_url": "my-tag",
"status": 1,
"meta_title": null,
"page_settings": {
"hide_from_entry_editor": false,
"allow_community_posts": false,
"open_in_new_tab": false
},
"about_html": "",
"tags": [],
"url_header_image": "",
"site_id": 9,
"created_ts": 1507918417,
"order": 3,
"parent_id": 0,
"type": 2,
"extras": {},
"header_image_id": null
}
Editing tags¶
Edits a tag.
PUT /api/1.3/tags/<id>
Parameters¶
The same parameters from Creating tags apply here; however, title and url are not required.
Response¶
The same specification from Creating tags section applies here.
Deleting tags¶
Deletes a tag.
DELETE /api/1.3/tags/<id>
Parameters¶
No parameters are required.
Response¶
The response payload is an empty object.
{}
List tags¶
Fetches tags information.
GET /api/1.3/tags
Parameters¶
Applying the following parameters will filter the response.
Name |
Type |
Description |
|---|---|---|
|
Array of strings |
Fields to include in response – Optional |
|
Array of strings |
Fields to exclude in response – Optional |
Response¶
It returns a list of objects described at Creating tags section.
Get a single tag¶
Fetch a single tag by ID.
GET /api/1.3/tags/<id>
Response¶
The same specification from Creating tags section applies here.