Skip to main content

Update PageMeta

Update a page meta

HTTP Request

PATCH/api/pages/base/:page_id/meta/:id

Authorization

Authorization

  • Required: Yes
  • Permission: Staff with PageMetaPermission or Admin
  • Permission Code: 3023
  • Authentication: Token-based (Authorization: Token <your_api_key>)

Path Parameters

ParameterTypeRequiredDescription
page_idIntegerYesUnique ID of the page
idIntegerYesUnique ID of the page meta to update

Request Body

FieldTypeRequiredDescription
keyStringYesThe meta key name
value_textStringNoThe text value of the meta data(nullable)
value_fileintegerNoThe `id` of the file related to the key(nullable)

Example Requests

1import requests
2
3# update a meta, replacing a text value with file value
4response = requests.post('http://www.example.com/api/pages/38/meta/9', 
5  json={
6    "key": "contact_us_url",
7    "value_text": null,
8    "value_file": 4
9  },
10  headers={'Authorization': 'Token <your_api_key>'}
11)
12print(response.json())

Response Fields

FieldTypeDescription
idIntegerId of the page meta(unique)
keyStringThe key name of the meta(unique for the page)
value_textStringThe text value of the meta (nullable)
value_file_dataObjectThe file related to the meta (nullable)
created_atString (ISO 8601)Timestamp when the page was created
updated_atString (ISO 8601)Timestamp when the page was last updated

Value File Structure

FieldTypeDescription
idIntegerId of the file (unique)
typeStringType of the file (image, text, video, ...)
nameStringFile name (nullable)
sizeStringSize of the file(nullable)
human_readable_sizeStringA human readable size for the file
fStringurl to the file

Response Example

{
"id": 9,
"key": "contact_us_url_edited",
"value_text": null,
"value_file_data": {
"id": 4,
"type": "image",
"name": "rams",
"size": 118805,
"human_readable_size": "116.02 KB",
"f": "http://127.0.0.1:8000/media/core_media/2025/11/29/RAMFeatured.jpg"
},
"created_at": "2025-12-20T12:58:59.259960Z",
"updated_at": "2025-12-20T15:39:12.606302Z"
}

NOTE

  • Either one of value_file or value_text must be provided
  • If you need to set a file value for a page meta with an existing text value, you should set the text value to null in the same request and vice versa
  • key is unique for each page not among all pages, so there may be two keys named foo for two different pages