Skip to main content

Update Blog Settings

Updates the blog settings of the project

HTTP Request

PATCH/api/settings/blog

Authorization

Authorization

  • Required: Yes
  • Permission: Staff with BlogSettingsPermission or Admin
  • Permission Code: 1042
  • Authentication: Token authentication

Request Body

FieldTypeRequiredDescription
blog_truncated_excerpt_max_lengthIntegerNoMaximum length for truncated excerpts (10-500)
blog_truncated_body_max_lengthIntegerNoMaximum length for truncated body text (minimum: 50)

Example Requests

1import requests
2
3# Update blog settings
4response = requests.patch('http://www.example.com/api/settings/blog', 
5  headers={'Authorization': 'Token <your_api_key>'},
6  json={
7      "blog_truncated_excerpt_max_length": 300,
8      "blog_truncated_body_max_length": 1500
9  }
10)
11print(response.json())

Response Fields

FieldTypeDescription
blog_truncated_excerpt_max_lengthIntegerMaximum length for truncated excerpts (10-500, default: 200)
blog_truncated_body_max_lengthIntegerMaximum length for truncated body text (minimum: 50, default: 1000)

Example Response

{
"blog_truncated_excerpt_max_length": 20,
"blog_truncated_body_max_length": 400
}

Notes

  • blog_truncated_excerpt_max_length should be between 10 and 500 with the default value being 200
  • blog_truncated_body_max_length should be larger that 50 with the default value being 1000