> For the complete documentation index, see [llms.txt](https://help.docupilot.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.docupilot.app/developers/api-overview.md).

# API Overview

## Introduction

Docupilot API allows you to perform most of the operations that you do with our web application. Our APIs are designed based on HTTP REST Architectural pattern and follow OpenAPI Specification.

Interactive documentation of Docupilot's V2 APIs is available at `https://<YOUR_SUBDOMAIN>.docupilot.app/~/dashboard/api-docs/swagger-ui/`

### V2 API Authentication

APIs can be accessed using a combination of API Key and Secret created from your **API Settings** section.

1. Go to **Settings > API Settings** to create a new API key.
2. Copy the Key & Secret - download the copy if needed. The secret cannot be retrieved again.
3. base64 encoded value of **key:secret** will be your API key

Use the following command to base64 encode your **key:secret**

```bash
// create the base64 encoded string
echo -n YOUR_API_KEY:YOUR_API_SECRET | base64
```

Use the following curl command to make an API request using the base64 encoded string generated from previous step.

```bash
// making an API request
curl -X GET \
  https://api-us1.docupilot.app/accounts/user/me/ \
  -H 'Authorization: Bearer <Base64 encoded API credentials>'
```

#### X-Workspace Header

The `X-Workspace` header is required to be sent for all the APIs that interact with your Workspace (ex: Templates, etc). This header holds the ID of your workspace for which the request is being made.

You can locate your **Workspace ID** on the Workspace details page. Navigate to the Dashboard and click on the **Settings** icon in the left side menu to access the Workspace details page.

<figure><img src="https://191679573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LDwD-wIOendMUiQ8uVr%2Fuploads%2FEEQyjnmJwHWfPaRFJFus%2F%20workspace%202.png?alt=media&amp;token=684e36fb-a9ae-4966-bf19-c61dd58d79fb" alt=""><figcaption><p>Workspace ID</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.docupilot.app/developers/api-overview.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
