The Freshdesk Users APIs allow you perform user related activities in your Help Desk. Users in Freshdesk can mean contacts, customers, help desk administrators or agents.With these APIs, you can:
This API helps you to create new users in your help desk.
Request URL:domain_URL/contacts.xml
Request method: POST
<?xml version="1.0" encoding="UTF-8"?> <user> <name>Your User</name> <!--(Mandatory)--> <email>youruser@yourcompany.com</email> <!--(Mandatory)--> </user>
<?xml version="1.0" encoding="UTF-8" ?> <user> <active type="boolean">false</active> <created-at type="datetime">2012-12-12T16:26:34+05:30</created-at> <customer-id type="integer">2</customer-id> <deleted type="boolean">false</deleted> <email>test@abc.com</email> <external-id nil="true" /> <fb-profile-id nil="true" /> <id type="integer">16</id> <language>en</language> <name>Test</name> <time-zone>Chennai</time-zone> <updated-at type="datetime">2013-01-09T17:16:03+05:30</updated-at> <user-role type="integer">3</user-role> </user>
This API helps you to view all the users in your help desk.
Request URL:domain_URL/contacts.xml
Request method: GET
<?xml version="1.0" encoding="UTF-8"?> <users type="array"> <?xml version="1.0" encoding="UTF-8" ?> <user> <active type="boolean">false</active> <created-at type="datetime">2012-12-12T16:26:34+05:30</created-at> <customer-id type="integer">2</customer-id> <deleted type="boolean">false</deleted> <email>test@abc.com</email> <external-id nil="true" /> <fb-profile-id nil="true" /> <id type="integer">16</id> <language>en</language> <name>Test</name> <time-zone>Chennai</time-zone> <updated-at type="datetime">2013-01-09T17:16:03+05:30</updated-at> <user-role type="integer">3</user-role> </user> ... </users>
Note:
By default only verified users will be returned by “/contacts.xml” API. To view unverified users, append the “?state=all” parameter to the API url. See the below example for details:
GET {domain_url}/contacts.xml?state=all
This API helps you to view a particular user in your help desk.
Request URL:domain_URL/contacts/[id].xml
Request method: GET
<?xml version="1.0" encoding="UTF-8" ?> <user> <active type="boolean">false</active> <created-at type="datetime">2012-12-12T16:26:34+05:30</created-at> <customer-id type="integer">2</customer-id> <deleted type="boolean">false</deleted> <email>test@abc.com</email> <external-id nil="true" /> <fb-profile-id nil="true" /> <id type="integer">16</id> <language>en</language> <name>Test</name> <time-zone>Chennai</time-zone> <updated-at type="datetime">2013-01-09T17:16:03+05:30</updated-at> <user-role type="integer">3</user-role> </user>
This API helps you to modify an existing user in your help desk.
Request URL:domain_URL/contacts/[id].xml
Request method: PUT
<user> <name>Your User</name> <email>youruser@yourcompany.com</email> </user>
HTTP STATUS : 200 OK
This API helps you to delete a user from your help desk.
Request URL: domain_URL/contacts/[id].xml
Request method: DELETE
HTTP STATUS : 200 OK