Create Page
Creates a new page
HTTP Request
POST/api/pages/
NOTE: NOT USING THE TRAILING SLASH AT THE END OF THE URL RESULTS TO A 500 SERVER ERROR
Authorization
Authorization
- Required: Yes
- Permission: Staff with PagePermission or Admin
- Permission Code: 3001
- Authentication: Token-based (Authorization: Token <your_api_key>)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| title | String | Yes | Page title |
| slug | Boolean | Yes | The slug of the page(unique) |
| body | String | No | Body of the page (nullable) |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3# Create a new page
4response = requests.post('http://www.example.com/api/pages/',
5 json={
6 "title": "new era in computers",
7 "slug": "new-era-in-computers",
8 "body": "some test body"
9 },
10 headers={'Authorization': 'Token <your_api_key>'}
11)
12print(response.json())1# Create a new page
2curl -X POST "http://www.example.com/api/pages/" \
3-H "Authorization: Token <your_api_key>" \
4-H "Content-Type: application/json" \
5-d '{
6 "title": "new era in computers",
7 "slug": "new-era-in-computers",
8 "body": "some test body"
9}'Response Fields
| Field | Type | Description |
|---|---|---|
| id | Integer | Id of the page(unique) |
| title | String | The title of the page |
| slug | String | The slug related to the page (unique) |
| created_at | String (ISO 8601) | Timestamp when the page was created |
| updated_at | String (ISO 8601) | Timestamp when the page was last updated |
| body | String | Body of the created page (editable in the update endpoint) |
| meta | Object | Meta key-value data (editable in the PageMeta endpoint) |
Example Response
{
"id": 48,
"title": "new era in computers",
"slug": "new-era-in-computers",
"created_at": "2025-12-03T14:33:44.093252Z",
"updated_at": "2025-12-03T14:33:44.093261Z",
"body": "some test body",
"meta": []
}
NOTES
- Not including the trailing slash '/' at the end of the url results in a 500 server error
- To add meta data, the general PageMeta endpoints should be used