Skip to content

Create one-off task

Endpoint

POST /organizations/{org_id}/tasks

Creates a standalone one-off task that isn’t part of any process run.

Request

Replace {org_id} with your Organization ID.

Headers

  • Authorization: Bearer {your_access_token}
  • Accept: application/json
  • X-Tallyfy-Client: APIClient
  • Content-Type: application/json

Body (JSON)

Required fields

  • title (string, max 600 chars): The task title.
  • task_type (string): One of task, approval, expiring, email, or expiring_email.
  • owners (object): Assignees - structure: { "users": [<user_ids>], "guests": ["email@example.com"], "groups": [<group_ids>] }.
  • deadline (string): Due date/time in ISO 8601 format.

Optional fields

  • description (string): Instructions or details for the task.
  • started_at (string): Start date/time in ISO 8601 format.
  • separate_task_for_each_assignee (boolean): If true, creates one task per assignee.
  • max_assignable (integer): Maximum number of assignees allowed.
  • prevent_guest_comment (boolean): Block guests from commenting.
  • everyone_must_complete (boolean): Whether all assignees must complete the task.
  • can_complete_only_assignees (boolean): Only assigned people can complete it.
  • tags (array of strings): 32-character tag IDs to apply.
  • form_fields (array): Form fields to capture data on completion.
  • webhook (string): URL to call when the task’s completed.
  • top_secret (boolean): Mark the task as confidential.
  • run_id (string): Link this task to an existing process run.

Example body:

{
"title": "Prepare Q3 Report",
"task_type": "task",
"description": "Gather data and prepare the quarterly report slides.",
"owners": {
"users": [1001, 1002],
"groups": [],
"guests": []
},
"deadline": "2025-07-15T17:00:00Z",
"tags": ["a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"]
}

Code samples

const accessToken = 'YOUR_PERSONAL_ACCESS_TOKEN';
const orgId = 'YOUR_ORGANIZATION_ID';
const apiUrl = `https://go.tallyfy.com/api/organizations/${orgId}/tasks`;
const taskData = {
title: "JS One-Off Task: Review Budget",
task_type: "task",
description: "Review the draft budget spreadsheet.",
owners: {
users: [12345]
},
deadline: "2025-06-10T12:00:00Z"
};
const headers = new Headers();
headers.append('Authorization', `Bearer ${accessToken}`);
headers.append('Accept', 'application/json');
headers.append('X-Tallyfy-Client', 'APIClient');
headers.append('Content-Type', 'application/json');
fetch(apiUrl, {
method: 'POST',
headers: headers,
body: JSON.stringify(taskData)
})
.then(response => {
return response.json().then(data => {
if (!response.ok) {
console.error("Failed to create one-off task:", data);
throw new Error(`HTTP error! status: ${response.status}`);
}
return data;
});
})
.then(data => {
console.log('Successfully created one-off task:');
console.log(JSON.stringify(data, null, 2));
})
.catch(error => {
console.error('Error creating one-off task:', error.message);
});

Response

A successful request returns a 201 Created status and a JSON object with the new task’s details.

{
"data": {
"id": "new_one_off_task_id_789",
"increment_id": 1250,
"title": "Python One-Off Task: Plan Meeting",
"run_id": null,
"step_id": null,
"status": "not-started",
"task_type": "task",
"owners": {
"users": [
{ "id": 1001, "full_name": "Bob", "profile_pic": "..." }
],
"guests": [],
"groups": []
},
"deadline": "2025-06-30T17:00:00.000Z",
"started_at": null,
"created_at": "2025-05-20T18:00:00.000Z",
"last_updated": "2025-05-20T18:00:00.000Z"
}
}

Save the returned id — you’ll need it to get, update, complete, or delete this task later.


Tasks > Update task

Tallyfy’s API lets you update any task (process or one-off) via a PUT request where you can…

Tasks > Delete task

Tallyfy’s API lets you permanently delete a standalone one-off task along with its form fields…