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:
X-Api-Key: <team-api-key>
Content-Type: application/jsonBase URL: https://api.ticketping.com
Create a ticket
POST /api/v1/team-ticket/create/
| Field | Required | Meaning |
|---|---|---|
email | Yes | Customer address. Used when you reply. |
messageText | Yes | What the customer asked. Stored on the ticket. Not emailed. |
externalId | No | Your user id. Reused the next time you open a ticket for the same person. |
displayName | No | Name shown in the Ticketping dashboard. |
subject | No | Short subject. |
assignee | No | Team member id to assign. Leave it out to use auto-assign. |
notifyCustomer | No | Default 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. |
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"
}'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();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.
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.
| Field | Required | Meaning |
|---|---|---|
ticketId | Yes | Ticket number from the create response. |
messageText | Yes | The reply. |
agentSid | No | Team member who is writing. If you omit it, the reply is from a system agent named like Acme Support. |
isPrivate | No | true keeps it as an internal note. Private notes are not emailed. |
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"
}'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",
}),
});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.