Skip to main content
POST
/
subtasks
Create a subtask
curl --request POST \
  --url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/subtasks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "title": "some string",
  "status": 1,
  "due_date": 1234567890,
  "customer_id": 1,
  "job_id": 1,
  "project_id": 1,
  "recurring_job_id": 1,
  "description": "some string",
  "is_template": false,
  "is_required_for_job": false,
  "assignments": [
    {
      "team_id": 1,
      "user_id": 1
    },
    {
      "team_id": 1,
      "user_id": 2
    }
  ]
}
'
import requests

url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/subtasks"

payload = {
"title": "some string",
"status": 1,
"due_date": 1234567890,
"customer_id": 1,
"job_id": 1,
"project_id": 1,
"recurring_job_id": 1,
"description": "some string",
"is_template": False,
"is_required_for_job": False,
"assignments": [
{
"team_id": 1,
"user_id": 1
},
{
"team_id": 1,
"user_id": 2
}
]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'some string',
status: 1,
due_date: 1234567890,
customer_id: 1,
job_id: 1,
project_id: 1,
recurring_job_id: 1,
description: 'some string',
is_template: false,
is_required_for_job: false,
assignments: [{team_id: 1, user_id: 1}, {team_id: 1, user_id: 2}]
})
};

fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/subtasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));

Authorizations

x-api-key
string
header
required

Body

application/json

The body is of type object.

Response

200 - application/json

Successful response