Skip to content
campaiDeveloper
campai.com

Templates · Folders

POST/{organizationId}/templates/folders/{folderId}

Rename template folder

Renames a template folder in an organization. It takes organizationId, folderId, and name, and returns the folder’s _id.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • Requires organization access and the template.edit permission.

Request

Path parameters

  • organizationIdidrequired
  • folderIdidrequired

Body

Content-Type: application/json

  • namestringrequired

    1–64 characters

Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/templates/folders/YOUR_FOLDER_ID' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

Content-Type: application/json

  • _idid
Response200
{
  "_id": "000000000000000000000001"
}

What else happens

  • Updates the folder’s name in templateFolders.

Errors

Other errors

StatusErrorWhen
404No fixed messageIf the folder is not found in the organization, the endpoint returns HTTP 404 (NOT_FOUND).

Errors nearly every request can meet are listed under Errors.