Skip to main content
PUT
/
api
/
template
/
{id}
Actualizar Plantilla
curl --request PUT \
  --url https://api.plazbot.com/api/template/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '
{
  "workspaceId": "<string>",
  "elementName": "<string>",
  "languageCode": "<string>",
  "category": "<string>",
  "templateType": "<string>",
  "components": [
    {
      "type": "<string>",
      "format": "<string>",
      "text": "<string>",
      "buttons": [
        {
          "type": "<string>",
          "text": "<string>",
          "phone_number": "<string>",
          "url": "<string>",
          "tagIds": [
            "<string>"
          ],
          "segmentationIds": [
            "<string>"
          ],
          "phaseIds": [
            "<string>"
          ],
          "agentIds": [
            "<string>"
          ]
        }
      ],
      "variables": [
        {
          "variable": "<string>",
          "example": "<string>"
        }
      ]
    }
  ]
}
'
{
  "success": true,
  "code": 123,
  "errorCode": "<string>",
  "message": "<string>",
  "data": {}
}

Authorizations

Authorization
string
header
required

Token de autenticacion Bearer. Obtenga el token usando el endpoint /api/user/login

Headers

x-workspace-id
string
required

Identificador del workspace

Path Parameters

id
string
required

ID de la plantilla a actualizar

Body

application/json
workspaceId
string
required

Identificador del workspace

elementName
string

Nombre de la plantilla

languageCode
string

Codigo de idioma

category
string

Categoria de la plantilla

templateType
string

Tipo de plantilla

components
object[]

Componentes de la plantilla

Response

Plantilla actualizada exitosamente

success
boolean
required

Indica si la operacion fue exitosa

code
integer
required

Codigo HTTP de la respuesta

errorCode
string | null
required

Codigo de error, null si no hay error

message
string
required

Mensaje descriptivo del resultado

data
object
required

Datos de la respuesta