Skip to content

Instantly share code, notes, and snippets.

@henshaw
Created August 2, 2026 19:27
Show Gist options
  • Select an option

  • Save henshaw/1fd8925982e855db48da740ab6d5d2c3 to your computer and use it in GitHub Desktop.

Select an option

Save henshaw/1fd8925982e855db48da740ab6d5d2c3 to your computer and use it in GitHub Desktop.
Essential Support – Creates a support ticket
curl -sS -X POST https://YOUR-WORKSPACE.essential.support/api/tickets \
-H "Authorization: Bearer $ES_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"dana@customer.com","externalId":"u_9","subject":"Cannot export","message":"Export spins forever.","priority":"high"}'
@henshaw

henshaw commented Aug 2, 2026

Copy link
Copy Markdown
Author

It creates a support ticket in Essential Support from a server, using the API.

Piece by piece:

  • curl -sS -X POST …/api/tickets — sends an HTTP POST request to the ES "create ticket" endpoint. -s silences the progress meter; -S still shows an error if it fails.
  • -H "Authorization: Bearer $ES_API_KEY" — authenticates the request with your workspace's secret API key (read from an environment variable, so the key isn't hard-coded).
  • -H "Content-Type: application/json" — tells the server the body is JSON.
  • -d '{…}' — the ticket details being submitted: the customer's email, your own user ID for them (externalId, which marks them as a verified customer), a subject, the message body, and a priority of high.

In plain terms: "Authenticated as my workspace, file a new high-priority ticket for customer dana@customer.com titled 'Cannot export' with the message 'Export spins forever.'" On success the API returns the created ticket (its id, ref, status, etc.) as JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment