OnAutomate API V1.1.1
Welcome to onautomate Api docs.
Contact
This API will assist in creating a contact, update an existing one and in retrieving the contact list.
GET /v1/contacts/
https://link.amtssl.com/v1/contacts/?page=1
Get Contacts.
Filters:
1. query:
The value given in "query" will be searched in the following fields: [Name], [Phone],[Email], [Tags] and [Company Name].
Pagination:
This API will return the first 20 contacts that match criteria given in "query" by default. You can fetch the next 20 and more by passing the page number on the page params. You can see page info and total records count on to the [meta]
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
PARAMS
page
1
Page No
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/contacts/?page=1&query=John' \
--header 'Authorization: Bearer <token>'
Example Response
Bad Request. please contact support!
Unauthorized
400 Bad Request
Body
{
"msg": "Bad Request"
}
401 Unauthorized
Body
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful Response
200 OK
Headers
Content-Type: application/json
POST /v1/contacts/
https://link.amtssl.com/v1/contacts/
Create a contact.
This API accepts the following fields to create a contact. ex:
Fields:
Contact api also allows all custom fields. You can pass something like: customField: {"__id_of_your_customfield__": "value of custom fields"} or customField: {"__id_of_your_customfield__": ["value 1", "value 2"]}
Validation:
At the minimum, either Email or Phone is required to create a contact.
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer <token>
Token
<token>
HEADERS
Content-Type
application/json
BODY raw
{
"email": "john@deo.com",
"phone": "+18887324197",
"firstName": "John",
"lastName": "Deo",
"name": "John Deo",
"dateOfBirth": "1990-09-25",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"country": "US",
"postalCode": "35061",
"companyName": "DGS VolMAX",
"website": "35061",
"tags": [
"in sint et",
"pariatur nisi sint enim et"
],
"customField": {
"__custome_field_id__": "veniam mollit non"
}
}
Example Request
curl --location --request POST 'https://link.amtssl.com/v1/contacts/' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"email": "john@deo.com",
"phone": "+18887324197",
"firstName": "John",
"lastName": "Deo",
"name": "John Deo",
"dateOfBirth": "1990-09-25",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"country": "US",
"postalCode": "35061",
"companyName": "DGS VolMAX",
"website": "35061",
"tags": [
"deserunt minim cillum est",
"sunt adipisicing ea"
],
"customField": {
"__custome_field_id__": "consequ"
}
}'
Example Response
Unauthorized
Unprocessable Entity
Bad Request. please contact support!
401 Unauthorized
{
"msg": "Unauthorized"
}
422 Unprocessable Entity (WebDAV) (RFC 4918)
{
"email or phone": {
"message": "The email or phone field is mandatory.",
"rule": "required"
}
}
400 Bad Request
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful Response
200 OK
Body
Headers
Content-Type: application/json
GET /v1/contacts/lookup
https://link.amtssl.com/v1/contacts/lookup?email=john@deo.com
Search contact by email or phone number.
If you will pass email or phone, it will try find and give contacts based on that.
OR If you will pass both first it will try to find contact with email first and if it is not able to find contact then it will try to find the match based on the phone.
Authorization:
Provide your location api key (Bearer Token).
Validation:
Email or Phone are required to lookup contact.
AUTHORIZATION
Bearer Token
Token
<token>
PARAMS
john@deo.com
(Required) Contact email
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/contacts/lookup?email=john@deo.com&phone=+491971259866' \
--header 'Authorization: Bearer <token>'
Example Response
Unprocessable Entity
Bad Request. please contact support!
Unauthorized
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"email or phone": {
"message": "The email or phone field is mandatory.",
"rule": "required"
}
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful Response
200 OK
Body
Headers
Content-Type: application/json
GET/v1/contacts/:id
https://link.amtssl.com/v1/contacts/:id
AUTHORIZATION
Bearer Token
Token
<token>
PATH VARIABLES
id
ocQHyuzHvysMo5N5VsXc
(Required) Contact Id
Example Request
curl --location --request GET 'https://link.amtssl.com/v1/contacts/:id' \
--header 'Authorization: Bearer <token>'
Example Response
Unauthorized
Bad Request. please contact support!
Unprocessable Entity
401 Unauthorized
Body
{
"msg": "Unauthorized"
}
400 Bad Request
Body
{
"msg": "Bad Request"
}
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"id": {
"message": "The contact id is invalid.",
"rule": "invalid"
}
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful Response
200 OK
Body
{
"contact": {
"id": "ocQHyuzHvysMo5N5VsXc",
"locationId": "C2QujeCh8ZnC7al2InWR",
"email": "JohnDeo@gmail.com",
"emailLowerCase": "johndeo@gmail.com",
"fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
"timezone": "Asia/Calcutta",
"country": "DE",
"customField": [
{
"id": "MgobCB14YMVKuE4Ka8p1",
"value": "aute proident qui cupidatat consequat"
},
{
"id": "MgobCB14YMVKuE4Ka8p1",
"value": "in ut proident"
}
],
"tags": [
"min",
"incididunt aliqua dolore"
],
"__moreField__": "incididunt exercitation"
}
}
Headers
Content-Type: application/json
PUT /v1/contacts/:id
https://link.amtssl.com/v1/contacts/:id
Update a contact.
Update contact will allow this fields. ex:
Fields:
CustomField
Contact api also allowed all custom fields. You can pass something like: customField: {"__id_of_your_customfield__": "value of coustom fields"} or customField: {"__id_of_your_customfield__": ["value 1", "value 2"]}
Validation:
Email or Phone are required to update contact
Authorization:
Provide your location api key (Bearer Token).
AUTHORIZATION
Bearer Token
Token
<token>
HEADERS
Content-Type
application/json
PATH VARIABLES
id
ocQHyuzHvysMo5N5VsXc
(Required) Contact Id
BODY raw
{
"firstName": "John",
"lastName": "Deo",
"name": "John Deo",
"email": "john@deo.com",
"phone": "+18887324197",
"dateOfBirth": "1990-09-25",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"country": "US",
"postalCode": "35061",
"companyName": "DGS VolMAX",
"website": "35061",
"tags": [
"ea",
"non"
],
"customField": {
"__custome_field_id__": "magna qui incididunt"
}
}
Example Request
curl --location --request PUT 'https://link.amtssl.com/v1/contacts/:id' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"firstName": "John",
"lastName": "Deo",
"name": "John Deo",
"email": "john@deo.com",
"phone": "+18887324197",
"dateOfBirth": "1990-09-25",
"address1": "3535 1st St N",
"city": "Dolomite",
"state": "AL",
"country": "US",
"postalCode": "35061",
"companyName": "DGS VolMAX",
"website": "35061",
"tags": [
"deserunt Ut dolore",
"ut"
],
"customField": {
"__custome_field_id__": "occaecat nisi reprehenderit i"
}
}'
Example Response
Unprocessable Entity
Unauthorized
Bad Request. please contact support!
422 Unprocessable Entity (WebDAV) (RFC 4918)
{
"id": {
"message": "The contact id is invalid.",
"rule": "required"
}
}
401 Unauthorized
{
"msg": "Unauthorized"
}
400 Bad Request
{
"msg": "Bad Request"
}
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Successful Response
{
"contact": {
"id": "ocQHyuzHvysMo5N5VsXc",
"locationId": "C2QujeCh8ZnC7al2InWR",
"email": "JohnDeo@gmail.com",
"emailLowerCase": "johndeo@gmail.com",
"fingerprint": "91f4f0e0-e2dd-11ea-9b16-53b2d72e8a24",
"timezone": "Asia/Calcutta",
"country": "DE",
"customField": [
{
"id": "MgobCB14YMVKuE4Ka8p1",
"value": "aute proident qui cupidatat consequat"
},
{
"id": "MgobCB14YMVKuE4Ka8p1",
"value": "in ut proident"
}
],
"tags": [
"min",
"incididunt aliqua dolore"
],
"__moreField__": "incididunt exercitation"
}
}
Headers
Content-Type: application/json
DEL /v1/contacts/:id
https://link.amtssl.com/v1/contacts/:id
AUTHORIZATION
Bearer Token
PATH VARIABLES
id
ocQHyuzHvysMo5N5VsXc
(Required) Contact Id
Example Request
curl --location --request DELETE 'https://link.amtssl.com/v1/contacts/:id' \
--header 'Authorization: Bearer <token>'
Example Response
Bad Request. please contact support!
Unprocessable Entity
Unauthorized
Successful response
400 Bad Request
Body
{
"msg": "Bad Request"
}
422 Unprocessable Entity (WebDAV) (RFC 4918)
Body
{
"id": {
"message": "The contact id is invalid.",
"rule": "invalid"
}
}
400 Bad Request
Body
{
"msg": "Unauthorized"
}
400 Bad Request
Body
No response body
This request doesn't return a response body
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: application/json
Headers
Content-Type: text/plain