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

# Authentication

> API Authentication

## Overview

The Peaka Partner API uses API keys for authentication.

There are two types of API keys:

* **Partner API Key**: Grants access to all resources for partner-level access. [Learn how to manage a Partner API Key](/how-to-guides/how-to-manage-partner-api-key)
* **Project API Key**: Grants access to resources specific to the project for which the key was created. [Learn how to generate API Keys](/how-to-guides/how-to-generate-api-keys)

While **Project API Keys** are restricted to project-specific resources, **Partner API Keys** provide broader access across all available resources.

You will see badges next to the API endpoint descriptions to indicate which type of API key can be used to access the endpoint.

<span style={{display: "flex", gap: "10px", flexDirection: "row", alignItems: "center"}}>
  <img src="https://cdn.peaka.com/badges/partner-api-key-badge.png" />

  <img src="https://cdn.peaka.com/badges/project-api-key-badge.png" />
</span>

## Authentication

To authenticate requests, include the API key in the `Authorization` header as a Bearer token. The format is as follows:

```http theme={null}
Authorization: Bearer <API Key>
```

This ensures secure authentication for API requests, with access based on the type of API key used.

**Example: Using a Partner API Key**

A **Partner API Key** can perform all actions that a **Project API Key** can, plus additional partner-level operations. For example, to list all organizations accessible by the partner:

```http theme={null}
GET api/v1/organizations
Authorization: Bearer <Partner API Key>
```

This returns all organizations and related resources the partner has access to.

You can also use a **Partner API Key** to access endpoints scoped to a specific project. For example, to list catalogs within a project:

```http theme={null}
GET api/v1/data/projects/{projectId}/catalogs
Authorization: Bearer <Partner API Key>
```

This returns data catalogs associated only with that project.

**Example: Using a Project API Key**

You can use a **Project API Key** to access endpoints scoped to a specific project. (Whenever you see `projects/{projectId}` in the path of an endpoint, it is scoped to the project.)

For example, to list catalogs within a project:

```http theme={null}
GET api/v1/data/projects/{projectId}/catalogs
Authorization: Bearer <Project API Key>
```

Replace `{projectId}` with the ID of your project.

This returns data catalogs associated only with that project.
