---
title: "Associate Policy Guard Scope"
method: POST
path: "/v2/policy_guards/scopes/{policy_guard_scope_id}/associate"
tags: ["Policy Guards (EAP)"]
---

# Associate Policy Guard Scope

`POST /v2/policy_guards/scopes/{policy_guard_scope_id}/associate`

associate a project to a Policy guard scope.

## Path parameters

- `policy_guard_scope_id` string, required — Either the unique id of the policy_guard_scope, or the URL-friendly key of the policy_guard_scope (i.e: the "slug").

## Query parameters

- `wait` number — Time in seconds to wait for the task to complete. Default is 0, means no wait.

## Request body

- PolicyGuardScopeAssociate
  - `project_id` string, required — The unique identifier of the project of this policy scope.

## Response `200`

Successful Response

- TaskResultPolicyGuardScopeRead
  - `task_id` string, required — The unique id of the task.
  - `status` 'processing' | 'success' | 'failure' | 'cancelled', required — An enumeration.
  - `result` PolicyGuardScopeRead
    - `key` string, required — The unique key of the policy guard scope.
    - `id` string, uuid, required — Unique id of the ScopeConfig
    - `organization_id` string, uuid, required — Unique id of the organization that the ScopeConfig belongs to.
    - `policy_guard_scope_details` PolicyGuardScopeDetail[] — list of projects that this policy guard is assigned to.
      - `project_id` string, uuid, required — Unique id of the project that the ScopeConfig belongs to.
  - `error` ErrorDetails
    - `id` string, required
    - `title` string, required
    - `support_link` string, uri
    - `error_code` 'INVALID_INPUT' | 'INVALID_JWKS_CONFIGURATION' | 'UNEXPECTED_ERROR' | 'NOT_FOUND' | 'DUPLICATE_ENTITY' | 'EMPTY_DECISION_LOGS' | 'MISSING_REQUEST_ATTRIBUTE' | 'FORBIDDEN_ACCESS' | 'INVALID_PERMISSION_FORMAT' | 'MISSING_PERMISSIONS' | 'UNSUPPORTED_ATTRIBUTE_TYPE' | 'MISSING_RESOURCE_ATTRIBUTE' | 'MISMATCH_ATTRIBUTES_TYPES' | 'INVALID_POLICY_REPO_STATUS' | 'INVALID_SMTP_CONFIGURATION' | 'MISMATCH_RESOURCE_INSTANCES_TENANTS' | 'PAGINATION_SIZE_OVERREACHED' | 'MISMATCH_RELATION_TYPE' | 'CONCURRENT_OPERATION_DISALLOWED' | 'UNAUTHORIZED', required — An enumeration.
    - `message` string
    - `additional_info` unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/permit/apis/permit-io-api.md) · [All operations](https://skmtc.dev/permit/apis/permit-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/permit/permit-io-api/revisions/0235743bf8a2/schema)
