Skip to content

Automation API

This API allows you to automate contact management in uContact's Outbound Hubs. Through its endpoints, you can upload contact lists for campaigns and fresh leads for priority contacts that need to be processed immediately or at a specific date and time. It supports multiple communication channels including telephony, email, SMS, and WhatsApp.

Upload list

This endpoint is used to upload a new list to an existing outbound hub

  • Method: POST
  • URL: https://<domain>.ucontactcloud.com/api/dialer/id/<hubName>/lists

General description

The endpoint begins the upload of a list for an existing outbound hub. Once created, the list is set to a status of loading while the contacts in the list are uploaded asynchronously afterwards. Once all contacts have been saved in the database the list is set as inactive.

Request Body

The body of the request is used to specify the name of the list, and the contacts in the list.

  • Content-Type: application/json
  • Body: A JSON object containing:
    • a filename key. The value of filename is a string with the name of the list.
    • a list key. The value of list is an array containing an object of each contact.

For a telephony hub:

json
{
  "filename": "June sales clients",
  "list": [
    {
      "clientIds": ["1567890", "1234567"]
    },
    {
      "clientIds": ["1987789"]
    }
  ]
}

For an email hub:

json
{
  "filename": "June sales clients",
  "list": [
    {
      "clientId": "johnsmith@mail.com"
    },
    {
      "clientId": "janesmith@mail.com"
    }
  ]
}

The specification for the full object of a contact is in the section Contacts

Fresh leads

This endpoint is used to upload fresh leads to an existing outbound hub

  • Method: POST
  • URL: https://<domain>.ucontactcloud.com/api/dialer/id/<hubName>/freshLeads

General description

The endpoint uploads a list of leads, these are contacts we want to reach as soon as possible or at a specific date and time, the request will complete once all contacts have been saved in the database, it is expected that the lists of leads uploaded with this endpoint are smaller than a list we would upload normally.

The uploaded leads can be seen in the hub's dashboard as scheduled, these contacts will be processed with priority over other lists.

For each lead we can specify a scheduleDate and timezone to indicate when we want to send the message or start a call with the contact, if we don't specify a scheduleDate the contact will be called as soon as possible (when the campaign is on time, and in the case of telephony there are available agents to take the call).

Request Body

The body of the request is used to specify the leads to process.

  • Content-Type: application/json
  • Body: A JSON object containing:
    • a leads key. The value of leads is an array containing an object of each contact.

For a telephony hub:

json
{
  "leads": [
    {
      "clientIds": ["1567890", "1234567"],
      "timezone": "America/Montevideo",
      "scheduleDate": "2025-11-03 11:54:00"
    },
    {
      "clientIds": ["1987789"]
    }
  ]
}

For an email hub:

json
{
  "leads": [
    {
      "clientId": "johnsmith@mail.com",
      "timezone": "America/Montevideo",
      "scheduleDate": "2025-11-03 11:54:00"
    },
    {
      "clientId": "janesmith@mail.com"
    }
  ]
}

The specification for the full object of a contact is in the section Contacts

Contacts

Contacts in the lists are received by uContact as JSON objects with different properties depending on the type of outbound hub and if it is uploaded from the fresh leads endpoint or not.

General properties

These properties are used for all contacts

PropertyTypeDescriptionExample
timezoneString (optional)Specifies the timezone the contact is in, calls will be made in the hub's schedule in this timezone.America/Montevideo
dataObject (optional)A json object with any information relevant to the contact, can be accessed in forms and is shown in the interaction's details page{"name":"John Smith", "birthday":"2003-06-08"}
priorityInteger (optional)An integer indicating the priority of the contact, the lower the number the sooner the contact will be processed, by default it is set to 067
contactIdString (optional)The id that identifies a client regardless of clientId, could be obtained from the ucrm1365

Telephony properties

These properties are used for all telephony hub contacts

PropertyTypeDescriptionExample
clientIdsArray[Integer] (required)An array containing all the client's numbers we want to call["+1 (425) 671-5523","+1 (312) 548-7701"]

Preview properties

These properties are used only for preview hub contacts

PropertyTypeDescriptionExample
agentString (optional)Username of the user we want to handle this contact, all calls with this client will be assigned to this usermy_best_agent

Channels properties

These properties are used for all channels hub contacts (sms, whatsapp and email)

PropertyTypeDescriptionExample
contentString (optional)The message we want to send, if it is not specified the hub's default template will be sentHello, this is a message sent automatically from uContact's outbound hubs!
templateString (optional)The name of a template created in the system, will be sent instead of the hub's default template if specifiedsales_awesome_template

Email properties

These properties are used only for email hub contacts

PropertyTypeDescriptionExample
clientIdString (required)The email where the message will be sent tojohn.smith@mycompany.net
subjectString (optional)The subject of the mail we send, if it is not specified the hub's default subject will be usedVery important matter
attachmentsArray[String] (optional)An array containing the paths to the attachments added in the hub's dashboard, these can be obtained in the attachments section of the hub's dashboard["20251103/06ee53cc-0a90-4f18-8d07-09cc73910293-my_image.png"]

Whatsapp/Sms properties

These properties are used only for whatsapp or sms hub contacts

PropertyTypeDescriptionExample
clientIdString (required)The phone number where the message will be sent to+1 (312) 548-7701

Fresh leads properties

These properties are used for all fresh leads contacts

PropertyTypeDescriptionExample
scheduleDateString (optional)The date, in format yyyy-MM-dd HH:mm:ss, when we want to contact the contact. If a timezone is also specified this date will use it2025-12-25 00:00:00

uContact by net2phone