Skip to content
Get started

Archive a task

client.tasks.delete(stringtaskID, RequestOptionsoptions?): DeleteTaskResponse { archived }
DELETE/api/tasks/{taskId}

Archive a task so it stops appearing in GET /tasks results. Turns and files are retained for audit purposes. Only the worker creator can archive a task.

ParametersExpand Collapse
taskID: string
ReturnsExpand Collapse
DeleteTaskResponse { archived }
archived: boolean

Archive a task

import Handinger from '@ramensoft/handinger';

const client = new Handinger({
  apiKey: process.env['HANDINGER_API_KEY'], // This is the default and can be omitted
});

const deleteTaskResponse = await client.tasks.delete('tsk_01HZY31W2SZJ8MJ2FQTR3M1K9D');

console.log(deleteTaskResponse.archived);
{
  "archived": true
}
Returns Examples
{
  "archived": true
}