# Authentication

We use API keys to authenticate requests to the RouteLift API. Requests without a valid API key will return a `401 Unauthorized` error.

#### Generating API Keys

You can generate secret API keys from your Partner Dashboard. Navigate to:

**Settings → API Keys & Webhooks**

Each key is environment-specific (production or sandbox). You can create multiple keys for different use cases.

#### Secret vs Public Keys

* **Secret keys** should only be used in your backend systems.
* **Never expose your secret keys in frontend code, SDKs, or public repositories.**
* If building a frontend integration, use a limited-scope public key if available.

#### Keeping Your Keys Secure

API keys are unique to your account. If you believe a key has been compromised, you can revoke or regenerate it from your dashboard at any time.

#### Authorization Method

Use HTTPS and include your secret key in the `Authorization` header of every request:

```
Authorization: Bearer {YOUR_SECRET_KEY}
```

Example:

```
curl -X GET https://integrations.routelift.com/v1/deliveries \
  -H "Authorization: Bearer sk_test_abc123"
```


---

# 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://routelift.gitbook.io/routelift-api-integration/getting-started/publish-your-docs.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.
