> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wfa.team/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a decision

> Record an approval, rejection, cancellation or pending decision.



## OpenAPI

````yaml /openapi.json post /rwa_update
openapi: 3.1.0
info:
  title: WFA API
  version: test
  description: >-
    Draft Bubble test contract. Required inputs, exact envelopes and HTTP error
    statuses need verification before production.
servers:
  - url: https://wfa-team-tool-v1.bubbleapps.io/version-test/api/1.1/wf
    description: Bubble test environment
security:
  - companyToken: []
paths:
  /rwa_update:
    post:
      tags:
        - Assessments
      summary: Update a decision
      description: Record an approval, rejection, cancellation or pending decision.
      operationId: rwa_update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                assessmentId:
                  type: string
                  description: Assessment identifier returned by the create endpoint.
                  example: YOUR_TEST_ASSESSMENT_ID
                status:
                  type: string
                  description: >-
                    Decision status. Approved is a legacy alias for Compliance
                    Approved.
                  example: Compliance Approved
                  enum:
                    - Pending
                    - Manager Approved
                    - Compliance Approved
                    - Rejected
                    - Canceled
                complianceTeamMemberId:
                  type: string
                  description: >-
                    Registered, activated compliance Staff ID in the token’s
                    company. Required for Compliance Approved.
                  example: COMPLIANCE-001
                note:
                  type: string
                  description: Note to accompany the decision.
                  example: Reviewed by the compliance team
                externalEventId:
                  type: string
                  description: >-
                    Your event identifier. Required by the current test client;
                    upstream requirement and retry deduplication need
                    verification.
                  example: decision-001
                managerId:
                  type: string
                  description: >-
                    External manager Staff ID. Required for Manager Approved, or
                    can identify the actor for Rejected.
                cancelledByStaffId:
                  type: string
                  description: >-
                    Company Staff ID of the person cancelling the assessment.
                    Required for Canceled.
              required:
                - assessmentId
                - status
            example:
              assessmentId: YOUR_TEST_ASSESSMENT_ID
              status: Compliance Approved
              complianceTeamMemberId: COMPLIANCE-001
              note: Reviewed by the compliance team
              externalEventId: decision-001
      responses:
        '200':
          description: >-
            Workflow response. Check the JSON status: HTTP 200 can include an
            application error. Other HTTP error statuses have not yet been
            verified.
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - success
                      success:
                        type: boolean
                        const: true
                      message:
                        type: string
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - error
                      success:
                        type: boolean
                        const: false
                      message:
                        type: string
                      errors:
                        type: array
                        items:
                          type: object
                          properties:
                            field:
                              type: string
                            message:
                              type: string
              examples:
                success:
                  summary: Success
                  value:
                    status: success
                    success: true
                    message: RWA decision and note updated
                invalidToken:
                  summary: Invalid token
                  value:
                    status: error
                    success: false
                    message: Invalid authorization token
components:
  securitySchemes:
    companyToken:
      type: http
      scheme: bearer
      description: Your company API token. Keep it on your server.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.