Skip to main content

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

FieldTypeRequiredDescription
titleStringYesPage title
slugBooleanYesThe slug of the page(unique)
bodyStringNoBody of the page (nullable)

Example Requests

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())

Response Fields

FieldTypeDescription
idIntegerId of the page(unique)
titleStringThe title of the page
slugStringThe slug related to the page (unique)
created_atString (ISO 8601)Timestamp when the page was created
updated_atString (ISO 8601)Timestamp when the page was last updated
bodyStringBody of the created page (editable in the update endpoint)
metaObjectMeta 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