Welcome to the Typeflo Headless CMS Admin API documentation. This API allows you to create, modify & delete the content such as posts, categories, tags from your Typeflo-powered blog programmatically.
Authentication
To use the Typeflo's Admin API, you need a Admin API key.
Retrieving Your API Key
Log in to your Typeflo admin dashboard.
Navigate to Settings > Apps.
Under Manage Custom Apps , click on +Add
Create new custom app with the name of your choice
Once created, head over to the newely created app settings to view the API Keys
From the Settings page, you will be able to get the below credentials:-
Content & Admin API keys
Content & Admin API URLs
Securing Your Admin API Key
The Admin API key is a powerful credential that grants access to your Typeflo Headless CMS Admin API. Proper security measures must be taken to protect your API key and prevent unauthorized access to your Typeflo-powered blog.
Why Securing the Admin API Key Is Important
The Admin API key provides full control over your content, including creating, modifying, and deleting posts, categories, and tags. If this key is exposed, malicious actors can gain access to your blog, potentially causing data breaches, content manipulation, or service disruptions.
Base URL
GET https://<your-subdomain>.typeflo.io/api/headless/admin
Usage
To authenticate requests, pass the Admin API key as a bearer token in the Authorization header.
For example:
GET https://<your-subdomain>.typeflo.io/api/headless/admin/posts
Authorization: Bearer YOUR_ADMIN_API_KEY
Endpoints
The Typeflo Admin API provides endpoints for:
Posts
Categories
Tags
1. Posts
Publish, Schedule, Update & Delete the posts created in your blog
Endpoints
POST /posts
PATCH /posts/{id}
DELETE /posts/{id}
Example Request
POST https://<your-subdomain>.typeflo.io/api/headless/admin/posts
Authorization: Bearer YOUR_ADMIN_API_KEY
Content-Type: application/json
{
"title": "Sample Post",
"slug": "sample-post",
"categories": [
{
"label": "General",
"value": "e2324fe2-343b-4154-a69c-f2624c94d7ee"
}
],
"author": "0423169c-5te3-43e6-bb1c-cbbfa4047247",
"tags": [
{
"label": "Social",
"value": "e43285ae2-343b-4154-a69c-f2624c94d7ee"
}
],
"excerpt": "",
"metatitle": "Sample Post",
"metadescription": ".....",
"toc_status": true,
"scheduled": null,
"content": "<p>This is the content of the post</p>",
"publish_date": "22/03/2022",
"is_draft": false,
}
Fields overview
Field | Type | Description | Mandatory |
---|---|---|---|
| String | The title of the post. | Yes |
| String (HTML) | The main content of the post in HTML format. | Yes |
| String | URL-friendly version of the title, used in the post's URL. Default - Title of the post | No |
| String | A short summary or introduction to the post. Default - | No |
| Array of Objects | List of categories that needs to be assigned to the post. Each object includes Default - [] | No |
| String | The ID of the author. Default - Main author ID of the blog | No |
| Array of Objects | List of tags that needs to be assigned to the post. Each object includes Default - [] | No |
| String | The meta title for the post, used in SEO and previews. Default - Title of the post | No |
| String | The meta description for the post, used in SEO and previews. Default - Excerpt of the post if present else | No |
| String (DD/MM/YYYY) | Timestamp indicating when the post was created. Default - Current date of the post | No |
| Boolean | Indicates whether the table of contents is enabled ( Default - false | No |
| Boolean | Indicates whether the post needs to be moved to draft ( Default - false | No |
| String(DD/MM/YYYY HH:MM AM/PM) or null | Timestamp for when the post is scheduled to go live, or Default - | No |
Example Response
{
"data": {
"id": "5963423f38-e133-4de5-a3e9-8a18420ee03c"
},
"error": null
}
Status code
Code | Meaning | Description |
201 | Created | The post has been created |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
404 | Not Found | Author ID not found |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
Publishing the post
To publish a post, set the following fields to their respective values:
is_draft
:false
(ensures the post is marked as published).scheduled
:null
(indicates that the post is not scheduled for future publication).
Drafting the post
To draft a post, set the following fields to their respective values:
is_draft
:true
(ensures the post is marked as draft).scheduled
:null
(indicates that the post is not scheduled for future publication).
Scheduling the post
To schedlue a post, set the following fields to their respective values:
is_draft
:false
(ensures the post is not marked as draft).scheduled
:05/01/2026 10:30 AM
(Provide any future date and time in the formatDD/MM/YYYY HH:MM AM/PM
).
Updating the post
To update a post, send a PATCH
request to the admin posts URL, including the post ID as a URL parameter.
Endpoint
PATCH /posts/{id}
Parameter | Description | Mandatory |
---|---|---|
{id} | Unique ID of the post that was given after the creation of the post | Yes |
Example Request
PATCH https://<your-subdomain>.typeflo.io/api/headless/admin/posts/5963423f38-e133-4de5-a3e9-8a18420ee03c
Authorization: Bearer YOUR_ADMIN_API_KEY
Content-Type: application/json
{
"title": "Sample Post (Updated)",
"slug": "sample-post",
"categories": [
{
"label": "General",
"value": "e2324fe2-343b-4154-a69c-f2624c94d7ee"
}
],
"author": "0423169c-5te3-43e6-bb1c-cbbfa4047247",
"tags": [
{
"label": "Social",
"value": "e43285ae2-343b-4154-a69c-f2624c94d7ee"
}
],
"excerpt": "",
"metatitle": "Sample Post",
"metadescription": ".....",
"toc_status": true,
"content": "<p>This is the content of the post</p>",
"publish_date": "22/03/2022",
}
Fields overview
Field | Type | Description |
---|---|---|
| String | The title of the post. |
| String (HTML) | The main content of the post in HTML format. |
| String | URL-friendly version of the title, used in the post's URL. |
| String | A short summary or introduction to the post. |
| Array of Objects | List of categories that needs to be assigned to the post. Each object includes |
| String | The ID of the author. |
| Array of Objects | List of tags that needs to be assigned to the post. Each object includes |
| String | The meta title for the post, used in SEO and previews. |
| String | The meta description for the post, used in SEO and previews. |
| String (DD/MM/YYYY) | Timestamp indicating when the post was created. |
| Boolean | Indicates whether the table of contents is enabled ( |
Example Response
{
"data":{
"message": "Post updated successfully"
},
"error": null
}
Status code
Code | Meaning | Description |
200 | Created | Post updation was completed successfully |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
404 | Not Found | Author ID / Post not found |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
Deleting the post
To delete a post, send a DELETE
request to the admin posts URL, including the post ID as a URL parameter.
Endpoint
DELETE /posts/{id}
Parameter | Description | Mandatory |
---|---|---|
{id} | Unique ID of the post that was given after the creation of the post | Yes |
Example Request
DELETE https://<your-subdomain>.typeflo.io/api/headless/admin/posts/5963423f38-e133-4de5-a3e9-8a18420ee03c
Authorization: Bearer YOUR_ADMIN_API_KEY
Example Response
{
"data":{
"message": "Post deleted successfully"
},
"error": null
}
Status code
Code | Meaning | Description |
200 | Created | Post deletion was completed successfully |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
404 | Not Found | Author ID / Post not found |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
2. Category
Create, Update & Delete the categories created in your blog
Endpoints
POST /category
PATCH /category/{id}
DELETE /category/{id}
Creating category
To create a category, send a POST
request to the admin category URL, with the body of supported fields in JSON format.
Endpoint
POST /category
Example Request
POST https://<your-subdomain>.typeflo.io/api/headless/admin/category
Authorization: Bearer YOUR_ADMIN_API_KEY
Content-Type: application/json
{
"slug": "social-media",
"name": "Social Media",
"metadescription": ".....",
}
Fields overview
Field | Type | Description | Mandatory |
---|---|---|---|
| String | Name of the category. | Yes |
| String | URL-friendly version of the name, used in the category's URL. Default - Name of the category | No |
| String or | The meta description for the category, used in SEO and previews. Default - | No |
Example Response
{
"data": {
"id": "5963423f38-e133-4de5-a3e9-8a18420ee03c"
},
"error": null
}
Status code
Code | Meaning | Description |
201 | Created | The category has been created |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
Updating category
To update a category, send a PATCH
request to the admin categories URL, including the category ID as a URL parameter.
Endpoint
PATCH /category/{id}
Parameter | Description | Mandatory |
---|---|---|
{id} | Unique ID of the category that was given after the creation of the category | Yes |
Example Request
PATCH https://<your-subdomain>.typeflo.io/api/headless/admin/category/5963423f38-e133-4de5-a3e9-8a18420ee03c
Authorization: Bearer YOUR_ADMIN_API_KEY
Content-Type: application/json
{
"slug": "social-media",
"name": "Social Media (Updated)",
"metadescription": ".....",
}
Fields overview
Field | Type | Description |
---|---|---|
| String | Name of the category. |
| String | URL-friendly version of the name, used in the category's URL. |
| String or | The meta description for the category, used in SEO and previews. |
Example Response
{
"data":{
"message": "Category updated successfully"
},
"error": null
}
Status code
Code | Meaning | Description |
200 | Created | Category updation was completed successfully |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
403 | Forbidden | The access is denied on updating the restricted fields |
404 | Not Found | Category not found |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
Deleting category
To delete a category, send a DELETE
request to the admin categories URL, including the category ID as a URL parameter.
Endpoint
DELETE /category/{id}
Parameter | Description | Mandatory |
---|---|---|
{id} | Unique ID of the category that was given after the creation of the category | Yes |
Example Request
DELETE https://<your-subdomain>.typeflo.io/api/headless/admin/category/5963423f38-e133-4de5-a3e9-8a18420ee03c
Authorization: Bearer YOUR_ADMIN_API_KEY
Example Response
{
"data":{
"message": "Category deleted successfully"
},
"error": null
}
Status code
Code | Meaning | Description |
200 | Created | Category deletion was completed successfully |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
404 | Not Found | Category not found |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
3. Tag
Create, Update & Delete the tags created in your blog
Endpoints
POST /tags
PATCH /tags/{id}
DELETE /tags/{id}
Creating tag
To create a tag, send a POST
request to the admin tags URL, with the body of supported fields in JSON format.
Endpoint
POST /tags
Example Request
POST https://<your-subdomain>.typeflo.io/api/headless/admin/tags
Authorization: Bearer YOUR_ADMIN_API_KEY
Content-Type: application/json
{
"slug": "general",
"name": "General",
"metadescription": ".....",
}
Fields overview
Field | Type | Description | Mandatory |
---|---|---|---|
| String | Name of the tag. | Yes |
| String | URL-friendly version of the name, used in the tag's URL. Default - Name of the tag | No |
| String or | The meta description for the tag, used in SEO and previews. Default - | No |
Example Response
{
"data": {
"id": "5963423f38-e133-4de5-a3e9-8a18420ee03c"
},
"error": null
}
Status code
Code | Meaning | Description |
201 | Created | The tag has been created |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
Updating tag
To update a tag, send a PATCH
request to the admin tags URL, including the tag ID as a URL parameter.
Endpoint
PATCH /tags/{id}
Parameter | Description | Mandatory |
---|---|---|
{id} | Unique ID of the tag that was given after the creation of the tag | Yes |
Example Request
PATCH https://<your-subdomain>.typeflo.io/api/headless/admin/tags/5963423f38-e133-4de5-a3e9-8a18420ee03c
Authorization: Bearer YOUR_ADMIN_API_KEY
Content-Type: application/json
{
"slug": "general",
"name": "General (Updated)",
"metadescription": ".....",
}
Fields overview
Field | Type | Description |
---|---|---|
| String | Name of the tag. |
| String | URL-friendly version of the name, used in the tag's URL. |
| String or | The meta description for the tag, used in SEO and previews. |
Example Response
{
"data": {
"message": "Tag updated successfully"
},
"error": null
}
Status code
Code | Meaning | Description |
200 | Created | Tag updation was completed successfully |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
403 | Forbidden | The access is denied on updating the restricted fields |
404 | Not Found | Tag not found |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
Deleting tag
To delete a tag, send a DELETE
request to the admin tags URL, including the tag ID as a URL parameter.
Endpoint
DELETE /tags/{id}
Parameter | Description | Mandatory |
---|---|---|
{id} | Unique ID of the tag that was given after the creation of the tag | Yes |
Example Request
DELETE https://<your-subdomain>.typeflo.io/api/headless/admin/tags/5963423f38-e133-4de5-a3e9-8a18420ee03c
Authorization: Bearer YOUR_ADMIN_API_KEY
Example Response
{
"data": {
"message": "Tag deleted successfully"
},
"error": null
}
Status code
Code | Meaning | Description |
200 | Created | Tag deletion was completed successfully |
400 | Bad Request | The request could not be understood or has missing parameters or incorrect format. |
401 | Unauthorized | The API key is missing or invalid. |
404 | Not Found | Tag not found |
406 | Not Acceptable | The server is unable to provide a response that matches the client's requested format |
500 | Internal Server Error | An error occurred on the server. |
Share help article