curl --request POST \
--url https://api.example.com/api/task-types \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"projectId": 123
}
'{
"id": 123,
"name": "<string>",
"projectId": 123
}Create a new task type within a project
curl --request POST \
--url https://api.example.com/api/task-types \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"projectId": 123
}
'{
"id": 123,
"name": "<string>",
"projectId": 123
}curl -X POST https://api.example.com/api/task-types \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-H "Content-Type: application/json" \
-d '{
"name": "Bug Fix",
"projectId": 1
}'
{
"id": 5,
"name": "Bug Fix",
"projectId": 1
}
{
"error": "Validation Failed",
"message": "name: must not be blank"
}
{
"error": "Unauthorized",
"message": "Invalid or missing authentication token"
}
{
"error": "Not Found",
"message": "Project not found"
}