> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bookingshake.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart Guide

> Get started with the BookingShake API in minutes

## Create Your First Event

This guide will walk you through making your first API request to create an event in BookingShake.

## Prerequisites

Before you begin, make sure you have:

<Check>Your BookingShake API key from Settings > Integrations</Check>
<Check>A tool to make HTTP requests (cURL, Postman, or your preferred HTTP client)</Check>

## Step 1: Get Your API Key

<Steps>
  <Step title="Access BookingShake Dashboard">
    Log in to your account at [crm.bookingshake.com](https://crm.bookingshake.com)
  </Step>

  <Step title="Navigate to Integrations">
    Go to **Settings > Integrations**
  </Step>

  <Step title="Copy Your API Key">
    Copy your API key and store it securely
  </Step>
</Steps>

<Warning>
  Replace `YOUR_API_KEY` in all examples below with your actual API key.
</Warning>

## Step 2: Retrieve Available Resources

Before creating an event, let's retrieve available sources and spaces to use in our booking.

### Get Booking Sources

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET 'https://api.bookingshake.io/api/sources' \
    -H 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bookingshake.io/api/sources', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const sources = await response.json();
  console.log(sources);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.bookingshake.io/api/sources',
      headers={'Authorization': 'Bearer YOUR_API_KEY'}
  )

  sources = response.json()
  print(sources)
  ```

  ```php PHP theme={null}
  <?php

  $ch = curl_init('https://api.bookingshake.io/api/sources');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer YOUR_API_KEY'
  ]);

  $response = curl_exec($ch);
  $sources = json_decode($response, true);
  print_r($sources);

  ?>
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "value": "src_website",
      "label": "Website"
    },
    {
      "value": "src_phone",
      "label": "Phone"
    }
  ]
  ```
</ResponseExample>

### Get Available Spaces

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET 'https://api.bookingshake.io/api/spaces' \
    -H 'Authorization: Bearer YOUR_API_KEY'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bookingshake.io/api/spaces', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const spaces = await response.json();
  console.log(spaces);
  ```
</CodeGroup>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "value": "space_conf_a",
      "label": "Conference Room A"
    },
    {
      "value": "space_ballroom",
      "label": "Grand Ballroom"
    }
  ]
  ```
</ResponseExample>

## Step 3: Create a Simple Event

Now let's create your first event with basic information.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST 'https://api.bookingshake.io/api/events/create' \
    -H 'Authorization: Bearer YOUR_API_KEY' \
    -H 'Content-Type: application/json' \
    -d '{
      "bookings": [
        {
          "date": "15-03-2025",
          "start_time": "14:00",
          "end_time": "18:00",
          "pax": "50",
          "event_type": "Corporate Event"
        }
      ],
      "contact": {
        "title": "Mr",
        "first_name": "John",
        "last_name": "Doe",
        "email": "john.doe@example.com",
        "phone": "+33123456789"
      },
      "source_slug": "website"
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bookingshake.io/api/events/create', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      bookings: [
        {
          date: '15-03-2025',
          start_time: '14:00',
          end_time: '18:00',
          pax: '50',
          event_type: 'Corporate Event'
        }
      ],
      contact: {
        title: 'Mr',
        first_name: 'John',
        last_name: 'Doe',
        email: 'john.doe@example.com',
        phone: '+33123456789'
      },
      source_slug: 'website'
    })
  });

  const result = await response.json();
  console.log(result);
  ```

  ```python Python theme={null}
  import requests
  import json

  payload = {
      "bookings": [
          {
              "date": "15-03-2025",
              "start_time": "14:00",
              "end_time": "18:00",
              "pax": "50",
              "event_type": "Corporate Event"
          }
      ],
      "contact": {
          "title": "Mr",
          "first_name": "John",
          "last_name": "Doe",
          "email": "john.doe@example.com",
          "phone": "+33123456789"
      },
      "source_slug": "website"
  }

  response = requests.post(
      'https://api.bookingshake.io/api/events/create',
      headers={
          'Authorization': 'Bearer YOUR_API_KEY',
          'Content-Type': 'application/json'
      },
      data=json.dumps(payload)
  )

  result = response.json()
  print(result)
  ```

  ```php PHP theme={null}
  <?php

  $payload = json_encode([
      'bookings' => [
          [
              'date' => '15-03-2025',
              'start_time' => '14:00',
              'end_time' => '18:00',
              'pax' => '50',
              'event_type' => 'Corporate Event'
          ]
      ],
      'contact' => [
          'title' => 'Mr',
          'first_name' => 'John',
          'last_name' => 'Doe',
          'email' => 'john.doe@example.com',
          'phone' => '+33123456789'
      ],
      'source_slug' => 'website'
  ]);

  $ch = curl_init('https://api.bookingshake.io/api/events/create');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer YOUR_API_KEY',
      'Content-Type: application/json'
  ]);

  $response = curl_exec($ch);
  $result = json_decode($response, true);
  print_r($result);

  ?>
  ```
</CodeGroup>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "message": "success"
  }
  ```
</ResponseExample>

<Check>
  **Congratulations!** You've successfully created your first event via the BookingShake API.
</Check>

## Step 4: Verify in Dashboard

After creating the event, you can verify it in your BookingShake dashboard:

1. Log in to [crm.bookingshake.com](https://crm.bookingshake.com)
2. Navigate to your events/bookings list
3. Look for the newly created event with John Doe as the contact

## What's Next?

Now that you've created your first event, explore these advanced features:

<CardGroup cols={2}>
  <Card title="Create Multiple Events" icon="calendar-days" href="/api-reference/use-cases#group-bookings">
    Learn how to create multiple events in a single request
  </Card>

  <Card title="Add Products" icon="shopping-cart" href="/api-reference/use-cases#use-case-3-event-with-draft-quotation-products">
    Create draft quotations by including products with your events
  </Card>

  <Card title="Company Information" icon="building" href="/api-reference/use-cases#company-bookings">
    Add company details to your bookings
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/api-reference/errors">
    Learn how to handle errors gracefully
  </Card>
</CardGroup>

## Common Issues

<AccordionGroup>
  <Accordion title="Invalid date format error">
    Make sure dates are in **DD-MM-YYYY** format:

    * ✅ Correct: `"15-03-2025"`
    * ❌ Incorrect: `"2025-03-15"` or `"03/15/2025"`
  </Accordion>

  <Accordion title="Invalid time format error">
    Make sure times are in **HH:mm** format (24-hour):

    * ✅ Correct: `"14:00"` or `"09:30"`
    * ❌ Incorrect: `"2:00 PM"` or `"14:00:00"`
  </Accordion>

  <Accordion title="Missing token error">
    Ensure the `Authorization` header is included:

    ```http theme={null}
    Authorization: Bearer YOUR_API_KEY
    ```
  </Accordion>

  <Accordion title="Invalid token error">
    Verify your API key is correct and hasn't been revoked. Get a fresh key from Settings > Integrations.
  </Accordion>
</AccordionGroup>

## Need Help?

<Card title="Contact Support" icon="life-ring" href="mailto:support@bookingshake.com">
  Our support team is here to help you get started
</Card>
