curl -X POST "https://api.hitler.app/api/tasks/drafts" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Review Q4 budget proposal",
"priority": 2,
"dueDate": "2024-01-20T17:00:00.000Z",
"rawInput": "remind me to review the Q4 budget by Friday"
}'
const draft = await api.createTaskDraft({
title: "Review Q4 budget proposal",
priority: 2,
dueDate: new Date("2024-01-20T17:00:00.000Z"),
rawInput: "remind me to review the Q4 budget by Friday",
});
{
"id": "draft-uuid-123",
"title": "Review Q4 budget proposal",
"description": null,
"priority": 2,
"status": "pending",
"dueDate": "2024-01-20T17:00:00.000Z",
"rawInput": "remind me to review the Q4 budget by Friday",
"userId": "user-uuid",
"organizationId": "org-uuid",
"createdAt": "2024-01-15T10:30:00.000Z"
}
Tasks
Create Task Draft
Create a new task draft for confirmation
POST
/
api
/
tasks
/
drafts
curl -X POST "https://api.hitler.app/api/tasks/drafts" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Review Q4 budget proposal",
"priority": 2,
"dueDate": "2024-01-20T17:00:00.000Z",
"rawInput": "remind me to review the Q4 budget by Friday"
}'
const draft = await api.createTaskDraft({
title: "Review Q4 budget proposal",
priority: 2,
dueDate: new Date("2024-01-20T17:00:00.000Z"),
rawInput: "remind me to review the Q4 budget by Friday",
});
{
"id": "draft-uuid-123",
"title": "Review Q4 budget proposal",
"description": null,
"priority": 2,
"status": "pending",
"dueDate": "2024-01-20T17:00:00.000Z",
"rawInput": "remind me to review the Q4 budget by Friday",
"userId": "user-uuid",
"organizationId": "org-uuid",
"createdAt": "2024-01-15T10:30:00.000Z"
}
This endpoint requires authentication.
Request
string
required
Task title (1-200 characters)
string
Detailed description (max 2000 characters)
integer
default:"3"
Priority level: 1 (highest) to 5 (lowest)
string
Due date in ISO 8601 format
string
Original natural language input (for AI learning)
Response
string
Draft UUID
string
Parsed task title
string
Task description
integer
Priority level
string
Draft status:
pending, confirmed, or rejectedstring
Due date if set
string
Creation timestamp
curl -X POST "https://api.hitler.app/api/tasks/drafts" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Review Q4 budget proposal",
"priority": 2,
"dueDate": "2024-01-20T17:00:00.000Z",
"rawInput": "remind me to review the Q4 budget by Friday"
}'
const draft = await api.createTaskDraft({
title: "Review Q4 budget proposal",
priority: 2,
dueDate: new Date("2024-01-20T17:00:00.000Z"),
rawInput: "remind me to review the Q4 budget by Friday",
});
{
"id": "draft-uuid-123",
"title": "Review Q4 budget proposal",
"description": null,
"priority": 2,
"status": "pending",
"dueDate": "2024-01-20T17:00:00.000Z",
"rawInput": "remind me to review the Q4 budget by Friday",
"userId": "user-uuid",
"organizationId": "org-uuid",
"createdAt": "2024-01-15T10:30:00.000Z"
}