Welcome to the Grigora API reference. Our API allows you to programmatically manage your CMS content, enabling powerful integrations and workflow automation.
All API endpoints are rooted at the following base URL:
https://api.grigora.co/general/api/v1
Authentication is handled via an API Key passed in the Authorization header. For details on generating a key, please see our guide: Creating and Authorizing an API Key.
Content-Type Header
For all POST requests made to the Grigora API, you must specify how you are sending data in the request body. The API expects data to be formatted as a standard web form. Therefore, it is essential to include the Content-Type header in your requests and set its value to application/x-www-form-urlencoded. Failing to include this header or using an incorrect content type will result in an error and prevent the API from processing your request.
Swagger Docs
Here’s a link to detailed Swagger docs - https://api.grigora.co/api-docs/public
CMS: Posts
The following endpoints allow you to interact with the posts in your Grigora project's CMS.
List Posts
Retrieves a list of all posts within a project, with options for advanced filtering and sorting.
POST /cms/post/list
Body Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
| Object | Optional | An object containing key-value pairs to filter the posts. See the Filters table below for all options. |
| String | Optional | The field to sort the results by (e.g., |
| String | Optional | The sort order. Can be |
Export to Sheets
Filters Object
The filters parameter can contain any of the following keys:
Filter Key | Type | Description |
|---|---|---|
| String | Filter by post status. Accepts |
| Object | Filter by last update timestamp. Object should contain |
| Object | Filter by publish date. Object should contain |
| String | Filter by a substring in the post title (case-insensitive). |
| Number | Filter for posts with a word count less than or equal to the provided value. |
| String or Array of Strings | Filter for posts belonging to one or more category slugs. |
| String or Array of Strings | Filter for posts by one or more author IDs. |
| Object | Filter by SEO score. Object should contain |
| Number | Filter for posts with internal links less than or equal to the provided value. |
| Number | Filter for posts with external links less than or equal to the provided value. |
Export to Sheets
Example Request
JSON
{ "filters": { "status": "published", "categories": ["news", "featured"], "score": { "from": 7, "to": 10 } }, "sort": "last_update", "order": "dsc"}
Example Success Response (200)
JSON
{ "success": true, "data": [ { "pk": "project-your_project_id", "sk": "cms-post-data-post_id_1", "title": "My First Published Post", "slug": "my-first-published-post", "status": "published", "author": "api-user", "last_update": 1678886400, "first_published": 1678880000, "...": "..." } ]}
Create Post
Creates a new post within your project's CMS. A title is required. If a slug is not provided, one will be automatically generated from the title.
POST /cms/post/create
Body Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | The title of the post. |
| String | Optional | The URL-friendly identifier. Auto-generated from title if omitted. |
| String | Optional | The full content of the post in a raw format (e.g., HTML, Markdown). |
| String | Optional | The author's identifier. Defaults to |
| String | Optional | The status of the post (e.g., |
| Array | Optional | An array of category objects, e.g., |
| Array | Optional | An array of tag objects. |
| String | Optional | The title for SEO purposes. |
| String | Optional | The description for SEO purposes. |
| String | Optional | The URL of the featured image. |
| String | Optional | A short summary of the post. |
| String | Optional | The primary keyword for SEO analysis. |
... | ... | Optional | Other fields like |
Export to Sheets
Example Request
JSON
{ "title": "New Post via API", "content": "<h1>Hello World</h1><p>This is the content of my new post.</p>", "status": "draft", "author": "user-123", "category": [{"value": "tech"}], "keyword": "API"}
Example Success Response (200)
JSON
{ "success": true, "message": "New Post Created.", "data": { "id": "newly_generated_post_id", "slug": "new-post-via-api", "project_id": "your_project_id" }}
Update Post
Updates an existing post's data. You must provide the post_id.
POST /cms/post/update
Body Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | The unique identifier of the post to update. |
| String | Optional | The new title of the post. |
| String | Optional | The new URL-friendly identifier. |
| String | Optional | The new full content of the post. |
... | ... | Optional | Any other parameter from the "Create Post" endpoint can be provided to update its value. |
Export to Sheets
Example Request
JSON
{ "post_id": "existing_post_id", "title": "An Updated Post Title", "status": "published", "first_published": 1678886400}
Example Success Response (200)
JSON
{ "success": true, "message": "Post Updated.", "data": { "id": "existing_post_id", "slug": "an-updated-post-title", "project_id": "your_project_id" }}
Delete Post
Deletes a post from your project. This action is irreversible.
POST /cms/post/delete
Body Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | The unique identifier of the post to delete. |
Export to Sheets
Example Request
JSON
{ "post_id": "post_id_to_delete"}
Example Success Response (200)
JSON
{ "success": true, "message": "Posts Deleted", "data": { "deleted_post_id": "post_id_to_delete", "project_id": "your_project_id" }}
Publish Post
Changes the status of one or more draft posts to "published" and adds them to the publishing queue. If a post is already published, it will be ignored.
POST /cms/post/publish
Body Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
| Array of Strings | Yes | An array of unique identifiers for the posts to publish. |
Export to Sheets
Example Request
JSON
{ "post_id": ["post_id_1", "post_id_2"]}
Example Success Response (200)
JSON
{ "success": true, "message": "Posts published successfully. 1 post(s) were already published. 1 post(s) added to publish queue.", "data": { "published_post_ids": [ "post_id_2" ], "already_published_post_ids": [ "post_id_1" ], "queue_id": "generated_queue_id", "project_id": "your_project_id", "first_published": 1678887000 }}
Unpublish Post
Changes a post's status from "published" back to "draft".
POST /cms/post/unpublish
Body Parameters
Parameter | Type | Required | Description |
|---|---|---|---|
| String | Yes | The unique identifier of the post to unpublish. |
Export to Sheets
Example Request
JSON
{ "post_id": "published_post_id"}
Example Success Response (200)
JSON
{ "success": true, "message": "Post unpublished successfully.", "data": { "post_id": "published_post_id", "project_id": "your_project_id" }}