1. Go to this page and download the library: Download mindtwo/laravel-clickup-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mindtwo / laravel-clickup-api example snippets
use Mindtwo\LaravelClickUpApi\Facades\ClickUpClient as ClickUp;
$updatedDetails = [
'name' => 'Updated Task Name',
// Other task details you want to update
];
$updatedTask = ClickUp::tasks()->update($taskId, $updatedDetails);
$response = ClickUp::tasks()->delete($taskId);
use Mindtwo\LaravelClickUpApi\Facades\ClickUpClient as ClickUp;
// Assuming $taskId holds the ID of the task you want to attach a file to
// and $data contains the file and other ther data fields as
// Import the ClickUp facade at the top of your PHP file
use Mindtwo\LaravelClickUpApi\Facades\ClickUpClient as ClickUp;
// Assuming you have a list ID, you can retrieve its custom fields like so:
$listId = 'your_list_id_here'; // Replace with your actual list ID
// Fetch the custom fields for the specified list
$customFields = ClickUp::customFields()->show($listId);
// $customFields now contains the response from ClickUp API
// In your routes/web.php or routes/api.php
Route::post('/webhooks/clickup', [WebhookController::class, 'handle'])
->middleware('clickup.webhook');
use Mindtwo\LaravelClickUpApi\Facades\ClickUpClient as ClickUp;
// Create a webhook - secret is automatically captured
$response = ClickUp::webhooks()->create($workspaceId, [
'endpoint' => 'https://your-app.com/webhooks/clickup',
'events' => ['taskCreated', 'taskUpdated'],
]);
// The webhook secret is stored in the database
$webhook = $response['webhook'];
// Secret is available at: $webhook['secret']
protected function schedule(Schedule $schedule): void
{
// Check ClickUp webhook health every hour
$schedule->job(\Mindtwo\LaravelClickUpApi\Jobs\CheckWebhookHealth::class)
->hourly()
->name('clickup-webhook-health-check')
->withoutOverlapping();
}