---
title: "Accept policy suggestion"
url: https://hexelstudio.com/docs/api/titan/management/accept-policy-suggestion
---

# Accept policy suggestion

**POST** `/titan/management/deployments/{id}/policy/suggestions/{sid}:accept`

## Path parameters

- `id: string`

- `sid: string`

  The suggestion's id, stable across reads (sug_ and 32 hex).

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

## Body parameters

- `agent_ids: optional array of string`

- `all_agents: optional boolean`

- `approval_profile_id: optional string`

- `base_source_digest: string`

- `evidence_digest: optional string`

- `option: string`

## Returns

`200` Organization-scoped result. (`PolicySuggestionAccepted`)

- `added_rules: array of object`

  - `approval_profile_ids: array of string`

  - `connection_constraints: object`

    - `allowed_principal_types: optional array of string`

    - `provider: optional string`

    - `required_destination_boundaries: optional array of string`

    - `required_permissions: optional array of string`

    - `required_tags: optional array of string`

  - `effect: string`

  - `limits: object`

    - `maximum_concurrency: optional integer`

    - `maximum_cost_microunits: optional integer`

    - `maximum_response_bytes: optional integer`

    - `timeout_ms: optional integer`

  - `match: object`

    - `agent_ids: optional array of string`

    - `agent_revision_ids: optional array of string`

    - `attributes: optional array of object`

      - `name: string`

      - `operator: string`

      - `value: any`

    - `capability_contract_digests: optional array of string`

    - `capability_ids: optional array of string`

    - `capability_revisions: optional array of integer`

    - `delegation: optional string`

    - `delegator_ids: optional array of string`

    - `deployment_ids: optional array of string`

    - `destination_boundaries_all: optional array of string`

    - `destination_providers: optional array of string`

    - `environment_ids: optional array of string`

    - `environment_states: optional array of string`

    - `excluded_delegator_ids: optional array of string`

    - `minimum_assurance: optional string`

    - `operations: optional array of string`

    - `resource_ids: optional array of string`

    - `resource_types: optional array of string`

    - `risk_classes: optional array of string`

    - `runtime_classes: optional array of string`

    - `runtime_principal_ids: optional array of string`

    - `side_effect_classes: optional array of string`

    - `toolkits: optional array of string`

    - `utc_windows: optional array of object`

      - `end_minute: integer`

      - `start_minute: integer`

      - `weekday: integer`

    - `workspace_ids: optional array of string`

  - `mode: optional string`

  - `obligations: object`

    - `audit_profile_ids: optional array of string`

    - `audit_required: optional boolean`

    - `executor_obligation_profile_ids: optional array of string`

    - `idempotency_required: optional boolean`

    - `response_filter_profile_ids: optional array of string`

  - `priority: integer`

  - `rule_id: string`

- `option: string`

- `policy: object`

  - `deployment_id: string`

  - `enforcement_deployment_id: string`

  - `policy_source_id: string`

  - `source: any`

  - `source_digest: string`

  - `source_revision: integer`

- `suggestion_id: string`

## Errors

