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
Parameter | Type | Description |
agentId | long (optional) | Agent’s identifier. The field is required if agentId is not provided. |
agentLogin | string (optional) | Agent’s login. The field is required if agentLogin is not provided. |
message | string | Message template text |
file | file (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