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

# Set attestation workflow check outcomes

> Set the outcome of one or more attestation workflow checks for testing purposes. Once all checks are approved, the attestation succeeds and the account becomes active. This is only available in sandbox and development environments.

This endpoint should be called in Sandbox, only after an attestation has been made. It allows you to set the state of each individual "check" performed after an attestation is submitted.

Calling [Get overview](https://developer.uphold.com/rest-apis/core-api/kyb/get-overview.md) with `?detailed=attestation` returns the checks at `processes.attestation.output.checks`. Each of these "checks" forms part of Uphold's compliance process. Once all checks complete successfully, the attestation process status becomes `ok`. This does not by itself grant trading access: check the user's `trades` capability, and its requirements, with [Get user capability](https://developer.uphold.com/rest-apis/core-api/capabilities/get-user-capability.md).

> [!NOTE]
>
> Setting any check to "rejected" functions as a Request For Information (RFI).
> Setting any check to "blocked" will mark the case as rejected, and block the
> account.

> [!WARNING]
>
> Once a user is blocked, requests to non-`GET` endpoints fail with a `409` (see
> [User blocked](https://developer.uphold.com/rest-apis/authentication.md#user-blocked)), so you will not be able
> to call this helper again to reset the state. Run the `blocked` scenario last,
> or use a separate Sandbox business user, so you do not lose access to your
> reusable test account.


## OpenAPI

````yaml _media/specs/core-openapi.mintlify.json post /core/kyb/test-helpers/attestation-state
openapi: 3.1.0
info:
  version: 0.1.0
  title: Core API
  description: >-
    The Core API provides essential building blocks that empower businesses to
    embed financial services into their applications.
  contact:
    name: Uphold API Team
    email: developers@uphold.com
    url: https://developer.uphold.com
servers:
  - url: https://api.enterprise.sandbox.uphold.com
    description: Sandbox
  - url: https://api.enterprise.uphold.com
    description: Production
security:
  - OAuth2: []
tags:
  - name: Authentication
    description: Authentication.
  - name: Countries
    description: Countries.
  - name: Users
    description: Users.
  - name: KYC
    description: Individual User's KYC.
  - name: KYB
    description: Business User's KYB.
  - name: Capabilities
    description: User capabilities.
  - name: Terms of service
    description: User terms of service.
  - name: Files
    description: Files.
  - name: Assets
    description: Assets, networks and rails.
  - name: Accounts
    description: Accounts.
  - name: External accounts
    description: External accounts.
  - name: Transactions
    description: Transactions.
  - name: Requests for information
    description: Requests for information.
  - name: Portfolio
    description: Portfolio.
  - name: Statements
    description: Statements.
  - name: Metadata
    description: Metadata.
  - name: Webhooks
    description: Webhooks.
paths:
  /core/kyb/test-helpers/attestation-state:
    post:
      tags:
        - KYB
      summary: Set attestation workflow check outcomes
      description: >-
        Set the outcome of one or more attestation workflow checks for testing
        purposes. Once all checks are approved, the attestation succeeds and the
        account becomes active. This is only available in sandbox and
        development environments.
      operationId: core.set-kyb-attestation-state
      requestBody:
        $ref: '#/components/requestBodies/set-attestation-state-request-body'
      responses:
        '204':
          $ref: '#/components/responses/set-attestation-state-response'
        '409':
          $ref: '#/components/responses/set-attestation-state-conflict-response'
      security:
        - OAuth2:
            - core.kyb:use-test-helpers
components:
  requestBodies:
    set-attestation-state-request-body:
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              checks:
                type: array
                description: >-
                  An array of attestation workflow check outcomes to set. If a
                  code appears more than once, the last outcome is applied.
                items:
                  $ref: '#/components/schemas/attestation-check-outcome'
                minItems: 1
                uniqueItems: true
            required:
              - checks
          examples:
            Approve Business Registry:
              value:
                checks:
                  - code: business-registry
                    outcome: approved
            Mixed Outcomes:
              value:
                checks:
                  - code: business-registry
                    outcome: approved
                  - code: business-screening
                    outcome: rejected
            Block on Adverse Media:
              value:
                checks:
                  - code: business-adverse-media
                    outcome: blocked
  responses:
    set-attestation-state-response:
      description: Attestation state set successfully.
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
          examples:
            Request ID:
              value: a4e390583b3ac581-MRS
    set-attestation-state-conflict-response:
      description: Business logic error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          examples:
            Legacy Business User Not Allowed:
              value:
                code: operation_not_allowed
                message: >-
                  Legacy business users are not allowed to access the KYB
                  endpoints
                details:
                  reasons:
                    - legacy-business-user-not-allowed
            KYB Process Update Not Allowed:
              value:
                code: operation_not_allowed
                message: The current status of the process does not allow updates
                details:
                  reasons:
                    - kyb-process-update-not-allowed
      headers:
        x-uphold-request-id:
          description: >-
            A unique identifier for the request that can be shared with Uphold
            for troubleshooting purposes.
          required: true
          schema:
            type: string
          examples:
            Request ID:
              value: a4e390583b3ac581-MRS
  schemas:
    attestation-check-outcome:
      type: object
      properties:
        code:
          description: The attestation workflow check code.
          type: string
          enum:
            - associated-persons-address-lookup
            - associated-persons-screening
            - associated-persons-tin-database
            - business-address-lookup
            - business-adverse-media
            - business-associated-persons
            - business-classification
            - business-documents
            - business-online-presence
            - business-registrations
            - business-registry
            - business-screening
            - business-tin-database
            - licensing-verification
        outcome:
          description: >-
            The desired outcome for the workflow check. Note that blocked will
            permanently block the Uphold account.
          type: string
          enum:
            - approved
            - blocked
            - rejected
      required:
        - code
        - outcome
    error:
      description: The error information.
      allOf:
        - $ref: '#/components/schemas/feedback'
    feedback:
      description: A feedback message with a code and human-readable description.
      type: object
      properties:
        code:
          description: A short string with a brief explanation about the code reported.
          type: string
        message:
          description: A human-readable message providing more details.
          type: string
        details:
          description: Additional information about the feedback reported.
          type: object
          additionalProperties: true
      required:
        - code
        - message
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authentication.
      flows:
        clientCredentials:
          tokenUrl: /core/oauth2/token
          scopes:
            core.users:act-on-behalf-of: Grants access to act on behalf of a user
            core.users:create: Grants access to create users
            core.users:read: Grants access to view users
            core.users:delete: Grants access to delete users
            core.users.metadata:read: Grants access to view user metadata
            core.users.metadata:write: Grants access to modify user metadata
            core.kyc:read: Grants access to view KYC processes
            core.kyc.profile:update: Grants access to update profile KYC process
            core.kyc.address:update: Grants access to update address KYC process
            core.kyc.email:update: Grants access to update email KYC process
            core.kyc.phone:update: Grants access to update phone KYC process
            core.kyc.identity:update: Grants access to update identity KYC process
            core.kyc.proof-of-address:update: Grants access to update proof-of-address KYC process
            core.kyc.customer-due-diligence:update: Grants access to update customer due diligence KYC process
            core.kyc.enhanced-due-diligence:update: Grants access to update enhanced due diligence KYC process
            core.kyc.crypto-risk-assessment:update: Grants access to update crypto risk assessment KYC process
            core.kyc.self-categorization-statement:update: Grants access to update self-categorization statement KYC process
            core.kyc.tax-details:update: Grants access to update tax details KYC process
            core.kyb:read: Grants access to view KYB processes
            core.kyb.profile:update: Grants access to update profile KYB process
            core.kyb.documents:update: Grants access to update documents KYB process
            core.kyb.financial-institution:update: Grants access to update financial institution KYB process
            core.kyb.associated-persons:create: Grants access to create KYB associated persons
            core.kyb.associated-persons:read: Grants access to view KYB associated persons
            core.kyb.associated-persons:delete: Grants access to delete KYB associated persons
            core.kyb.associated-persons.profile:update: Grants access to update profile KYB associated person process
            core.kyb.associated-persons.identity:update: Grants access to update identity KYB associated person process
            core.kyb.associated-persons.proof-of-address:update: >-
              Grants access to update proof-of-address KYB associated person
              process
            core.kyb:use-test-helpers: Grants access to test helpers for KYB
            core.kyb.attestation:trigger: Grants access to trigger the attestation process
            core.capabilities:read: Grants access to view user capabilities
            core.terms-of-service:read: Grants access to view terms of service
            core.terms-of-service:accept: Grants access to accept terms of service
            core.files:create: Grants access to create files
            core.files:read: Grants access to view files
            core.files.metadata:read: Grants access to view files metadata
            core.files.metadata:write: Grants access to modify files metadata
            core.accounts:create: Grants access to create accounts
            core.accounts:read: Grants access to view accounts
            core.accounts:update: Grants access to update accounts
            core.accounts:archive: Grants access to archive accounts
            core.accounts:deposit-method: >-
              Grants access to deposit method needed for depositing into
              accounts
            core.accounts:use-test-helpers: Grants access to test helpers of accounts
            core.accounts.metadata:read: Grants access to view accounts metadata
            core.accounts.metadata:write: Grants access to modify accounts metadata
            core.assets:use-test-helpers: Grants access to test helpers of assets
            core.external-accounts:create: Grants access to create external accounts
            core.external-accounts:read: Grants access to view external accounts
            core.external-accounts:update: Grants access to update external accounts
            core.external-accounts:delete: Grants access to delete external accounts
            core.external-accounts.metadata:read: Grants access to view external accounts metadata
            core.external-accounts.metadata:write: Grants access to modify external accounts metadata
            core.transactions:create: Grants access to create transactions (commit quotes)
            core.transactions.quotes:create: Grants access to create quotes
            core.transactions.quotes:simulate: Grants access to simulate quotes
            core.transactions:read: Grants access to view transactions
            core.transactions.metadata:read: Grants access to view transactions metadata
            core.transactions.metadata:write: Grants access to modify transactions metadata
            core.transactions.requests-for-information:read: Grants access to view transactions requests for information
            core.transactions.requests-for-information:update: Grants access to update transactions requests for information
            core.requests-for-information:read: Grants access to view requests for information
            core.requests-for-information:update: Grants access to update requests for information
            core.portfolio:read: >-
              Grants access to view portfolio overview, performance, and
              historical balance
            core.statements:read: Grants access to read statements
            core.webhooks:management-link: Grants access to create webhook management links

````