# Respond to Approval Request

<mark style="color:blue;">**`POST`**</mark> `https://api.sfox.com/v1`**`/approvals/:request_id`**

Approve or deny a request.

### Path Parameters

<table><thead><tr><th width="227">Parameter</th><th width="80">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>request_id</code></strong> <mark style="color:red;">required</mark></td><td>int</td><td>ID of the approval request generated by sFOX you wish to respond to</td></tr></tbody></table>

### Body Parameters

<table><thead><tr><th width="191">Parameter</th><th width="100">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>approve</code></strong> <mark style="color:red;">required</mark></td><td>boolean</td><td>Approves the request if true, denies the request if false</td></tr></tbody></table>

### Example Requests

{% tabs %}
{% tab title="Shell" %}

```bash
curl -X POST \
  -H 'Content-type: application/json' \
  -H 'Authorization: Bearer <API_TOKEN>' \
  --data '{ "approve": true}'  \
  'https://api.sfox.com/v1/approvals/1'
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
import requests

data = requests.post(
  "https://api.sfox.com/v1/approvals/1",
  headers={
    "Authorization": "Bearer <API_KEY>",
  },
  data={
    "approve": True
  }
)
print(data)
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

data = requests.patch(
  "https://api.sfox.com/v1/approval-rules/1",
  headers={
    "Authorization": "Bearer <API_KEY>",
  },
  data={
   "required_approvals": 3,
   "threshold": 500
  }
)
print(data)
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sfox.com/rest-api/custody/respond-to-approval-request.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
