Skip to content

compliance

Record an approval decision on a compliance item

POST/v1/compliance/approvals

Moves a compliance gap, a client's control or an evidence item to a new review status (reviewed, approved, rejected, changes requested or back to needs review) with the reviewer's attestation, under the allowed transitions, and records the decision in the approval history and the compliance action log. Approving recorded evidence takes a verdict, compliant or non-compliant, that becomes the evidence's compliance status and so counts toward the score; evidence that still needs review cannot be approved without one. When the verdict makes a control compliant, its open gaps are resolved, and they reopen if the control later stops being compliant. Only a person can record a decision; an agent acting for one is refused. A transition the current status does not allow answers a conflict.

Parameters

NameInRequiredTypeDescription
Idempotency-KeyheaderYesstringOpaque idempotency key, at most 255 characters, scoped to (tenant, principal, operation). A missing key is validation_failed.

Request body

  • targetType (required): string
  • targetId (required): string
  • approvalStatus (required): string
  • attestation (required): string
  • clientId: string
  • eventData: object
  • verdict: string

Responses and errors

  • 200

    Record an approval decision on a compliance item

    • eventId (required): string
    • priorStatus (required): string
    • approvalStatus (required): string
    • complianceStatus (required): object
  • 202

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • ApprovalRequiredError:
    • allOf: ErrorEnvelope
  • 400

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • ValidationFailedError:
    • allOf: ErrorEnvelope
  • 401

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • UnauthorizedError:
    • allOf: ErrorEnvelope
  • 403

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • ForbiddenError:
    • allOf: ErrorEnvelope
  • 409

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • ConflictError:
    • allOf: ErrorEnvelope
  • 429

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • RateLimitedError:
    • allOf: ErrorEnvelope
  • 503

    Error envelope. `error.code` carries the typed outcome and `error.type` resolves to its description.

    • UnavailableError:
    • allOf: ErrorEnvelope

Example

curl --request POST \
  --url 'https://api.scopable.io/v1/compliance/approvals' \
  --header 'Authorization: Bearer $SCOPABLE_API_KEY' \
  --data '<JSON request body>'

Replace $SCOPABLE_API_KEY with a key created in Settings, API; replace the request body placeholder with JSON matching the schema above.

View the OpenAPI 3.1 source

Need help with the API? …