> For the complete documentation index, see [llms.txt](https://drophub.gitbook.io/drophub-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://drophub.gitbook.io/drophub-docs/authentication.md).

# Authentication

All requests to the DropHub API must be authenticated using an API key. This ensures secure and authorized access to our services.

#### 🔗 Base URL

```
https://api.drop-hub.com/api
```

***

#### 📥 Authentication Method

DropHub uses **API Key authentication** for all endpoints.

* Pass your API key in the header of each request using the `x-api-key` header.

#### ❌ Missing API Key

If the API key is not included in the request, the API will return a `401 Unauthorized` response with the following message:

**Response**

```json
{

  "Missing API Key"
}
```

#### ✅ Example Request – Check Price

```http
POST https://api.drop-hub.com/api/custom-integration/check-price
```

**Headers:**

```
accept: application/json  
Content-Type: application/json  
x-api-key: YOUR_API_KEY_HERE
```

**Body:**

```json
{
  "pickupLatitude": 24.7136,
  "pickupLongitude": 46.6753,
  "destinationLatitude": 24.7743,
  "destinationLongitude": 46.7386
}
```

> This request calculates the delivery price between the provided pickup and destination coordinates.\
> Replace `YOUR_API_KEY_HERE` with your actual API key.
