# API

## API URL

To locate your team API URL, go to Settings > API Keys.

## Authentication

Scanner uses API keys for authentication. To create an API key or to locate existing API keys, go to Settings > API Keys. API keys are secret, so be sure not to share them publicly.

Scanner will look for the API key in `Authorization` header after a `Bearer` prefix.

```
Authorization: Bearer <Scanner API Key>
```

For example, if here is how you would use curl to get a list of all of your detection rules using your team's API URL:

```bash
curl -G $API_BASE/v1/detection_rule \
--data-urlencode "tenant_id=00000000-0000-0000-0000-000000000001" \
-H "Authorization: Bearer $SCANNER_API_KEY" \
-H "Content-Type: application/json"
```


---

# 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.scanner.dev/scanner/using-scanner-complete-feature-reference/developer-tools/api.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.
