---
title: "Update an authorization policy"
method: PUT
path: "/policies/{reference}"
tags: ["Authorization"]
---

# Update an authorization policy

`PUT /policies/{reference}`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/policies/{reference}`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Updates a specified authorization policy.

## Path parameters

- `reference` string, required

## Request body

- PolicyDto
  - `principalId` string, nullable: Principal id associated to this policy if it is a principal based policy. This can be either a user id or a group id. This is null if the policy is a resource based policy.
  - `resourceId` string, nullable: Resource id associated to this policy if it is a resource based policy. This is null if the policy is a principal based policy.
  - `rules` RuleDto[], nullable: The rules associated to this policy.
    - `principalId` string, nullable: Principal id associated to this rule if the rule is associated to a resource based policy. This can be either a user id or a group id. This is null if the policy is a principal based policy.
    - `resourceId` string, nullable: Resource id associated to this rule if it is a principal based policy. For matter based policies, use `matters/{matterId}` for a single matter or `matters` for all matters. This is null if the associated policy is a resource based policy.
    - `operation` string: The operation associated to this rule. Possible values: 'Access','Execute'.
    - `type` 0 | 1

## Response `202`

When request is accepted. Returns a hypermedia 'Link' object of the authorization policy to be updated.

- Link
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable

## Other responses

- `400`: When request is invalid.
- `404`: When authorization policy does not exist

---

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