Create tickets

Open a ticket for a customer from your own app

Use a team API key when you want to create tickets from your own backend, mobile app, or dashboard, instead of the chat widget.

The customer is the requester. They are not emailed when the ticket is created. The first public reply is the email that opens the thread, so their answer comes back into the same ticket.

API key

An owner or admin creates a key in Settings → API keys. The full key is shown once. Store it on your server.

Send it on every request:

http
X-Api-Key: <team-api-key>
Content-Type: application/json

Base URL: https://api.ticketping.com

The key belongs to the whole team. Do not put it in a mobile app, a browser, or a public repo.

Create a ticket

POST /api/v1/team-ticket/create/

FieldRequiredMeaning
emailYesCustomer address. Used when you reply.
messageTextYesWhat the customer asked. Stored on the ticket. Not emailed.
externalIdNoYour user id. Reused the next time you open a ticket for the same person.
displayNameNoName shown in the Ticketping dashboard.
subjectNoShort subject.
assigneeNoTeam member id to assign. Leave it out to use auto-assign.
notifyCustomerNoDefault false. Set true only when messageText is the customer’s own words and you want the “we received your message” email. That email starts the reply thread immediately.
bash
curl -X POST https://api.ticketping.com/api/v1/team-ticket/create/ \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: $TICKETPING_API_KEY" \
  -d '{
    "email": "customer@example.com",
    "externalId": "user-9",
    "displayName": "Gohan",
    "subject": "Invoice",
    "messageText": "I was charged twice"
  }'
ts
const response = await fetch("https://api.ticketping.com/api/v1/team-ticket/create/", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": process.env.TICKETPING_API_KEY,
  },
  body: JSON.stringify({
    email: "customer@example.com",
    externalId: "user-9",
    displayName: "Gohan",
    subject: "Invoice",
    messageText: "I was charged twice",
  }),
});

const ticket = await response.json();
py
import os
import requests

response = requests.post(
    "https://api.ticketping.com/api/v1/team-ticket/create/",
    headers={"X-Api-Key": os.environ["TICKETPING_API_KEY"]},
    json={
        "email": "customer@example.com",
        "externalId": "user-9",
        "displayName": "Gohan",
        "subject": "Invoice",
        "messageText": "I was charged twice",
    },
)
ticket = response.json()

The response is the ticket, including ticketId. Your team sees it in the dashboard and in Slack. Nothing is sent to the customer.

Agents can also open a ticket from the dashboard with the **New** button on the ticket list. That uses the same path and does not email the customer.

Reply

POST /api/v1/team-reply/create/

A public reply is emailed to the customer from your support address. Their reply to that email lands on this ticket.

FieldRequiredMeaning
ticketIdYesTicket number from the create response.
messageTextYesThe reply.
agentSidNoTeam member who is writing. If you omit it, the reply is from a system agent named like Acme Support.
isPrivateNotrue keeps it as an internal note. Private notes are not emailed.
bash
curl -X POST https://api.ticketping.com/api/v1/team-reply/create/ \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: $TICKETPING_API_KEY" \
  -d '{
    "ticketId": "42",
    "messageText": "We refunded the second charge.",
    "agentSid": "team-member-sid"
  }'
ts
await fetch("https://api.ticketping.com/api/v1/team-reply/create/", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-Api-Key": process.env.TICKETPING_API_KEY,
  },
  body: JSON.stringify({
    ticketId: "42",
    messageText: "We refunded the second charge.",
    agentSid: "team-member-sid",
  }),
});
py
import os
import requests

requests.post(
    "https://api.ticketping.com/api/v1/team-reply/create/",
    headers={"X-Api-Key": os.environ["TICKETPING_API_KEY"]},
    json={
        "ticketId": "42",
        "messageText": "We refunded the second charge.",
        "agentSid": "team-member-sid",
    },
)

What not to use

POST /api/v1/my-tickets/ is the public web form. It always emails “we received your message” and marks the ticket as a web form submission. Use team-ticket/create/ when you are opening a ticket for someone.