Create or Update Approver
Table of Contents
Assign a QReserve user as an approver for a resource, a site user, or a specific user and resource combination. Submitting the same approver and target updates the existing assignment. Use a site moderator’s API key for resource assignments or a site user manager’s key for user assignments.
POST /sites/{site_id}/approvers
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
site_id |
string | Yes | QReserve site ID. |
Request Body
For the individual-user workflow below, supply approver_user_id and at least one target. Use both target fields to scope the assignment to that user on that resource.
| Parameter | Type | Required | Description |
|---|---|---|---|
approver_user_id |
string | Yes | QReserve user ID of the approver. |
reservable_id |
string | Conditional | QReserve resource ID to which the assignment applies. |
user_id |
string | Conditional | QReserve user ID of the site user to whom the assignment applies. |
automatic |
boolean | No | Automatically approve matching requests. Defaults to false. |
silent |
boolean | No | Suppress approval-request emails to the approver. Defaults to false. |
When updating, send the desired value for both flags. Omitted flags default to false.
Example
Assign an approver for a resource or update the flags on the existing assignment.
curl -X POST 'https://api.qreserve.com/sites/SITE_ID/approvers' \
-H 'Authorization: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"approver_user_id":"APPROVER_USER_ID","reservable_id":"RESOURCE_ID","automatic":false,"silent":true}'
Response
A successful response confirms the assignment was processed. The accompanying data can differ depending on whether the assignment was created or updated and whether it requires verification. Use Get Resource Approvers or Get User Approvers to check the configured approvers.
See the Approvers API overview for related endpoints.