Create Support Ticket
Create a new support ticket. Optionally assign it to a specific admin by name or email; otherwise it is assigned to all admin users.
https://api-v3.sweeppea.com/tickets/create
Description
Creates a new support ticket for the authenticated user. Each ticket receives a unique 7-digit case number and an initial system note indicating it was created via API v3.
Assignment behaviour:
- Without
AssignTo— the ticket is assigned to all admin users (default behaviour). - With
AssignTo— the system resolves ONE admin user, trying in order: exact email (case-insensitive) → exact full name or username (case-insensitive) → whole words of the name ("martin"matches"Martin Gaido"but not"Marcos Martinez") → partial name. The first stage with a single match wins and the ticket is assigned exclusively to that admin. If a stage matches more than one admin, a 400 error lists theCandidatesso the caller can retry with the full name or the email. If nothing matches, a 400 error is returned.
Platform: Platform sets the product the ticket is about (the same list as the web ticket form). It is case-insensitive and defaults to general.
Note: Only users with admin-level access can be assigned to tickets. Regular users are not eligible.
Authentication
This endpoint requires Bearer token authentication via the Authorization header.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
Title |
String | Yes | Ticket subject/title (max 200 characters) |
Description |
String | Yes | Detailed description of the issue (max 20,000 characters) |
Priority |
Number | Yes | Priority level: 1 (Low), 2 (Medium), 3 (High) |
Platform |
String | No | Platform the ticket is about. One of: general, renaissance, overture, winners, soprano, symphony, sonata, papyrus, website, blog, enewsletter, socialmedia, api, aws, shopify, instakes, mcp-server, sweeppea-cli, n8n, other. Case-insensitive; common spellings (Shopify App, mcp, cli, Command Line Interface (CLI)) are aliased. Defaults to general. |
AssignTo |
String | No | Email, full name or username of the admin user to assign this ticket to exclusively. If omitted, the ticket is assigned to all admins. See the resolution order above. |
Code Examples
curl -X POST "https://api-v3.sweeppea.com/tickets/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Title": "Issue with sweepstakes entry",
"Description": "Users are unable to submit entries on the mobile version of the entry page",
"Priority": 2
}'
curl -X POST "https://api-v3.sweeppea.com/tickets/create" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Title": "Issue with sweepstakes entry",
"Description": "Users are unable to submit entries on the mobile version of the entry page",
"Priority": 2,
"Platform": "renaissance",
"AssignTo": "support@yourdomain.com"
}'
const response = await fetch('https://api-v3.sweeppea.com/tickets/create', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Title: 'Issue with sweepstakes entry',
Description: 'Users are unable to submit entries on the mobile version of the entry page',
Priority: 2,
Platform: 'renaissance', // optional, defaults to 'general'
AssignTo: 'support@yourdomain.com' // optional
})
});
const data = await response.json();
console.log(data);
import requests
url = "https://api-v3.sweeppea.com/tickets/create"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"Title": "Issue with sweepstakes entry",
"Description": "Users are unable to submit entries on the mobile version of the entry page",
"Priority": 2,
"Platform": "renaissance", # optional, defaults to "general"
"AssignTo": "support@yourdomain.com" # optional
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Response
201 Created
When AssignTo is omitted, AssignedTo is null (assigned to all admins). When a specific admin is matched, AssignedTo contains their name and email.
{
"Response": true,
"Message": "Ticket Created Successfully",
"Data": {
"CaseNumber": "2650478",
"Subject": "Issue with sweepstakes entry",
"Priority": 2,
"ResourceAffected": "renaissance",
"AssignedTo": {
"FullName": "Admin User",
"Email": "support@yourdomain.com"
},
"CreationDate": "2026-01-26T12:32:29.600Z",
"Status": "Open"
},
"Telemetry": {
"DataConsumed": 0,
"APICalls": 142,
"MaxAPICalls": 100000
}
}
Error Responses
{
"Response": false,
"Message": "Missing Required Fields: Title, Description and Priority are required",
"Code": 400,
"Help": {
"ExpectedBody": {
"Title": "string (required) — Ticket subject/title, max 200 characters",
"Description": "string (required) — Detailed description of the issue, max 20,000 characters",
"Priority": "number (required) — Priority level: 1 (Low), 2 (Medium), 3 (High)",
"Platform": "string (optional) — Platform the ticket is about. One of: general, renaissance, ... Defaults to \"general\".",
"AssignTo": "string (optional) — Email, full name or username of an admin user to assign the ticket to exclusively..."
}
}
}
{
"Response": false,
"Message": "Invalid Priority Value. Must be 1 (Low), 2 (Medium), or 3 (High)",
"Code": 400
}
{
"Response": false,
"Message": "Invalid Platform value. Must be one of: general, renaissance, overture, winners, soprano, symphony, sonata, papyrus, website, blog, enewsletter, socialmedia, api, aws, shopify, instakes, mcp-server, sweeppea-cli, n8n, other",
"Code": 400
}
{
"Response": false,
"Message": "\"alex\" matches more than one admin user (Alex Smith, Alex Johnson). Provide the full name or the email of the admin to assign.",
"Code": 400,
"Candidates": ["Alex Smith", "Alex Johnson"]
}
{
"Response": false,
"Message": "No admin user found matching \"support@yourdomain.com\". Only admin users can be assigned to tickets. Provide a valid admin name or email.",
"Code": 400
}
{
"Response": false,
"Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN",
"Code": 401
}
{
"Response": false,
"Message": "Invalid API token. It does not match any account.",
"Code": 403
}
{
"Response": false,
"Message": "User Not Found",
"Code": 404
}
{
"Response": false,
"Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
"Code": 500
}