---
title: "Preview authorization scopes for keys not yet saved to any integration"
method: POST
path: "/v1/integrations/datadog/app-key/scopes/preview"
tags: ["Datadog Integration"]
---

# Preview authorization scopes for keys not yet saved to any integration

`POST /v1/integrations/datadog/app-key/scopes/preview`

## Request

- Base URL: `https://docs.grepr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.grepr.ai/v1/integrations/datadog/app-key/scopes/preview`
- Auth: one of:
  - API key in header `GREPR-API-KEY`
  - OpenID Connect (`https://grepr-prod.us.auth0.com/.well-known/openid-configuration`)

Probes Datadog with the supplied site and keys and reports each authorization scope. For the create form, where there is no integration to take keys from, so every field is required. Nothing is written and nothing is stored.

## Request body

- CheckAppKeyScopesRequest: Keys and site to check Datadog authorization scopes against
  - `apiKey` string, required: API key to authenticate the probes with
  - `appKey` string, required: Application key to check
  - `site` string, required: The Datadog site to probe

## Response `200`

Scopes checked successfully

- AppKeyScopeCheck[]
  - `required` boolean: Whether Grepr rejects an application key without this scope
  - `scope` string: The Datadog authorization scope identifier
  - `status` 'GRANTED' | 'DENIED' | 'UNKNOWN': Whether the application key was found to hold a scope, or could not be checked

## Other responses

- `400`: The supplied site is not allowed for this organization.
- `401`: Unauthorized

---

[API](https://skmtc.dev/grepr/apis/grepr-api.md) - [All operations](https://skmtc.dev/grepr/apis/grepr-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grepr/apis/grepr-api/revisions/2a5ce03a0bf0?raw)
