You need to have a ClickUp token, use official guide to create one
composer require "edsol/clickup-php"
- Read
- get Spaces
- Read
- get Tags
- Create
- Read
- Create List
- Create
- Read
- Update
- Delete
- Add attachment/s
- Add assignee/s
- Get members
- Read
- Create
- Update
- Delete
- List
- Create
- Update
- Delete
$clickup = new \ClickUpClient\Client('CLICK_UP_API_TOKEN');
$clickup->team()->all();
$clickup->team()->spaces();
$clickup->team()->user('USER_ID');
$clickup->space()->get("SPACE_ID");
$clickup->space('SPACE_ID')->tags();
$clickup->space('SPACE_ID')->folders();
$clickup->space('SPACE_ID')->folderlessLists();
$clickup->folder("SPACE_ID")->lists();
$clickup->folder("FOLDER_ID")->get();
$clickup->folder()->get("FOLDER_ID");
$clickup->folder("SPACE_ID")->create("FOLDER_NAME");
$clickup->folder("SPACE_ID")->createList("LIST_NAME");
$clickup->taskList("LIST_ID")->get();
$clickup->taskList("LIST_ID")->getTasks();
$clickup->taskList("LIST_ID")->comments();
$clickup->taskList("LIST_ID")->members();
$clickup->taskList("LIST_ID")->getCustomFields();
$clickup->task("TASK_ID")->get();
$clickup->task("TASK_ID")->comments();
$clickup->task("TASK_ID")->members();
$clickup->task("TASK_ID")->add([
"name": "Updated Task Name",
"description": "Updated Task Content",
]);
$clickup->task("TASK_ID")->delete();
$clickup->task("TASK_ID")->update([
"name": "Updated Task Name",
"description": "Updated Task Content"
]);
$clickup->task("TASK_ID")->addAssignees([
MEMBER_ID_1,
MEMBER_ID_2,
]);
$clickup->task("TASK_ID")->addAssignee(MEMBER_ID);
$attachment = new \ClickUpClient\Objects\Attachment([
'contents' => \GuzzleHttp\Psr7\Utils::tryFopen('FILE_PATH', 'r'),
'filename' => 'filename.txt'
]);
$clickup->task("TASK_ID")->addAttachment($attachment);
$attachments = new \ClickUpClient\Objects\AttachmentCollection([
[
'contents' => \GuzzleHttp\Psr7\Utils::tryFopen('FILE_PATH', 'r'),
'filename' => 'filename1.txt'
],
[
'contents' => \GuzzleHttp\Psr7\Utils::tryFopen('FILE_PATH', 'r'),
'filename' => 'filename2.txt'
],
]);
$clickup->task("TASK_ID")->addAttachments($attachments);
$clickup->task("TASK_ID")->setCustomField("FIELD_ID","NEW_FIELD_VALUE");
$clickup->task("TASK_ID")->deleteCustomField("FIELD_ID");
$clickup->comment('COMMENT_ID')->update([
'comment_text' => "update comment text"
]);
$clickup->comment()->deleteComment('COMMENT_ID');
$clickup->team('TEAM_ID')->webhooks();
$clickup->team('TEAM_ID')->createWebhook([
'endopint' => 'ENDPOINT_URL',
'events' => [
"taskCreated",
"taskUpdated",
"taskDeleted",
],
]);
$clickup->webhook('WEBHOOK_ID')->updateWebhook([
'endopint' => 'ENDPOINT_URL',
'events' => [
"taskCreated",
"taskUpdated",
"taskDeleted",
],
]);
$clickup->webhook('WEBHOOK_ID')->delete();