Send Template

Agents can use the template you configure as their message draft/template. To send the template to the agent, you need to provide either agentId or agentLogin.

Permissions

  ----
  Permissions:INTEGRATOR,OPERATOR
  ----

Request Body Parameters

ParameterTypeDescription
agentIdlong (optional)Agent’s identifier. The field is required if agentId is not provided.
agentLoginstring (optional)Agent’s login. The field is required if agentLogin is not provided.
messagestringMessage template text
filefile (optional)Message template attachment

HTTP Request

  • Example for agentId:
POST /api/v1/commands/send-template HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer <integrator_token>
Host: localhost: 8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=agentId
1
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=message
template
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=filename.txt
Content-Type: text/plain
attachment data
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
  • Example for agentLogin:
POST /api/v1/commands/send-template HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Authorization: Bearer <integrator_token>
Host: localhost: 8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=agentLogin
login
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=message
template
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=file; filename=filename.txt
Content-Type: text/plain
attachment data
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--

Example of a Successful HTTP Response

HTTP/1.1 200 OK