> Markdown version of https://tuna.am/en/docs/api/secrets-change-request-approve/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# Approve a request block

post`/v1/secrets/change_requests/{id}/units/{unit_id}/approve`

## Request

### Authorization

* **Authorization**stringheaderrequired

  Key in the format `Bearer <API-key>`. Create a key on the [API keys](https://my.tuna.am/api_keys) page.

### Path Parameters

* **id** integer\<int64>required

  Request ID

* **unit_id** integer\<int64>required

  Block ID

### Response

200application/json

* **author** object

  **active**boolean

  Active flag

  **avatar_url**string

  Avatar

  **Example:&#x20;**`https://www.gravatar.com/avatar/00000000000000000000000000000000`

  **email**string

  Email

  **Example:&#x20;**`jane@example.com`

  **id**integer\<int64>

  Identifier

  **Example:&#x20;**`42`

  **name**string

  Name

  **Example:&#x20;**`Jane Doe`

  **role**string

  Role

  **Possible values:** \[`primary_owner`, `owner`, `admin`, `member`]

  **Example:&#x20;**`member`

  **awaiting_my_review**boolean

  Someone else's request with a block awaiting the current member's approval

  **can_close**boolean

  The request can be closed

  **can_edit**boolean

  The title and description can be changed

  **created_at**string\<date-time>

  Creation date

  **description**string

  Description

  **id**integer\<int64>

  Identifier

  **project**string

  Project alias

  **reviewers** object\[]

  Assigned reviewers: if there are any, the request waits for review only from them

  Array \[
* **active**boolean

  Active flag

  **avatar_url**string

  Avatar

  **Example:&#x20;**`https://www.gravatar.com/avatar/00000000000000000000000000000000`

  **email**string

  Email

  **Example:&#x20;**`jane@example.com`

  **id**integer\<int64>

  Identifier

  **Example:&#x20;**`42`

  **name**string

  Name

  **Example:&#x20;**`Jane Doe`

  **role**string

  Role

  **Possible values:** \[`primary_owner`, `owner`, `admin`, `member`]

  **Example:&#x20;**`member`

  ]
* **status**string

  Status: open, closed

  **Possible values:** \[`open`, `closed`]

  **summary**string

  Overall status across all blocks: draft, review, approved, applied, partially_applied, canceled

  **Possible values:** \[`draft`, `review`, `approved`, `applied`, `partially_applied`, `canceled`]

  **title**string

  Title

  **units** object\[]

  Change blocks by configuration

  Array \[
* **applied_at**string\<date-time>

  Applied date

  **applied_by** object

  **active**boolean

  Active flag

  **avatar_url**string

  Avatar

  **Example:&#x20;**`https://www.gravatar.com/avatar/00000000000000000000000000000000`

  **email**string

  Email

  **Example:&#x20;**`jane@example.com`

  **id**integer\<int64>

  Identifier

  **Example:&#x20;**`42`

  **name**string

  Name

  **Example:&#x20;**`Jane Doe`

  **role**string

  Role

  **Possible values:** \[`primary_owner`, `owner`, `admin`, `member`]

  **Example:&#x20;**`member`

  **approvals** object\[]

  Active members with write access to the environment who approved the block; whether their approvals count toward policies is shown in policies

  Array \[
* **active**boolean

  Active flag

  **avatar_url**string

  Avatar

  **Example:&#x20;**`https://www.gravatar.com/avatar/00000000000000000000000000000000`

  **email**string

  Email

  **Example:&#x20;**`jane@example.com`

  **id**integer\<int64>

  Identifier

  **Example:&#x20;**`42`

  **name**string

  Name

  **Example:&#x20;**`Jane Doe`

  **role**string

  Role

  **Possible values:** \[`primary_owner`, `owner`, `admin`, `member`]

  **Example:&#x20;**`member`

  ]
* **approved**boolean

  The block is approved: all policies are met, or, with no policies, there is an approval from an active member with write access to the environment

  **approved_by_me**boolean

  The current member has approved the block

  **can_edit**boolean

  The block's changes and status can be edited

  **can_review**boolean

  The block can be approved and applied

  **changes** object\[]

  Changes; not populated in the request list

  Array \[
* **base** object

  **exists**boolean

  The secret existed

  **masked**boolean

  Value not returned: the block wasn't revealed with the reveal parameter

  **note**string

  Note

  **value**string

  Value

  **value_type**string

  Type

  **Possible values:** \[`string`, `json`, `boolean`, `integer`, `decimal`, `email`, `url`, `yaml`, `xml`, `date`, `datetime`]

  **visibility**string

  Visibility

  **Possible values:** \[`masked`, `unmasked`, `restricted`]

  **hidden**boolean

  The value and note were entered by another member, and the current member has no access to the environment

  **masked**boolean

  Value not returned: the block wasn't revealed with the reveal parameter

  **name**string

  Name

  **note**string

  Note

  **original_name**string

  Original name

  **outdated**boolean

  The secret changed after the block was created or edited

  **should_delete**boolean

  Delete

  **value**string

  Value

  **value_type**string

  Type

  **Possible values:** \[`string`, `json`, `boolean`, `integer`, `decimal`, `email`, `url`, `yaml`, `xml`, `date`, `datetime`]

  **visibility**string

  Visibility

  **Possible values:** \[`masked`, `unmasked`, `restricted`]

  ]
* **config**string

  Configuration alias

  **created_at**string\<date-time>

  Creation date

  **environment**string

  Environment alias

  **id**integer\<int64>

  Identifier

  **outdated**boolean

  Secrets changed after the block was created or edited

  **policies** object\[]

  Policies that apply to the block, with approval progress; not populated in the request list

  Array \[
* **disallow_self_approval**boolean

  The request author's approval doesn't count

  **id**integer\<int64>

  Policy ID

  **name**string

  Name

  **rules** object\[]

  Rules with progress

  Array \[
* **approvals**integer\<int64>

  Number of approvals counted

  **required_approvals**integer\<int64>

  Number of approvals required

  **reviewers** object\[]

  Whose approvals count, with members who left marked active=false; empty means anyone who can approve

  Array \[
* **active**boolean

  Active flag

  **avatar_url**string

  Avatar

  **Example:&#x20;**`https://www.gravatar.com/avatar/00000000000000000000000000000000`

  **email**string

  Email

  **Example:&#x20;**`jane@example.com`

  **id**integer\<int64>

  Identifier

  **Example:&#x20;**`42`

  **name**string

  Name

  **Example:&#x20;**`Jane Doe`

  **role**string

  Role

  **Possible values:** \[`primary_owner`, `owner`, `admin`, `member`]

  **Example:&#x20;**`member`

  ]
* **reviewers_can_satisfy**boolean

  Same, but among assigned reviewers: only they are asked to approve. With no assigned reviewers, matches satisfiable

  **satisfiable**boolean

  The rule can still be met: counted approvals plus members who can approve the block in a way that counts reach the required number

  ]
* **satisfied**boolean

  All rules are met

  ]
* **reviewers_can_approve**boolean

  At least one assigned reviewer can approve the block; true if none are assigned

  **revision**integer\<int64>

  Block revision, passed when approving

  **self_approval_disallowed**boolean

  The current member is the request author, and a policy forbids them from approving the block

  **status**string

  Status: draft, open, canceled, applied

  **Possible values:** \[`draft`, `open`, `canceled`, `applied`]

  **updated_at**string\<date-time>

  Updated date

  ]

  **updated_at**string\<date-time>

  Updated date
