API Documentation for Ubico

The Ubico API serves as an interface to allow customers to interact with their data generated within Ubico.

Philippe Kwiatkowski avatar
Written by Philippe Kwiatkowski
Updated over a week ago

API Reference

Endpoints

Endpoint

Description

/zapier/upsert-lead

Create or update a lead in Ubico

/zapier/mark-replied

Mark lead as ‘replied’

/zapier/move-lead

Move lead to another campaign

/zapier/remove-lead

Remove a lead from Ubico

/zapier/triggers/new_lead

Retrieves leads from Ubico, sorted by date.

/zapier/triggers/new_email_open

Retrieves opened emails from Ubico, sorted by date.

/zapier/triggers/new_conversation

Retrieves conversations from Ubico, sorted by date.

/zapier/triggers/new_reply

Retrieves replies from Ubico, sorted by date.

/zapier/triggers/new_email_bounced

Retrieves bounced emails from Ubico, sorted by date.

/zapier/triggers/new_email_classified

Retrieves classified emails from Ubico, sorted by date.

Request and Response Formats

POST /zapier/upsert-lead

Request:

POST /zapier/upsert-lead HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK 
Content-Type: application/json
{ "status": "Success" }

POST /zapier/mark-replied

Request:

POST /zapier/mark-replied HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK 
Content-Type: application/json
{ "status": "Success" }

POST /zapier/move-lead

Request:

POST /zapier/move-lead HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK 
Content-Type: application/json
{ "status": "Success" }

POST /zapier/remove-lead

Request:

POST /zapier/remove-lead HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK 
Content-Type: application/json
{ "status": "Success" }

GET /zapier/new_lead

Parameter

Type

Required

Description

page

number

No

Handles paginated search.

Request:

POST /zapier/new_lead?page=1 HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK Content-Type: application/json 
[
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john@doe.com",
"phone_number": 222-123-4567,
"company_name": "John Doe Inc."
},
{
"id": 2,
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@doe.com",
"phone_number": 222-123-4567,
"company_name": "Jane Doe Inc."
},
...
]

GET /zapier/new_email_open

Parameter

Type

Required

Description

page

number

No

Handles paginated search.

Request:

POST /zapier/new_email_open?page=1 HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK Content-Type: application/json 
[
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"count_opens": 20
},
{
"id": 2,
"first_name": "Jane",
"last_name": "Doe",
"count_opens": 30
},
...
]

GET /zapier/new_conversation

Parameter

Type

Required

Description

page

number

No

Handles paginated search.

Request:

POST /zapier/new_conversation?page=1 HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK Content-Type: application/json 
[
{
"id": 1,
"subject": "RE: Are you looking to review your sales process?",
"icp_name": "Campaign 1",
"icp_name_uuid": 11111-222222-333333
},
{
"id": 1,
"subject": "RE: Hey, are you going to the next conference?",
"icp_name": "Campaign 2",
"icp_name_uuid": 11111-222222-333333
},
...
]

GET /zapier/new_reply

Parameter

Type

Required

Description

page

number

No

Handles paginated search.

Request:

POST /zapier/new_reply?page=1 HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK Content-Type: application/json 
[
{
"id": 1,
"lead_email": "john@doe.com",
"category": "Replied: Interested",
"subject": "RE: Hey, are you going to the next conference?",
"icp_name": "Campaign 1"
},
{
"id": 1,
"lead_email": "jane@doe.com",
"category": "Replied: Not now",
"subject": "RE: Hey, are you going to the next conference?",
"icp_name": "Campaign 2"
},
...
]

GET /zapier/new_email_bounce

Parameter

Type

Required

Description

page

number

No

Handles paginated search.

Request:

POST /zapier/new_email_bounce?page=1 HTTP/1.1

Host: test.ubico.io

Response:

HTTP/1.1 200 OK Content-Type: application/json 
[
{
"id": 1,
"lead_email": "john@doe.com",
"thread_id": "bdhJH2djDJ21",
"icp_name": "Campaign 1",
"icp_name_uuid": "0000-1111-3333",
"category": "Replied: Interested",
"customer": "customer_name",
},
{
"id": 1,
"lead_email": "jane@doe.com",
"thread_id": "bdhJH2djDJ21",
"icp_name": "Campaign 1",
"icp_name_uuid": "0000-1111-3333",
"category": "Replied: Interested",
"customer": "customer_name",
},
...
]

GET /zapier/new_email_classified

Parameter

Type

Required

Description

page

number

No

Handles paginated search.

Request:

POST /zapier/new_email_classified?page=1 HTTP/1.1 
Host: test.ubico.io

Response:

HTTP/1.1 200 OK Content-Type: application/json 
[
{
"id": 1,
"lead_email": "john@doe.com",
"thread_id": "bdhJH2djDJ21",
"icp_name": "Campaign 1",
"icp_name_uuid": "0000-1111-3333",
"category": "Replied: Interested",
"customer": "customer_name",
},
{
"id": 1,
"lead_email": "jane@doe.com",
"thread_id": "bdhJH2djDJ21",
"icp_name": "Campaign 1",
"icp_name_uuid": "0000-1111-3333",
"category": "Replied: Interested",
"customer": "customer_name",
},
...
]

Authentication

To authenticate your request, you can use the provided API key from Ubico and place it in the header of your request, as following :

Request:

POST /zapier/new_email_classified?page=1 HTTP/1.1 
Host: test.ubico.io
Authorization: jfjdhhfuyhwihfkdjh834njb12j2nnjs!jnjebf123jbDF

Error Handling

If an error occurs while calling our API, you should get a response as following :

Response:

HTTP/1.1 400 OK Content-Type: application/json 

{"status": "Failure", "message": "This is an error message"

Conclusion

Any questions regarding Ubico’s API? Contact us at support@ubico.io.

Did this answer your question?