- Add Contact
- Edit Contact
- Get Contact Information
- Get Contact Listing
- Delete Contact
- Add Contact Group
- Edit Contact Group
- Get Contact Group Information
- Get Contact Group Listing
- Delete Contact Group
- Add Contact to a Group
- Delete Contact from a Contact Group
- Error Codes
Add Contact
This API is used to add a new contact.
- API Route: https://api.enablex.io/ucaas/v1/contacts
- HTTP Request: POST
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Request Example (OAuth2):
POST https://api.enablex.io/ucaas/v1/contacts Content-Type: application/json Authorization: Token ACCESS_TOTKEN { "group_ids": [ "OBJECT_ID_OF GROUP" ], "name": "String", "email": "String", "company": "String", "designation": "String", "shared": "Boolean" }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
group_ids | Array | Optional | Array of Group-Ids to which the new contact is to be linked. |
name | String | Required | Full name of the Contact. |
email | String | Required | Email id of the contact. Unique in the User’s Contact List. |
company | String | Optional | |
designation | String | Optional |
Response Example:
{ "result": 1, "msg": "$name has been added to Contact List", "contact": { "contact_id": "String", "name": "String" } }
Edit Contact
This API is used to update Contact’s Profile.
- API Route: https://api.enablex.io/ucaas/v1/contacts/{{$CONTACT_ID}}
- HTTP Request: PATCH
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Request Example (OAuth2):
PATCH https://api.enablex.io/ucaas/v1/contacts/{{$CONTACT_ID}} Content-Type: application/json Authorization: Token ACCESS_TOTKEN { "name": "String", "email": "String", "company": "String", "designation": "String", "shared": "Boolean" }
Raw Body JSON Payload Explanation:
All data fields are optional while updating. Use only those fields which you look to update.
Object/Key | Data Type | Required | Description |
name | String | Optional | Full name of the Contact. |
email | String | Optional | Email id of the contact. Unique in the User’s Contact List. |
company | String | Optional | |
designation | String | Optional |
Response Example:
{ "result": 1, "msg": "Information for $name has been updated", "contact": { "contact_id": "String", "name": "Sting" } }
Get Contact Information
This API is used to get Information of a given Contact ID
- API Route: https://api.enablex.io/ucaas/v1//contacts/{{$CONTACT_ID}}
- HTTP Request: GET
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Response Example:
GET https://api.enablex.io/ucaas/v1/contacts/{{$CONTACT_ID}} Content-Type: application/json Authorization: Token ACCESS_TOTKEN { "result": 1, "contact": { "contact_id": "String", "name": "String", "email": "String", "company": "String", "designation": "String", "created_at": "Date", "updated_at": "Date" } }
Get Contact Listing
This API is used to search or get listing of all the Contacts.
- API Route:
- https://api.enablex.io/ucaas/v1/contacts
- https://api.enablex.io/ucaas/v1/contacts?page={{$PAGE_NUM}}
- HTTP Request: GET
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
URL Placeholder Explanation:
Object/Key | Data Type | Required | Description |
page | Number | Optional | Data return requested for the Page. Default 1. |
page_length | Number | Optional | Total Records to include in a page. Default 10. |
search_by | String | Optional | Required if “search_string” is used. Use any of the enumerated values: o name: On name field o email: On email field o company: On company field o designation: On designation field |
search_string | String | Optional | Required with search_by. |
order_by | String | Optional | Database field names. |
order_qualify | String | Optional | Default “asc”. Enumerated values: asc, desc. |
Request Example (OAuth2):
GET https://api.enablex.io/ucaas/v1/contacts?page={{$PAGE_NUM}} Content-Type: application/json Authorization: Token ACCESS_TOTKEN
Response Example:
{ "result": 1, "search": { "page": "Number", "page_length": "Number", "search_by": "String", "search_string": "String", "order_by": "String", "order_qualify": "String" }, "contacts": [ { "contact_id": "String", "name": "String", "email": "String", "company": "String", "designation": "String", "created_at": "Date", "updated_at": "Date" } ] }
Delete Contact
This API is used to delete contact of a given Contact ID.
- API Route: https://api.enablex.io/ucaas/v1/contact/{{$CONTACT_ID}}
- HTTP Request: DELETE
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Request Example (OAuth2):
DELETE https://api.enablex.io/ucaas/v1/contacts/{{$CONTACT_ID}} Content-Type: application/json Authorization: Token ACCESS_TOTKEN
Response Example:
{ "result": 1, "msg": "$name has been deleted from Contact List", "contact": { "contact_id": "String", "name": "String" } }
Add Contact Group
This API is used to add a new contact group.
- API Route: https://api.enablex.io/ucaas/v1/contact-groups
- HTTP Request: POST
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Request Example (OAuth2):
POST https://api.enablex.io/ucaas/v1/contact-groups Content-Type: application/json Authorization: Token ACCESS_TOTKEN { "group_name": "String" }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
group_name | String | Required | Group name. |
Response Example:
{ "result": 1, "msg": "Group $group_name has been added", "group": { "group_id": "String", "group_name": "String" } }
Edit Contact Group
This API is used to update Contact Group Information.
- API Route: https://api.enablex.io/ucaas/v1/contact-groups/{{$GROUP_ID}}
- HTTP Request: PATCH
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Request Example:
{ "group_name": "String" }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
group_name | String | Required | Group name. |
Response Example:
{ "result": 1, "msg": "Group $group_name has been updated", "contact": { "group_id": "String", "group_name": "Sting", "created_at": "Date", "updated_at": "Date" } }
Get Contact Group Information
This API is used to get information about a given Group ID.
- API Route: https://api.enablex.io/ucaas/v1/contact-groups/{{$GROUP_ID}}
- HTTP Request: GET
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Response Example:
{ "result": 1, "group": { "group_id": "String", "group_name": "String", "contacts": [ { "contact_id": "String", "name": "String", "added_at": "Date" } ] } }
Get Contact Group Listing
This API is used to search or get listing of all Contact Groups.
- API Route:
- https://api.enablex.io/ucaas/v1/contact-groups
- https://api.enablex.io/ucaas/v1/contact-groups?page={{$PAGE_NUM}}
- HTTP Request: GET
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
page | Number | Optional | Data return requested for the Page. Default 1. |
page_length | Number | Optional | Total Records to include in a page. Default 10. |
search_by | String | Optional | Required if “search_string” is used. Use any of the enumerated values: o group_name: On name field |
search_string | String | Optional | Required with search_by. |
order_by | String | Optional | Database field names. |
order_qualify | String | Optional | Default “asc”. Enumerated values: asc, desc. |
Response Example:
{ "result": 1, "search": { "page": "Number", "page_length": "Number", "search_by": "String", "search_string": "String", "order_by": "String", "order_qualify": "String" }, "groups": [ { "group_id": "String", "group_name": "String", "created_at": "Date", "updated_at": "Date" } ] }
Delete Contact Group
This API is used to delete a given contact Group.
- API Route: https://api.enablex.io/ucaas/v1/contact-groups/{{$GROUP_ID}}
- HTTP Request: DELETE
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Response Example:
{ "result": 1, "msg": "Group $name has been deleted", "group": { "group_id": "String", "group_name": "String" } }
Add Contact to a Group
This API is used to add new contact(s) to a group.
- API Route: https://api.enablex.io/ucaas/v1/contact-groups/{{$GROUP_ID}}
- HTTP Request: PATCH
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.X-License
:add-contact
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Request Example:
{ "contact_ids": [ "String" ] }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
contact_ids | Object IDs | Required | Array of Contact IDs to be added to a group |
Response Example:
{ "result": 1, "msg": "#Total Contact(s) are added to the Group $group_name", "group": { "group_id": "String", "group_name": "String", "contacts": [ { "contact_id": "String", "name": "String", "added_at": "Date" } ] } }
Delete Contact from a Contact Group
This API is used to delete contact(s) from a Contact Group.
- API Route: https://api.enablex.io/ucaas/v1/contact-groups/{{$GROUP_ID}}
- HTTP Request: PATCH
Headers Explanation:
Content-Type
: To haveapplication/json
to notify that the body content is in JSON.X-License
:delete-contact
Accessibility:
- Reseller Admin
- EnableX Admin
- Customer
- User
Request Example:
{ "contact_ids": [ "String" ] }
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
contact_ids | Object IDs | Required | Array of Contact IDs to be deleted from the group |
Response Example:
{ "result": 1, "msg": "#Total Contact(s) are deleted to the Group $group_name", "group": { "group_id": "String", "group_name": "String", "contacts": [ { "contact_id": "String", "name": "String", "added_at": "Date" } ] } }
Error Codes
Error Code | Description |
---|---|
1701 | Group IDs must be given in the form of an array |
1702 | The group IDs array must have at least one item in them |
1711 | Name field is required |
1712 | Name must contain minimum 3 characters |
1713 | Name must contain maximum 50 characters |
1714 | Name must be a string |
1721 | The email already exists, use a different email ID |
1722 | The email must be a valid email address |
1723 | The email must be a valid string |
1724 | Email field is required |
1725 | The email must have maximum 100 characters |
1731 | Company name name must be a string |
1732 | The company name must not be greater than 100 characters |
1733 | The company name must be at least 5 characters |
1741 | The designation must be a string |
1742 | Designation must not be greater than 100 characters |
1743 | Designation must have at least 5 characters |
1802 | Group name must be at least 3 characters |
1803 | Group name must be less than 100 characters |
1804 | Group name must be a string |
1805 | The group name has already been used please enter a different name |
1810 | The group name must be unique and should not have been used |
1811 | Contact IDs are required to add contact to a contact group |
1812 | Contact IDs must be an array |
1818 | Invalid group ID is used |