Create To-Do
Create a new To-Do item. Admin access required.
POST
https://api-v3.sweeppea.com/tickets/createTodo
Description
This endpoint creates a new To-Do item in the system. It is restricted to admin users only. On success, it returns the full created To-Do document including the generated TodoToken and CreationDate.
Authentication & Authorization
🛡️
Admin Only
This endpoint is restricted to administrator accounts. Regular users will receive a 403 Forbidden response.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
Title |
string | ✅ Yes | Title of the To-Do (max 200 characters) |
Priority |
number | ✅ Yes | 1 = Low, 2 = Medium, 3 = High |
Description |
string | No | Detailed description of the To-Do (max 20,000 characters) |
ResourceAffected |
string | No | Resource this To-Do relates to (e.g. "renaissance", "api", "aws", "general"). Defaults to "general" |
Pin |
boolean | No | Pin this To-Do to the top. Defaults to false |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
Title |
String | Yes | Title of the To-Do (max 200 characters) |
Priority |
Number | Yes | 1 = Low, 2 = Medium, 3 = High |
Description |
String | No | Detailed description of the To-Do (max 20,000 characters) |
ResourceAffected |
String | No | Resource this To-Do relates to (e.g. "renaissance", "api", "aws", "general"). Defaults to "general" |
Pin |
Boolean | No | Pin this To-Do to the top. Defaults to false |
Code Examples
curl -X POST "https://api-v3.sweeppea.com/tickets/createTodo" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Title": "Deploy new API endpoint",
"Priority": 3,
"Description": "Deploy the createTodo lambda to production",
"ResourceAffected": "api",
"Pin": false,
"Deadline": "2025-12-31"
}'
const response = await fetch('https://api-v3.sweeppea.com/tickets/createTodo', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
Title: 'Deploy new API endpoint',
Priority: 3,
Description: 'Deploy the createTodo lambda to production',
ResourceAffected: 'api',
Pin: false,
Deadline: '2025-12-31'
})
});
const data = await response.json();
console.log(data);
import requests
import json
url = "https://api-v3.sweeppea.com/tickets/createTodo"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
payload = {
"Title": "Deploy new API endpoint",
"Priority": 3,
"Description": "Deploy the createTodo lambda to production",
"ResourceAffected": "api",
"Pin": False,
"Deadline": "2025-12-31"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.json())
Response
{
"Response": true,
"Data": {
"TodoToken": "uuid-v4-string",
"CreationDate": "2025-06-01T10:00:00.000Z",
"Deadline": "2025-12-31T00:00:00.000Z",
"Title": "Deploy new API endpoint",
"Description": "Deploy the createTodo lambda to production",
"Priority": 3,
"ResourceAffected": "api",
"Pin": false,
"Status": false,
"Views": 0,
"Completion": 0
}
}
Error Responses
{
"Response": false,
"Message": "Missing Required Field: Title",
"Help": {
"ExpectedBody": {
"Title": "string (required) \u2014 to-do title",
"Description": "string (optional) \u2014 to-do description",
"Priority": "number (optional) \u2014 1 (Low), 2 (Medium) or 3 (High)",
"Deadline": "string (optional) \u2014 deadline, ISO format YYYY-MM-DD",
"Pin": "boolean (optional) \u2014 pin the to-do to the top of the list",
"ResourceAffected": "string (optional) \u2014 resource the to-do refers to"
}
},
"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": "Admin Access Required",
"Code": 403
}
{
"Response": false,
"Message": "Internal server error. Please try again; if it persists, contact support with the time of this request.",
"Code": 500
}