- `400` Invalid request, path or query (a preview needs exactly one option and at most one approval_profile_id; a template's scope is agent_id, repeated, or all_agents=true).
- `401` Missing or invalid authenticated context.
- `403` Organization mismatch, or the IAM action is denied: titan:policy:read to list and preview, titan:policy:publish to accept or dismiss; FORBIDDEN too when the deployment's Gateway refuses the caller's own token for its policy signals (titan:policy:read and titan:ledger:read).
- `404` Unknown or foreign deployment; SUGGESTION_NOT_FOUND when the suggestion is not open (unknown, dismissed or accepted); NOT_FOUND for every suggestions path while the caller's organization does not have policy suggestions.
- `405` HTTP method is not supported on this route.
- `409` SUGGESTION_STALE when base_source_digest is not the policy in force (read the suggestions again); the deployment is not a provisioned Titan Cloud or Titan Dedicated deployment (DEPLOYMENT_NOT_PROVISIONED), is retired (DEPLOYMENT_RETIRED) or has an operation in progress (OPERATION_IN_PROGRESS).
- `413` Request body exceeds its size limit.
- `415` Unsupported request media type.
- `422` SUGGESTION_INVALID: the suggestion does not offer the option, the approval profile is missing, unknown or not wanted, a template has no scope (agent_ids or all_agents), both, or an agent that is not an active agent of the deployment, another kind has a scope, the body is not the closed accept body, or the policy checks refuse the proposed policy.
- `502` The deployment's Configuration Authority refused or answered unexpectedly (closed code).
- `503` POLICY_SIGNALS_UNAVAILABLE when the deployment's Gateway evidence (GET /titan/v1/admin/policy-signals, read with the caller's own token) cannot be read or does not check out; CAPABILITY_BUNDLE_UNAVAILABLE when a suggestion is not found while the deployment's signed capability bundle (the source of template suggestions) cannot be read from its Configuration Authority or does not verify against the deployment's configuration key (the list then answers 200 with templates_unavailable); IDENTITY_BUNDLE_UNAVAILABLE when a template's agent_ids cannot be checked against the deployment's signed identity bundle; local storage or the deployment's Configuration Authority unavailable.

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/titan/management/deployments/{id}/policy/suggestions/{sid}:accept' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_ids": [
    "string"
  ],
  "all_agents": true,
  "approval_profile_id": "string",
  "base_source_digest": "string",
  "evidence_digest": "string",
  "option": "string"
}'
```

### Response (200)

```json
{
  "added_rules": [
    {
      "approval_profile_ids": [
        "string"
      ],
      "connection_constraints": {
        "allowed_principal_types": [
          "string"
        ],
        "provider": "string",
        "required_destination_boundaries": [
          "string"
        ],
        "required_permissions": [
          "string"
        ],
        "required_tags": [
          "string"
        ]
      },
      "effect": "string",
      "limits": {
        "maximum_concurrency": 0,
        "maximum_cost_microunits": 0,
        "maximum_response_bytes": 0,
        "timeout_ms": 0
      },
      "match": {
        "agent_ids": [
          "string"
        ],
        "agent_revision_ids": [
          "string"
        ],
        "attributes": [
          {
            "name": "string",
            "operator": "string",
            "value": "string"
          }
        ],
        "capability_contract_digests": [
          "string"
        ],
        "capability_ids": [
          "string"
        ],
        "capability_revisions": [
          0
        ],
        "delegation": "string",
        "delegator_ids": [
          "string"
        ],
        "deployment_ids": [
          "string"
        ],
        "destination_boundaries_all": [
          "string"
        ],
        "destination_providers": [
          "string"
        ],
        "environment_ids": [
          "string"
        ],
        "environment_states": [
          "string"
        ],
        "excluded_delegator_ids": [
          "string"
        ],
        "minimum_assurance": "string",
        "operations": [
          "string"
        ],
        "resource_ids": [
          "string"
        ],
        "resource_types": [
          "string"
        ],
        "risk_classes": [
          "string"
        ],
        "runtime_classes": [
          "string"
        ],
        "runtime_principal_ids": [
          "string"
        ],
        "side_effect_classes": [
          "string"
        ],
        "toolkits": [
          "string"
        ],
        "utc_windows": [
          {
            "end_minute": 0,
            "start_minute": 0,
            "weekday": 0
          }
        ],
        "workspace_ids": [
          "string"
        ]
      },
      "mode": "string",
      "obligations": {
        "audit_profile_ids": [
          "string"
        ],
        "audit_required": true,
        "executor_obligation_profile_ids": [
          "string"
        ],
        "idempotency_required": true,
        "response_filter_profile_ids": [
          "string"
        ]
      },
      "priority": 0,
      "rule_id": "string"
    }
  ],
  "option": "string",
  "policy": {
    "deployment_id": "string",
    "enforcement_deployment_id": "string",
    "policy_source_id": "string",
    "source": "string",
    "source_digest": "string",
    "source_revision": 0
  },
  "suggestion_id": "string"
}
```

### Response (400)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (401)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (403)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (404)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (405)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (409)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (413)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (415)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (422)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (502)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (503)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```
