---
title: "Preview authorization scopes for unsaved changes to an integration"
method: POST
path: "/v1/integrations/datadog/{id}/app-key/scopes/preview"
tags: ["Datadog Integration"]
---

# Preview authorization scopes for unsaved changes to an integration

`POST /v1/integrations/datadog/{id}/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/{id}/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 integration's stored keys, overridden by whatever the body supplies, and reports each authorization scope. Nothing is written. An omitted field means "use what is stored", so an empty body reports what the stored key can do right now. A scope whose probe does not complete is reported UNKNOWN rather than as a permission the user has to grant.

## Path parameters

- `id` string, required

## Request body

- PreviewAppKeyScopesRequest: Unsaved changes to check Datadog authorization scopes against
  - `apiKey` string: API key to probe with instead of the stored one
  - `appKey` string: Application key to check instead of the stored one
  - `site` string: Site to probe instead of the stored one

## 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
- `404`: Integration not found.

---

[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)
