Skip to main content

Approve an assessment

POST 

/api/v2/assessments/:id/approve

Approves an assessment, so a procurement system driving assessments over the API can sign off without a user opening the app. This performs the same status transition as approving in the app: every required question must be answered first, and the same downstream effects fire.

This endpoint is a service-level call, and its authorization differs from approving in the app. In the app, the approval is gated on the signed-in user's own permission to approve. Over the API, the gate is the API token's write access — the token is what is authorized to approve. The approved_by_email you supply is used only for attribution: it records who the approval is credited to, both as the sign-off name and as the actor of the change-history entry (which is marked as API-originated). It can name any active user in your account, including one who would not be permitted to approve the assessment in the app. Any caller holding a write-enabled token can therefore approve on behalf of any active user, so treat the token as the trust boundary.

The email must still match exactly one active user in your account, or the request is rejected and nothing is approved. It cannot be used once the assessment is approved or cancelled. Supply the optional last_updated token for optimistic concurrency; omitting it skips the concurrency check and approves the latest assessment state at request time.

Request

Responses

Assessment approved

 

Need help?
If you have any questions, please reach out to your dedicated Account Manager or contact us at support@datagrail.io.

Disclaimer: The information contained in this message does not constitute as legal advice. We would advise seeking professional counsel before acting on or interpreting any material.