Skip to main content

Create / Update Global Section

Create / Update Global Section​

This API allows you to create a new global section or update an existing one inside a template:

  • Create → Provide template_id, section_name, and optional meta.
  • Update → Provide id, section_name, and optional meta.

Endpoint​

POST /v2/global/section

Base URL:
https://prodnode.unizooks.com


Headers​

KeyValueRequiredDescription
Content-Typeapplication/json✅Defines the request body format
AuthorizationBearer <JWT_TOKEN>✅Provide a valid JWT token for authentication

Request Body​

{
"id": "965f2707-8323-11f0-b592-bc2411f4d589",
"section_name": "Sectionnn 3",
"template_id": "dsoiafbs",
"meta": {}
}

Body Parameters​

FieldTypeRequiredDescription
idstring❌Unique identifier (UUID). If provided, API will update an existing section
template_idstring✅ (for create)The template ID this section belongs to (only required for create)
section_namestring✅The name of the section
metaobject❌Metadata object (can hold additional structured data)

Response​

Success (201 Created – when a new section is created)​

{
"status": true,
"message": "Section created successfully"
}

Success (200 OK – when an existing section is updated)​

{
"status": true,
"message": "Section updated successfully"
}

Error (400 Bad Request)​

{
"success": false,
"message": "Invalid request body. 'section_name' is required"
}

Error (401 Unauthorized)​

{
"success": false,
"message": "Invalid or expired token"
}

Example (cURL)​

# Example: Create a new section
curl --location 'https://prodnode.unizooks.com/v2/global/section' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT_TOKEN>' \
--data '{
"section_name":"New Section",
"template_id":"341a5ab6-826c-11f0-b592-bc2411f4d589",
"meta":{}
}'

# Example: Update an existing section
curl --location 'https://prodnode.unizooks.com/v2/global/section' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <JWT_TOKEN>' \
--data '{
"id":"965f2707-8323-11f0-b592-bc2411f4d589",
"section_name":"Updated Section",
"meta":{}
}'

✅ Use this API when you need to create or update sections within a global template.