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

# Update Consented Account

> Updates a consent by enabling or disabling an account. Use this endpoint when an end user wants to change whether or not an account is shared with an app.



## OpenAPI

````yaml openapi/consent-management/v4.yaml PUT /api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}
openapi: 3.0.0
info:
  title: Consent Management V4 API
  version: '4.0'
  contact:
    name: MX
    url: https://www.mx.com
  description: >-
    API for embedding the consent management dashboard into your customer-facing
    experience.
  termsOfService: https://www.mx.com/terms/
servers:
  - url: http://{baseurl}
security:
  - basicAuth: []
tags:
  - name: consent_management
    description: Consent Management
paths:
  /api/{version}/consent_management/{ConsentPublicId}/accounts/{AccountId}:
    put:
      tags:
        - consent_management
      summary: Update Consented Account
      description: >-
        Updates a consent by enabling or disabling an account. Use this endpoint
        when an end user wants to change whether or not an account is shared
        with an app.
      operationId: accountEnabledStatus
      parameters:
        - $ref: '#/components/parameters/ConsentPublicId'
        - $ref: '#/components/parameters/AccountId'
        - $ref: '#/components/parameters/version'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                enabled:
                  type: boolean
              required:
                - enabled
              x-examples:
                Example 1:
                  enabled: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Consent'
      security:
        - bearerAuth: []
components:
  parameters:
    ConsentPublicId:
      name: ConsentPublicId
      in: path
      required: true
      schema:
        type: string
      description: The consent id. This value is returned in the GET Consent List as `id`.
    AccountId:
      name: AccountId
      in: path
      required: true
      schema:
        type: string
      description: The account id selected for update.
    version:
      name: version
      in: path
      required: true
      schema:
        type: string
        default: v4
        example: v4
      description: API version. Indicates which FDX version is in use.
  schemas:
    Consent:
      type: object
      properties:
        id:
          type: string
          example: _sadfa3CKHJ23LKJHKJHLlNaODPmH1LqSb4
        application_name:
          type: string
          example: Centz
        application_icon_url:
          type: string
          example: https://www.example.com
          nullable: true
        created_at:
          type: string
          example: '2024-06-14T19:48:18.354Z'
        last_accessed:
          type: string
          example: '2024-05-14T19:48:31.352Z'
        accounts:
          type: array
          items:
            type: object
            properties:
              enabled:
                type: boolean
                example: true
              nickname:
                type: string
                example: Lacrosse Fund
              account_id:
                type: string
                example: '1234123412341234'
              account_number_display:
                type: string
                example: XXXXXXXX1111
        auto_enable_future_accounts:
          type: boolean
          example: true
        consented_on:
          type: string
          example: '2024-05-14T19:48:18.352Z'
        revoked_at:
          type: string
          nullable: true
          example: null
      description: Consent object
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
    bearerAuth:
      type: http
      scheme: bearer

````