# Get the API index

> Returns the API name, version and links to the documentation and the OpenAPI document.

Source: https://diko.app/en/api-docs/reference/get-api-index

Account · `GET /`

- **Base URL:** https://api.diko.app/api/v1
- **Required scope:** No authentication required

No API key is needed. The request is not rate limited, so the response carries no rate-limit headers.

## Response

### 200

The API index.

- `Request-Id`: ID of this request (`req_` prefix), the same as `request_id` in an error body. It is also sent as `X-Request-ID`. Quote it when you contact support.
- `X-Client-Request-Id`: Your own `X-Client-Request-Id` request header, echoed back. It is sent only when the value you sent has 1-128 characters from A-Z a-z 0-9 . _ : -.

Content type: `application/json`

- `object` (string, required): Always `api`.
- `version` (string, required): API version, `v1`. Allowed values: `v1`.
- `docs_url` (string, required, format: uri): Link to the documentation.
- `openapi_url` (string, required, format: uri): Link to the OpenAPI 3.1 document.

```json
{
  "object": "api",
  "version": "v1",
  "docs_url": "https://diko.app/en/api-docs",
  "openapi_url": "https://api.diko.app/api/v1/openapi.json"
}
```

## Examples

**cURL**

```bash
curl "https://api.diko.app/api/v1"
```

**Python**

```python
import requests

response = requests.get(
    "https://api.diko.app/api/v1",
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

**TypeScript**

```typescript
const response = await fetch("https://api.diko.app/api/v1")
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())
```

## Errors

This endpoint can return these errors. Every code is described in the error catalog.

| HTTP | Code | Meaning | Retry? |
|---|---|---|---|
| 404 | [`api_disabled`](https://diko.app/en/api-docs/errors.md#api_disabled) | The public API is currently switched off. | conditionally |
| 500 | [`internal_error`](https://diko.app/en/api-docs/errors.md#internal_error) | An internal server error. | conditionally |
