Open App

Pages

API endpoints for pages

List pages

GET /api/v1/pages

Parameters

NameInTypeRequiredDescription
organisationIdquerystringNo
searchquerystringNo
typeIdquerystringNo
categoryIdquerystringNo
containerIdquerystringNo
limitqueryintegerNo
cursorquerystringNoOpaque continuation token from a previous list response's nextCursor.

Example request

curl -X GET \
"https://api.example.com/api/v1/pages?organisationId=<organisationId>&search=<search>&typeId=<typeId>&categoryId=<categoryId>&containerId=<containerId>&limit=<limit>&cursor=<cursor>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "_id": "string",
      "name": "string",
      "userId": "string",
      "organisationId": "string",
      "createdAt": 0,
      "updatedAt": 0
    }
  ],
  "nextCursor": "string"
}

Other statuses: 401.

Response body type

{ data: PageMeta[]; nextCursor: string }


Create page

POST /api/v1/pages

Example request

curl -X POST \
"https://api.example.com/api/v1/pages" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","content":"string","organisationId":"string","containerId":"string"}'

Other statuses: 401.

Response body type


Get page

GET /api/v1/pages/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.
includeContentquerystringNo

Example request

curl -X GET \
"https://api.example.com/api/v1/pages/<id>?includeContent=<includeContent>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Other statuses: 404.

Response body type


Update page

PATCH /api/v1/pages/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X PATCH \
"https://api.example.com/api/v1/pages/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"
-d '{"name":"string","content":"string"}'

Response body type


Delete page

DELETE /api/v1/pages/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYesPath parameter.

Example request

curl -X DELETE \
"https://api.example.com/api/v1/pages/<id>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Response body type