Skip to main content
POST
/
api
/
agent
/
enable-widget
Habilitar Widget
curl --request POST \
  --url https://api.plazbot.com/api/agent/enable-widget \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '
{
  "agentId": "<string>",
  "widgetEnabled": true,
  "workspaceId": "<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

Body

application/json
agentId
string
required

ID del agente

widgetEnabled
boolean
required

True para habilitar, false para deshabilitar

workspaceId
string
required

Identificador del workspace

Response

Widget actualizado 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