You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
Sample API requests using Python
print icon

Prerequisites:

  1. API doc - Read here

  2. How to get API key and Auth Code - Read here

Examples:

Read Tickets

url = https://<subdomain>.happyfox.com/api/1.1/json/tickets/
auth = ('<apli_key>','<auth_code>')
res = requests.get(url,auth=auth)

 

Create a New ticket

import requests
import json
url = https://<subdomain>.happyfox.com/api/1.1/json/tickets/
auth = ('<apli_key>','<auth_code>')
headers = {'Content-Type': 'application/json'}
payload = {'subject': 'test subject', 'text': 'This is a test ticket', 'category': 1, 'priority': 2, 'email': 'test@example.com', 'name': 'Test Customer'}
res = requests.post(url,auth=auth,data=json.dumps(payload), headers=headers)

Feedback
5 out of 6 found this helpful

scroll to top icon