Creates a new task record. The $title and $status fields and the $assignedTo relationship are required.
If $createdBy is omitted it defaults to the authenticated user. The $note relationship is read-only — manage notes via their own relationships.
Supports idempotency via the Idempotency-Key header.
Required scope: tasks:create
Rate limit category: Write
Create a task
from lightfield import Lightfield
client = Lightfield(
api_key="My API Key",
)
task_create_response = client.task.create(
fields={
"status": "$status",
"title": "$title",
},
relationships={
"foo": "string"
},
)
print(task_create_response.id){
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}Returns Examples
{
"id": "id",
"createdAt": "createdAt",
"fields": {
"foo": {
"value": "string",
"valueType": "ADDRESS"
}
},
"httpLink": "httpLink",
"relationships": {
"foo": {
"cardinality": "cardinality",
"objectType": "objectType",
"values": [
"string"
]
}
},
"updatedAt": "updatedAt",
"externalId": "externalId"
}