# API Key

To access the Defy API, you will need an API key. If you need one you can contact with us. Just send a mail to <info@getdefy.co>. We will reach you immediately.

### Authentication via Header/Query/Body parameter

Simply append **api*****key=API\_KEY*** as a query parameter or header parameter or body parameters to all requests. The main advantage of this method is to embed the API endpoints within applications that do not support more sophisticated auth mechanisms, like Google Sheets or as IFrames.

### Authentication via Basic Auth

Example of basic authentication.

```
curl --location 'https://api.getdefy.co/v2/ENDPOINT' \
--header 'apikey: APIKEY'
```

Provide your API key as the basic auth username. You do not need to provide a password.

<br>


---

# 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://docs.getdefy.co/authentication/api-key.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.
