A contact refers to either an existing customer or a potential customer who has initiated a support ticket through any available communication channel in our Output Desk system.
Url: /api/create/contact
Method: Post
Parameters:
Attribute | Type | Description |
---|---|---|
name | string(Required) | Name of the contact |
string(Required) | Primary email address of the contact | |
phone | string(Optional) | Name of the contact |
company | string(Optional) | Company name of the contact |
website | string(Optional) | Website address of the contact |
notes | string(Optional) | Notes about contact |
To add a new contact
curl -k -X POST -H “Accesskey-od:{operator accesskey}” ‘{your domain url}/api/create/contact’ -H “Content-Type: application/json” –data ‘{ “name”: “Edward”, “email”: “Edward@desk.com”, “phone”:”8572733103″ }’
Success Response:
“description”:”Contact Added“,
“result”: {
“name”:”Edward“,
“email”:”Edward@desk.com“,
“phone”:”8572733103“,
“first_contacted_on”: “2023-09-07T09:58:39.000Z”,
“last_contacted_on”: “2023-09-07T09:58:39.000Z”,
“updated_by”: { id: ‘0’, email: ‘System’ },
“ctype”:“C”
“accesskey”:“80e20b76697ef77fcac10c2b0ca78ed7”
}
}
Possible Error Responses:
“description”:”Contacts Already Exists!“
}
“description”:”Phone Already Exists!“
}
“description”:”Access Key is invalid!“
}
Url: /api/create/contact
Method: Post
Parameters:
Attribute | Type | Description |
---|---|---|
name | string(Required) | Name of the contact |
string(Required) | Primary email address of the contact | |
phone | string(Optional) | Name of the contact |
company | string(Optional) | Company name of the contact |
website | string(Optional) | Website address of the contact |
notes | string(Optional) | Notes about contact |
To update a contact
curl -k -X POST -H “Accesskey-od:{operator accesskey}” ‘{your domain url}/api/update/contact/{contact accesskey}’ -H “Content-Type: application/json” –data ‘{ “name”: “Edward Nelson” }’
Success Response:
“description”:”Contact was updated successfully“,
“result”: {
“name”:“Edward Nelson”,
“email”:“Edward@desk.com”,
“phone”:“8572733103”,
“first_contacted_on”: “2023-09-07T09:58:39.000Z”,
“last_contacted_on”: “2023-09-07T10:53:42.000Z”,
“updated_by”: { id: ‘0’, email: ‘System’ },
“ctype”:“C”
}
}
Error Response:
“description”:”Invalid Contact!“
}
Url: /api/list/contacts/{pageno}/{pagesize}
Method: Get
To update a contact
curl -k -X GET -H “Accesskey-od:{operator accesskey}” ‘{your domain url}/api/list/contacts/1/20′
Response:
“result”: [{
“name”:”Edward Nelson“,
“email”:”Edward@desk.com“,
“phone”:”8572733103“,
“first_contacted_on”: “2023-09-07T09:58:39.000Z”,
“last_contacted_on”: “2023-09-07T10:53:42.000Z”,
“accesskey”: “ecf54cd124befd”,
},{
“name”:”John“,
“email”:”John@desk.com“,
“phone”:”8572733104“,
“first_contacted_on”: “2023-09-07T09:59:39.000Z”,
“last_contacted_on”: “2023-09-07T09:59:39.000Z”,
“accesskey”: “kre54cd178be9d”,
}…]
}
Url: /api/get/contact/{contactemail}
Method: Get
To update a contact
curl -k -X GET -H “Accesskey-od:{operator accesskey}” ‘{your domain url}/api/get/contact/{contact email}’
Response:
“result”: [{
“name”:“Edward Nelson”,
“email”:“Edward@desk.com”,
“phone”:“8572733103”,
“first_contacted_on”: “2023-09-07T09:58:39.000Z”,
“last_contacted_on”: “2023-09-07T10:53:42.000Z”,
}
}