Agent API

AgentLogin

POST

https://instance.ucontactcloud.com/Integra/resources/auth/AgentLogin

POST

https://instance.ucontactcloud.com/Integra/resources/auth/AgentLogin

Content-Type

application/x-www-form-urlencoded

Parameters

agent

Agent’s name

password

Agent’s password

Request example

curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/auth/AgentLogin' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'agent=Jhon' \ --data-urlencode 'password=12345'

Answer

The field md5secret will be necessary to send it in the following requests, since it serves as authentication.

In case the username and/or password are incorrect, the request will return 0.

{ "id": 9997, "name": "9999", "host": "instance.ucontactcloud.com", "nat": "yes", "type": "friend", "accountcode": "Jhon", "callgroup": "", "callerid": "9999", "canreinvite": "", "context": "entrantes", "dtmfmode": "rfc2833", "insecure": "", "language": "en", "mailbox": "", "md5secret": "U2FudGlhZ286NWI3MWRlYmEtZTVlOC00NDBhLWExY2ItZjgxMGU0Zjg5Nzkz", "pickupgroup": "", "qualify": "yes", "secret": "123456", "disallow": "all", "allow": "alaw;ulaw", "port": "", "defaultuser": "9999", "subscribecontext": "default", "record": "agent", "email": "", "phonetype": "SoftPhone", "LogLevel": "SEVERE", "limite": 0.0, "transport": "wss", "encryption": "yes", "did": "", "outboundproxy": "", "fullname": "John Doe" }

AgentLogoff

POST

https://instance.ucontactcloud.com/Integra/resources/api/AgentLogoff

POST

https://instance.ucontactcloud.com/Integra/resources/api/AgentLogoff

Content-Type

application/x-www-form-urlencoded

Parameters

agent

Agent’s name

interface

Agent’s Callerid. This is obtained in the AgentLogin.

message

Optional message to be saved in the queue_log_repo chart.

Headers

Authorization

Basic md5secret

Request example

curl --location --request POST 'https://instance.ucontactcloud.com/Integra/resources/api/AgentLogoff' \ --header 'Authorization: Basic U2FudGlhZ286NTA5NTY3MzItYjU5ZC00MDhjLThmZmUtM2I1MDc3ZDg3Y2Zi' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'agent=Jhon' \ --data-urlencode 'interface=SIP/9999' \ --data-urlencode 'message=Test'

HangupPhone

POST

https://instance.ucontactcloud.com/Integra/resources/Agents/HangupPhone

POST

https://instance.ucontactcloud.com/Integra/resources/Agents/HangupPhone

Content-Type

application/x-www-form-urlencoded

Parameters

phone

Agent’s Callerid. This is obtained in the AgentLogin.

Headers

Authorization

Basic md5secret

Request example

Break

POST

https://instance.ucontactcloud.com/Integra/resources/api/AgentBreak

POST

https://instance.ucontactcloud.com/Integra/resources/api/AgentBreak

Content-Type

application/x-www-form-urlencoded

Parameters

agent

Agent’s name

interface

Agent’s Callerid. This is obtained in the AgentLogin.

motive

Name of the break (It has to be one set up in uContact)

message

Optional message to be saved in the queue_log_repo chart.

Headers

Authorization

Basic md5secret

Request example:

UnBreak

POST

https://instance.ucontactcloud.com/Integra/resources/api/AgentUnBreak

POST

https://instance.ucontactcloud.com/Integra/resources/api/AgentUnBreak

Content-Type

application/x-www-form-urlencoded

Parameters

agent

Agent’s name.

interface

Agent’s Callerid. This is obtained in the AgentLogin.

motive

Name of the break (It has to be one set up in uContact)

message

Optional message to be saved in the queue_log_repo chart.

Headers

Authorization

Basic md5secret

Request example

AgentCall

POST

https://instance.ucontactcloud.com/Integra/resources/Agents/AgentCall

POST

https://instance.ucontactcloud.com/Integra/resources/Agents/AgentCall

Content-Type

application/x-www-form-urlencoded

Parameters

callerid

Caller ID for outbound OUTDID variable.

agent

Agent’s name

phone

Agent’s Callerid. This is obtained in the AgentLogin.

tech

Must always be sent like SIP

context

Agent context, it must be agentes

outqueue

Outbound campaign name

destination

Destination phone number

Headers

Authorization

Basic md5secret

Request example:

Answer

If the call is successful, the answer will be the unique guide for it. For instance:

8c78e1e1-5875-4ae7-a7ae-e3af3baeecdf

Transfer

POST

https://instance.ucontactcloud.com/Integra/resources/Agents/Transfer

POST

https://instance.ucontactcloud.com/Integra/resources/Agents/Transfer

Content-Type

application/x-www-form-urlencoded

Parameters

channel

Call source channel

context

Context to transfer

exten

Extension to transfer

Headers

Authorization

Basic md5secret

Request example:

Answer

The answer will always be 1 even if the parameters are not valid. It will only be 0 if an internal error occurs on the server.

SendDTMF

The submit function can be used to create new behaviors along with flows, or use previously defined behaviors.

DTMF

Action

#3

Park call

POST

https://instance.ucontactcloud.com/Integra/resources/Agents/SendDTMF

POST

https://instance.ucontactcloud.com/Integra/resources/Agents/SendDTMF

Content-Type

application/x-www-form-urlencoded

Parameters

channel

Call channel, to which you want to send the DTMF

dtmf

DTMF value, example: *1

Headers

Authorization

Basic md5secret

Request example

Answer

The answer will always be 1 even if the parameters are not valid. It will only be 0 if an internal error occurs on the server.