### Install Laravel SavvyCal via Composer Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Install the package via Composer. ```bash composer require jeffersongoncalves/laravel-savvycal ``` -------------------------------- ### SavvyCalClient::createEvent() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Creates a new event with the given scheduling link, start time, and attendee details. ```APIDOC ## POST /v1/events ### Description Creates a new event. ### Method POST ### Endpoint /v1/events ### Parameters #### Request Body - **schedulingLinkId** (string) - Required - The ID of the scheduling link. - **startAt** (string) - Required - Start time in ISO 8601 format. - **name** (string) - Required - Attendee name. - **email** (string) - Required - Attendee email. ### Request Example ```json { "schedulingLinkId": "link_00000000", "startAt": "2026-09-08T14:00:00Z", "name": "Jane Doe", "email": "jane@example.com" } ``` ### Response #### Success Response (200) - Returns the created event. #### Response Example ```json { "id": "event_00000000", "scheduling_link_id": "link_00000000", "start_at": "2026-09-08T14:00:00Z" } ``` ``` -------------------------------- ### Run Code Formatting Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Run code formatting with Pint. ```bash composer format ``` -------------------------------- ### Run Static Analysis Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Run static analysis with PHPStan. ```bash composer analyse ``` -------------------------------- ### SavvyCalClient::createWebhook() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Creates a new webhook with the given URL and event subscriptions. ```APIDOC ## POST /v1/webhooks ### Description Creates a new webhook. ### Method POST ### Endpoint /v1/webhooks ### Parameters #### Request Body - **url** (string) - Required - The URL to send webhook events to. - **events** (array) - Required - List of event types to subscribe to. ### Request Example ```json { "url": "https://example.com/webhooks/savvycal", "events": ["event.created", "event.canceled"] } ``` ### Response #### Success Response (200) - Returns the created webhook. #### Response Example ```json { "id": "hook_00000000", "url": "https://example.com/webhooks/savvycal", "events": ["event.created", "event.canceled"] } ``` ``` -------------------------------- ### Run Laravel SavvyCal Tests Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Run the test suite. ```bash composer test ``` -------------------------------- ### Publish Laravel SavvyCal Config File Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Optionally publish the configuration file to customize settings. ```bash php artisan vendor:publish --tag="laravel-savvycal-config" ``` -------------------------------- ### Set SavvyCal API Key in .env Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Add your SavvyCal API key to the .env file. Create the key from SavvyCal developer settings. ```env SAVVYCAL_API_KEY=sk_live_... ``` -------------------------------- ### SavvyCalClient::webhooks() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Retrieves a list of webhooks. ```APIDOC ## GET /v1/webhooks ### Description Retrieves a list of webhooks. ### Method GET ### Endpoint /v1/webhooks ### Response #### Success Response (200) - Returns an array of webhooks. #### Response Example ```json [ { "id": "hook_00000000", "url": "https://example.com/webhooks/savvycal", "events": ["event.created", "event.canceled"] } ] ``` ``` -------------------------------- ### SavvyCalClient::me() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Fetches the authenticated user's information from the SavvyCal API. ```APIDOC ## GET /v1/me ### Description Fetches the authenticated user's information. ### Method GET ### Endpoint /v1/me ### Response #### Success Response (200) - Returns the authenticated user's data as an array. #### Response Example ```json { "id": "user_00000000", "name": "Jane Doe", "email": "jane@example.com" } ``` ``` -------------------------------- ### Use SavvyCalClient Static Methods Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Basic usage of the SavvyCalClient static methods for users, scheduling links, availability, events, and webhooks. All methods return array|null (or bool for deleteLink() and deleteWebhook()), returning null/false on network failure or non-2xx response instead of throwing. Null arguments are stripped from the payload before sending. ```php use JeffersonGoncalves\SavvyCal\SavvyCalClient; // Users $me = SavvyCalClient::me(); // Scheduling links $links = SavvyCalClient::links(['limit' => 50]); $link = SavvyCalClient::link('link_00000000'); $created = SavvyCalClient::createLink('Intro call', slug: 'intro', durationMinutes: 30); SavvyCalClient::updateLink('link_00000000', ['name' => 'Discovery call']); SavvyCalClient::duplicateLink('link_00000000'); SavvyCalClient::toggleLink('link_00000000'); SavvyCalClient::deleteLink('link_00000000'); // Availability $slots = SavvyCalClient::linkSlots( id: 'link_00000000', startTime: '2026-09-06T00:00:00Z', endTime: '2026-09-13T00:00:00Z', ); // Events $events = SavvyCalClient::events(['limit' => 20]); $event = SavvyCalClient::event('event_00000000'); SavvyCalClient::createEvent( schedulingLinkId: 'link_00000000', startAt: '2026-09-08T14:00:00Z', name: 'Jane Doe', email: 'jane@example.com', ); SavvyCalClient::cancelEvent('event_00000000'); // Webhooks $webhooks = SavvyCalClient::webhooks(); SavvyCalClient::createWebhook('https://example.com/webhooks/savvycal', ['event.created', 'event.canceled']); SavvyCalClient::deleteWebhook('hook_00000000'); ``` -------------------------------- ### Laravel SavvyCal Config Options Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Configuration options for the package. When 'savvycal.token' is null, the client falls back to config('services.savvycal.token'). ```php // config/savvycal.php return [ 'token' => env('SAVVYCAL_API_KEY'), 'timeout' => (int) env('SAVVYCAL_TIMEOUT', 8), ]; ``` -------------------------------- ### SavvyCalClient::link() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Fetches a single scheduling link by its ID. ```APIDOC ## GET /v1/links/{id} ### Description Fetches a single scheduling link by its ID. ### Method GET ### Endpoint /v1/links/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the scheduling link. ### Response #### Success Response (200) - Returns the scheduling link data. #### Response Example ```json { "id": "link_00000000", "name": "Intro call", "slug": "intro" } ``` ``` -------------------------------- ### SavvyCalClient::createLink() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Creates a new scheduling link with the given name, slug, and duration. ```APIDOC ## POST /v1/links ### Description Creates a new scheduling link. ### Method POST ### Endpoint /v1/links ### Parameters #### Request Body - **name** (string) - Required - The name of the scheduling link. - **slug** (string) - Optional - The slug for the link. - **durationMinutes** (integer) - Optional - Duration of the meeting in minutes. ### Request Example ```json { "name": "Intro call", "slug": "intro", "durationMinutes": 30 } ``` ### Response #### Success Response (200) - Returns the created scheduling link. #### Response Example ```json { "id": "link_00000000", "name": "Intro call", "slug": "intro", "durationMinutes": 30 } ``` ``` -------------------------------- ### SavvyCalClient::linkSlots() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Retrieves available time slots for a scheduling link within a given time range. ```APIDOC ## GET /v1/links/{id}/slots ### Description Retrieves available time slots for a scheduling link. ### Method GET ### Endpoint /v1/links/{id}/slots ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the scheduling link. #### Query Parameters - **startTime** (string) - Required - Start of the availability window in ISO 8601 format. - **endTime** (string) - Required - End of the availability window in ISO 8601 format. ### Response #### Success Response (200) - Returns an array of available time slots. #### Response Example ```json [ { "start": "2026-09-08T14:00:00Z", "end": "2026-09-08T14:30:00Z" } ] ``` ``` -------------------------------- ### SavvyCalClient::links() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Retrieves a list of scheduling links, optionally filtered by query parameters. ```APIDOC ## GET /v1/links ### Description Retrieves a list of scheduling links. ### Method GET ### Endpoint /v1/links ### Parameters #### Query Parameters - **limit** (integer) - Optional - Maximum number of links to return. ### Response #### Success Response (200) - Returns an array of scheduling links. #### Response Example ```json [ { "id": "link_00000000", "name": "Intro call", "slug": "intro" } ] ``` ``` -------------------------------- ### SavvyCalClient::duplicateLink() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Duplicates an existing scheduling link. ```APIDOC ## POST /v1/links/{id}/duplicate ### Description Duplicates an existing scheduling link. ### Method POST ### Endpoint /v1/links/{id}/duplicate ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the scheduling link to duplicate. ### Response #### Success Response (200) - Returns the duplicated scheduling link. #### Response Example ```json { "id": "link_00000001", "name": "Intro call (copy)" } ``` ``` -------------------------------- ### SavvyCalClient::event() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Fetches a single event by its ID. ```APIDOC ## GET /v1/events/{id} ### Description Fetches a single event by its ID. ### Method GET ### Endpoint /v1/events/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the event. ### Response #### Success Response (200) - Returns the event data. #### Response Example ```json { "id": "event_00000000", "scheduling_link_id": "link_00000000", "start_at": "2026-09-08T14:00:00Z" } ``` ``` -------------------------------- ### SavvyCalClient::events() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Retrieves a list of events, optionally filtered by query parameters. ```APIDOC ## GET /v1/events ### Description Retrieves a list of events. ### Method GET ### Endpoint /v1/events ### Parameters #### Query Parameters - **limit** (integer) - Optional - Maximum number of events to return. ### Response #### Success Response (200) - Returns an array of events. #### Response Example ```json [ { "id": "event_00000000", "scheduling_link_id": "link_00000000", "start_at": "2026-09-08T14:00:00Z" } ] ``` ``` -------------------------------- ### SavvyCalClient::toggleLink() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Toggles the active status of a scheduling link. ```APIDOC ## POST /v1/links/{id}/toggle ### Description Toggles the active status of a scheduling link. ### Method POST ### Endpoint /v1/links/{id}/toggle ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the scheduling link. ### Response #### Success Response (200) - Returns the updated scheduling link. #### Response Example ```json { "id": "link_00000000", "active": false } ``` ``` -------------------------------- ### SavvyCalClient::updateLink() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Updates an existing scheduling link with the provided fields. ```APIDOC ## PATCH /v1/links/{id} ### Description Updates an existing scheduling link. ### Method PATCH ### Endpoint /v1/links/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the scheduling link. #### Request Body - **name** (string) - Optional - The new name of the scheduling link. - Other fields as needed. ### Request Example ```json { "name": "Discovery call" } ``` ### Response #### Success Response (200) - Returns the updated scheduling link. #### Response Example ```json { "id": "link_00000000", "name": "Discovery call" } ``` ``` -------------------------------- ### SavvyCalClient::deleteWebhook() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Deletes a webhook by its ID. ```APIDOC ## DELETE /v1/webhooks/{id} ### Description Deletes a webhook. ### Method DELETE ### Endpoint /v1/webhooks/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the webhook. ### Response #### Success Response (200) - Returns a boolean indicating success. #### Response Example ```json true ``` ``` -------------------------------- ### SavvyCalClient::deleteLink() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Deletes a scheduling link by its ID. ```APIDOC ## DELETE /v1/links/{id} ### Description Deletes a scheduling link. ### Method DELETE ### Endpoint /v1/links/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the scheduling link. ### Response #### Success Response (200) - Returns a boolean indicating success. #### Response Example ```json true ``` ``` -------------------------------- ### SavvyCalClient::cancelEvent() Source: https://github.com/jeffersongoncalves/laravel-savvycal/blob/main/README.md Cancels an event by its ID. ```APIDOC ## POST /v1/events/{id}/cancel ### Description Cancels an event. ### Method POST ### Endpoint /v1/events/{id}/cancel ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the event. ### Response #### Success Response (200) - Returns the canceled event. #### Response Example ```json { "id": "event_00000000", "status": "canceled" } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.