# Quick Start

This guide walks you through generating your API key, making your first request, and understanding the responses you'll receive. By the end you'll have a working call returning live property data.

## Get your API key

An API key is required for all requests. Keys do not expire and a backup key is available for rotation.\
\
To generate your key, log in to your Multi-Property Platform account and go to Direct Booking → API tab.\
\
→ [Generate your API Key](/direct-booking-api/additional-resources/generate-api-key.md)\
→ [Manage your API Key](/direct-booking-api/additional-resources/manage-api-key.md)

{% hint style="warning" %}
Keep your key private and never expose it in front-end or client-side code. This API is for server-to-server use only.
{% endhint %}

## API Specification File <a href="#api-specification-file" id="api-specification-file"></a>

**REST (OpenAPI)**

* **Direct Booking** — [download YAML](https://openapi.gitbook.com/o/qrJuVY5UOf3h7cLyla8z/spec/direct-booking-api.yaml)​

## Make your first call

You'll need your API key before continuing.

{% stepper %}
{% step %}

### Authenticate

Pass your key as a header on every call.&#x20;

{% code overflow="wrap" expandable="true" %}

```
Header: x-sm-api-key: YOUR_API_KEY
```

{% endcode %}
{% endstep %}

{% step %}

### Make the call

Retrieve all properties in your group:

{% code overflow="wrap" expandable="true" %}

```bash
curl -X GET "https://directbooking.siteminder.com/public-api/api/properties" -H "x-sm-api-key: YOUR_API_KEY" -H "accept: application/json"
```

{% endcode %}
{% endstep %}

{% step %}

### Handle the response

The uuid is your property identifier — use it in subsequent calls for room types, room rates, and quotes.

{% code overflow="wrap" expandable="true" %}

```json
{
   "page":1,
   "perPage":10,
   "total":50,
   "totalPages":5,
   "items":[
      {
         "uuid":"f63ce398-da03-4573-856d-ed8d71e57e3d",
         "name":"Demo Hotel"
      },
      "..."
   ]
}
```

{% endcode %}
{% endstep %}

{% step %}

### Handle errors

If your key is missing or invalid:

{% code overflow="wrap" expandable="true" %}

```json
{
   "error":"Unauthorized",
   "message":"Invalid API key"
}
```

{% endcode %}

{% hint style="danger" %}
**401** - check your key is valid and passed in the x-sm-api-key header.
{% endhint %}

{% code overflow="wrap" expandable="true" %}

```json
{
  "errors": [
    {
      "code": "RateLimited",
      "message": "You have exceeded the quota for the key, please try again later."
    }
  ]
}
```

{% endcode %}

{% hint style="danger" %}
**429** - rate limit exceeded. Wait one minute before retrying.
{% endhint %}

→ See [API Reference](/direct-booking-api/reference/properties.md) for the full error details.
{% endstep %}
{% endstepper %}

{% hint style="success" icon="sparkles" %}

## Still have questions?

Use the <i class="fa-gitbook-assistant">:gitbook-assistant:</i> **Ask** button at the top of the page to chat with our AI assistant — it can help you navigate the guide, understand requirements, and troubleshoot issues.

If you need more support, visit [Integration Support](/integration-support/integration-support.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.siteminder.com/direct-booking-api/guides/quick-start.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
