---
title: "Preview or apply default tenant account-scope grants"
method: POST
path: "/tenant/account-scopes/default-policy/apply"
---

# Preview or apply default tenant account-scope grants

`POST /tenant/account-scopes/default-policy/apply`

## Request

- Base URL: `https://api.gravityads.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gravityads.dev/tenant/account-scopes/default-policy/apply`
- Auth: HTTP bearer

## Request body

- object
  - `role_ids` string[]
  - `permissions` string[]
  - `connection_id` string
  - `customer_group_id` string
  - `platform_account_ids` string[]
  - `granted_by` string
  - `dry_run` boolean
  - `max_grants` integer

## Response `200`

Default account-scope policy result

- object
  - `status` 'default_account_scope_policy_previewed' | 'default_account_scope_policy_applied' | 'default_account_scope_policy_unconfigured' | 'default_account_scope_policy_failed' | 'default_account_scope_policy_degraded', required
  - `tenant_id` string, required
  - `dry_run` boolean
  - `grant_count` integer
  - `affected_count` integer
  - `account_scope_count` integer
  - `account_scopes` object[]
  - `preview` object[]
  - `database_url_configured` boolean, required
  - `hosted_auth_context` object
  - `raw_secrets_returned` false, required

---

[API](https://skmtc.dev/gravityads/apis/gravityads-api.md) · [All operations](https://skmtc.dev/gravityads/apis/gravityads-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gravityads/apis/gravityads-api/revisions/124cd07d534d?raw)
