ZenLedger Compliance Suite API

Digital-asset trade-monitoring and crypto tax-compliance REST API (v3) for financial institutions and enterprise compliance teams. Registers companies and their users, imports exchange accounts and wallets over a signed and AES-256 encrypted request, returns normalized transactions and per-source holdings, screens blockchain addresses against sanctions lists, exposes Polymarket positions, and serves supported currency, source and chain reference data. Authenticated with an OAuth 2.0 client_credentials JWT that expires in 30 minutes. Import completion, import-limit and wallet-screening events are delivered as webhooks.

Operations 27

POST /oauth/token JWT request #
GET /compliance/api/v3/companies GET companies #
POST /compliance/api/v3/companies CREATE company #
GET /compliance/api/v3/companies/{company_reference} GET company #
DELETE /compliance/api/v3/companies/{company_reference} DELETE company #
PUT /compliance/api/v3/companies/{company_reference} UPDATE company details #
GET /compliance/api/v3/companies/{company_reference}/users GET company users #
POST /compliance/api/v3/companies/{company_reference}/users CREATE company user #
GET /compliance/api/v3/companies/{company_reference}/users/{user_id} GET company user #
PUT /compliance/api/v3/companies/{company_reference}/users/{user_id} UPDATE user details #
DELETE /compliance/api/v3/companies/{company_reference}/users/{user_id} DELETE company user #
GET /compliance/api/v3/companies/{company_reference}/users/{user_id}/transactions GET transactions for user #
GET /compliance/api/v3/companies/{company_reference}/transactions GET transactions for all user of a company #
GET /compliance/api/v3/companies/{company_reference}/users/{user_id}/holdings GET holdings for user #
GET /compliance/api/v3/companies/{company_reference}/users/{user_id}/holdings/{source_id} GET holdings for user by source #
DELETE /compliance/api/v3/companies/{company_reference}/users/{user_id}/holdings/{source_id} DELETE user source #
GET /compliance/api/v3/companies/{company_reference}/holdings GET holdings for all users of a company #
GET /compliance/api/v3/companies/{company_reference}/holdings/{source_id}/resync GET resync source #
GET /compliance/api/v3/companies/{company_reference}/holdings/{source_id}/resume GET resume source #
GET /compliance/api/v3/companies/{company_reference}/users/{user_id}/polymarkets GET polymarkets for user #
GET /compliance/api/v3/companies/{company_reference}/polymarkets GET polymarkets for all users of a company #
POST /compliance/api/v3/companies/{company_reference}/users/{user_id}/imports POST wallet #
POST /compliance/api/v1/companies/{company_reference}/users/{user_id}/imports POST exchange #
GET /compliance/api/v3/screening GET Wallet Screening Report #
GET /compliance/api/v3/currencies GET currencies #
GET /compliance/api/v3/sources GET sources #
GET /compliance/api/v3/chains GET chains #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zenledger-compliance-suite-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zenledger-compliance-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: ZenLedger Compliance Suite API
  version: v3
  description: 'REST surface of the ZenLedger Compliance Suite — the digital-asset trade-monitoring and crypto tax-compliance
    API financial institutions and enterprises use to register companies and users, import exchange accounts and
    wallets, read normalized transactions and holdings, screen wallet addresses against sanctions lists, and look
    up the supported currencies, sources and chains.


    DERIVED, NOT PUBLISHED BY THE PROVIDER. ZenLedger publishes no OpenAPI. This document was mechanically derived
    by API Evangelist from the first-party Postman collection "V3::Compliance Suite: REST API Reference", published
    by ZenLedger at https://docs.zenledger.io/compliance/v3/compliance_api.postman_collection.json and saved verbatim
    in this repo at postman/zenledger-compliance-v3.postman_collection.json. Every path, method, header, documented
    parameter, example request body and example response below is carried over from that collection; nothing was
    invented. Request/response schemas are typed as generic objects because the collection carries examples, not
    schemas. Each operation records its original collection URL template in x-postman-request.'
  contact:
    name: ZenLedger
    url: https://zenledger.io/contact-us/
    email: support@zenledger.io
  termsOfService: https://zenledger.io/legal/
  x-generated-by: API Evangelist enrichment pipeline (derived from the provider-published Postman collection)
  x-source: postman/zenledger-compliance-v3.postman_collection.json
  x-source-url: https://docs.zenledger.io/compliance/v3/compliance_api.postman_collection.json
servers:
- url: https://api.zenledger.io
  description: ZenLedger production API host. The published collection resolves {{base_url}} to https://api.zenledger.io
    in every saved example response.
tags:
- name: Authentication
  description: OAuth 2.0 client_credentials token issuance.
- name: Companies
  description: Enterprise tenants registered under the Compliance Suite account.
- name: Users
  description: End users tracked under a company.
- name: Transactions
  description: Normalized crypto transactions for a user or across a company.
- name: Holdings
  description: Per-source balances and import state for a user or company.
- name: Polymarkets
  description: Polymarket prediction-market positions.
- name: Imports
  description: Wallet and exchange-account import (signed and encrypted).
- name: Wallet Screening
  description: Sanctions and risk screening for a blockchain address.
- name: Supported Currencies
  description: Currency reference data.
- name: Supported Exchanges and Wallets
  description: Supported exchange/wallet source reference data.
- name: Supported Chains
  description: Supported blockchain reference data.
paths:
  /oauth/token:
    post:
      operationId: jwtRequest
      summary: JWT request
      description: "The server response can vary based on the validity of the provided POST body:\n\n- **Success\
        \ (HTTP status 200):**\n    - **Headers:** The response includes various headers such as `Content-Type`,\
        \ `Cache-Control`, `Expires`, and more.\n    - **Body:** The response body is a JSON object containing the\
        \ `access_token`, `token_type`, `expires_in`, and `scope` fields. The `access_token` is the JWT that should\
        \ be included in the `Authorization` header for subsequent API requests.\n- **Unauthorized (HTTP status\
        \ 401):**\n    - **Headers:** The response includes various headers such as `Content-Type`, `Cache-Control`,\
        \ `Expires`, and more.\n    - **Body:** The response body is a JSON object containing the `error` and `error_description`\
        \ fields, indicating an invalid client or failed authentication.\n- **Bad Request (HTTP status 400):**\n\
        \    - **Headers:** The response includes various headers such as `Content-Type`, `Cache-Control`, `Expires`,\
        \ and more.\n    - **Body:** The response body is a JSON object containing the `error` and `error_description`\
        \ fields, indicating an invalid request."
      tags:
      - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              client_id: '{{oauth_client_id}}'
              client_secret: '{{oauth_client_secret}}'
              grant_type: client_credentials
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                JWT_request_success:
                  value:
                    access_token: access_token
                    token_type: Bearer
                    expires_in: 1800
                    scope: public
                    created_at: 1686752196
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              examples:
                JWT_request_invalid_client:
                  value:
                    error: invalid_client
                    error_description: Client authentication failed due to unknown client, no client authentication
                      included, or unsupported authentication method.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
              examples:
                JWT_request_invalid_request:
                  value:
                    error: invalid_request
                    error_description: 'Missing required parameter: grant_type.'
      security: []
      x-postman-request: '{{base_url}}/oauth/token'
  /compliance/api/v3/companies:
    get:
      operationId: getCompanies
      summary: GET companies
      description: '### GET **/companies**


        **Returns** a list of all active companies that exist in the system by making a GET request to the path
        `/compliance/api/v3/companies` on the base URL.


        This endpoint requires authentication via a bearer token, provided in the Authorisation header of the request.


        ### Request


        ##### QUERY PARAMETERS


        > NONE


        ##### RESPONSE `200`


        ##### RESPONSE DATA


        > **api_version** `string` Version of the targeted API

        >

        > **data** `string` Wrapper for response data (See response example)'
      tags:
      - Companies
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                GET_companies_success:
                  value:
                    api_version: '3.0'
                    data:
                    - reference: tu7vS9DL6gLqrAwMikRJ
                      name: A Company
                      created_at: '2023-06-01T17:13:01.087Z'
                      updated_at: '2023-06-01T17:13:01.087Z'
                    - reference: FSOLPzrHGKiiZinvKOrn
                      name: Another Company
                      created_at: '2023-06-01T17:31:35.194Z'
                      updated_at: '2023-06-01T17:31:35.194Z'
                    - reference: c5KqB1RoKMOmuc15Mz9B
                      name: New name of company
                      created_at: '2023-06-01T17:33:05.828Z'
                      updated_at: '2023-06-01T19:44:58.498Z'
                    - reference: 1RoKc155KqBMz9BMOmu
                      name: Company Name
                      created_at: '2023-06-02T07:48:44.305Z'
                      updated_at: '2023-06-02T07:48:44.305Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
              examples:
                GET_companies_unauthorized:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                    - code: ZENCS-AUTHGET-AA2
                      message: Unauthorised
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies'
    post:
      operationId: createCompany
      summary: CREATE company
      description: "### POST **/companies**\n\nAll API requests to this endpoint must be **signed and encrypted**\
        \ to ensure integrity and security. The signing process is explained in the **Request Signature and Encryption**\
        \ section and ensures that the request is authenticated and has not been tampered with. Encryption protects\
        \ sensitive data during transmission.\n\n**Creates** a new company which is linked to the enterprise by\
        \ making a POST request to the `/compliance/api/v3/companies/` endpoint is used to create a new company\
        \ in the system.\n\nThis endpoint requires authentication via a bearer token, provided in the Authorisation\
        \ header of the request.\n\n### Request\n\n##### QUERY PARAMETERS\n\n> NONE\n\n##### BODY\n\n*In JSON format\n\
        \n> **name** (optional) `string` Legal name of the company\n> \n> **reference** `string` Own company reference\n\
        > \n> **import_notification_url** (optional) `string` if set, Webhook notifications will be sent here after\
        \ each import completed. For security reasons, this value will never be returned by the API.\n> \n> **domain_target_url**\
        \ (optional) `string` This parameter is required for proper functioning of the Iframe integration. When\
        \ importing accounts via Iframe, the integration uses postMessage to communicate with the parent window.\
        \ This attribute should be set to the domain where the parent application (the Iframe container) is hosted\
        \ — for example, [https://app.partnerdomain.com](https://app.partnerdomain.com). It ensures messages are\
        \ correctly delivered and received between the Iframe and its parent.\n> \n> Alternatively, the value \"\
        default\" can be used. In that case, the domain will be set to the parent enterprise’s default_url, if defined,\
        \ at the time the request is received by ZenLedger.\n> \n> *   For security reasons, this value will never\
        \ be returned in API responses.\n\n##### RESPONSE `200`\n\n##### RESPONSE DATA\n\n> **api_version** `string`\
        \ Version of the targeted API\n> \n> **data** `string` Wrapper for response data (See response example)"
      tags:
      - Companies
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              name: Company Name
              reference: '{{company_reference}}'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                CREATE_company_success:
                  value:
                    api_version: '3.0'
                    data:
                      reference: tu7vS9DL6gLqrAwMikRJ
                      name: Company Name
                      created_at: '2023-06-02T07:48:44.305Z'
                      updated_at: '2023-06-02T07:48:44.305Z'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
              examples:
                CREATE_company_duplicate_id:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPPST-AA2
                      message: Duplicated External ID for company
                CREATE_company_reference_not_allowed:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPPST-AA1
                      message: Could not add company
                CREATE_company_active_companies_limit_reached:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPPST-AA3
                      message: Maximum number of active companies limit exceeded
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies/'
  /compliance/api/v3/companies/{company_reference}:
    get:
      operationId: getCompany
      summary: GET company
      description: '### GET **/companies/**{companyReference}


        **Returns** the details of the requested company by making a GET request to the path `/compliance/api/v3/companies/{company_reference}`
        on the base URL


        This endpoint requires authentication via a bearer token, provided in the Authorisation header of the request.


        ### Request


        ##### QUERY PARAMETERS


        > NONE


        ##### RESPONSE `200`


        ##### RESPONSE DATA


        > **api_version** `string` Version of the targeted API

        >

        > **data** `string` Wrapper for response data (See response example)'
      tags:
      - Companies
      parameters:
      - name: company_reference
        in: path
        required: true
        schema:
          type: string
        description: Path variable company_reference (from the Postman collection URL template).
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                GET_company_success:
                  value:
                    api_version: '3.0'
                    data:
                      reference: c155KqBMz9Bc155KqBMz9B
                      name: company name
                      created_at: '2023-05-31T08:14:43.332Z'
                      updated_at: '2023-05-31T08:14:43.332Z'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              examples:
                GET_company_company_not_found:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPGET-AA3
                      message: Could not find company
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies/{{company_reference}}'
    delete:
      operationId: deleteCompany
      summary: DELETE company
      description: '### DELETE **/companies/**{companyReference}


        **Deletes** a company which is linked to the enterprise by making a DELETE request to the `/compliance/api/v3/companies/{company_reference}`
        endpoint.


        This endpoint requires authentication via a bearer token, provided in the Authorisation header of the request.


        ### Request


        ##### QUERY PARAMETERS


        > NONE


        ##### RESPONSE `200`


        ##### RESPONSE DATA


        > **api_version** `string` Version of the targeted API

        >

        > **data** `string` Wrapper for response data (See response example)'
      tags:
      - Companies
      parameters:
      - name: company_reference
        in: path
        required: true
        schema:
          type: string
        description: Path variable company_reference (from the Postman collection URL template).
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                DELETE_company_success:
                  value:
                    api_version: '3.0'
                    data: []
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              examples:
                DELETE_company_company_not_found:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPGET-AA3
                      message: Could not find company
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies/{{company_reference}}'
    put:
      operationId: updateCompanyDetails
      summary: UPDATE company details
      description: "### PUT **/companies**\n\nAll API requests to this endpoint must be **signed and encrypted**\
        \ to ensure integrity and security. The signing process is explained in the **Request Signature and Encryption**\
        \ section and ensures that the request is authenticated and has not been tampered with. Encryption protects\
        \ sensitive data during transmission.\n\n**Updates** the details of a company by making a PUT request to\
        \ the path `/compliance/api/v3/companies/{company_reference}` on the base URL\n\nThis endpoint requires\
        \ authentication via a bearer token, provided in the Authorisation header of the request.\n\n### Request\n\
        \n##### QUERY PARAMETERS\n\n> NONE\n\n##### BODY\n\n*In JSON format\n\n> **name** (optional) `string` Legal\
        \ name of the company\n> \n> **import_notification_url** (optional) `string` if set, Webhook notifications\
        \ will be sent here after each import completed\n\n##### RESPONSE `200`\n\n##### RESPONSE DATA\n\n> **api_version**\
        \ `string` Version of the targeted API\n> \n> **data** `string` Wrapper for response data (See response\
        \ example)"
      tags:
      - Companies
      parameters:
      - name: company_reference
        in: path
        required: true
        schema:
          type: string
        description: Path variable company_reference (from the Postman collection URL template).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              name: New Company Name
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                UPDATE_company_details_success:
                  value:
                    api_version: '3.0'
                    data:
                      reference: Company Reference
                      name: New Company Name
                      created_at: '2023-06-01T12:30:24.409Z'
                      updated_at: '2023-06-01T12:45:13.749Z'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              examples:
                UPDATE_company_details_company_not_found:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPGET-AA3
                      message: Could not find company
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies/{{company_reference}}'
  /compliance/api/v3/companies/{company_reference}/users:
    get:
      operationId: getCompanyUsers
      summary: GET company users
      description: '### GET **/companies/{companyReference}/users**


        **Returns** a list of all active users that exist in the system for a specific company by making a GET request
        to the path `/companies/{company_reference}/users` on the base URL.


        This endpoint requires authentication via a bearer token, provided in the Authorisation header of the request.


        ### Request


        ##### URi PARAMETERS


        > **companyReference** `string` The ID of a specific company


        ##### QUERY PARAMETERS


        > NONE


        ##### RESPONSE `200`


        ##### RESPONSE DATA


        > **api_version** `string` Version of the targeted API

        >

        > **data** `string` Wrapper for response data (See response example)'
      tags:
      - Users
      parameters:
      - name: company_reference
        in: path
        required: true
        schema:
          type: string
        description: The ID of a specific company
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                GET_company_users_success:
                  value:
                    api_version: '3.0'
                    data:
                      users:
                      - id: 9f3ebcde-0d2c-4f8d-a5e8-e76b918372e4
                        first_name: firstcompany4-name
                        last_name: firstcompany4-namelast
                        email: user@firstcompany4.com
                        created_at: '2023-06-01T12:59:46.223Z'
                        updated_at: '2023-06-01T12:59:46.223Z'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              examples:
                GET_company_users_company_not_found:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPGET-AA3
                      message: Could not find company
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies/{{company_reference}}/users'
    post:
      operationId: createCompanyUser
      summary: CREATE company user
      description: "### POST **/companies/{companyReference}/users**\n\nAll API requests to this endpoint must be\
        \ **signed and encrypted** to ensure integrity and security. The signing process is explained in the **Request\
        \ Signature and Encryption** section and ensures that the request is authenticated and has not been tampered\
        \ with. Encryption protects sensitive data during transmission.\n\n**Creates** a new company user which\
        \ is linked to the company by making a POST request to the `/compliance/api/v3/companies/{company_reference}/users`\
        \ endpoint is used to create a new user in the system.\n\nThis endpoint requires authentication via a bearer\
        \ token, provided in the Authorisation header of the request.\n\n### Request\n\n##### URi PARAMETERS\n\n\
        > **companyReference** `string` The ID of a specific company\n\n##### QUERY PARAMETERS\n\n> NONE\n\n#####\
        \ BODY\n\n*In JSON format\n\n> **email** `string` Email address of the user\n> \n> **first_name** (optional)\
        \ `string` First name of the user\n> \n> **last_name** (optional) `string` Last name of the user\n\n#####\
        \ RESPONSE `200`\n\n##### RESPONSE DATA\n\n> **api_version** `string` Version of the targeted API\n> \n\
        > **data** `string` Wrapper for response data (See response example)"
      tags:
      - Users
      parameters:
      - name: company_reference
        in: path
        required: true
        schema:
          type: string
        description: The ID of a specific company
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              email: johndoe@example.com
              first_name: John
              last_name: Doe
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                CREATE_company_user_success:
                  value:
                    api_version: '3.0'
                    data:
                      id: 9f3ebcde-0d2c-4f8d-a5e8-e76b918372e4
                      first_name: John
                      last_name: Doe
                      email: johndoe@example.com
                      created_at: '2023-07-04T07:23:49.810Z'
                      updated_at: '2023-07-04T07:23:49.810Z'
                CREATE_company_user_active_users_limit_reached:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-USRPST-AA8
                      message: Maximum number of active users limit exceeded
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies/{{company_reference}}/users'
  /compliance/api/v3/companies/{company_reference}/users/{user_id}:
    get:
      operationId: getCompanyUser
      summary: GET company user
      description: '### GET **/companies/{companyReference}/users/{userId}**


        **Returns** the details of a specific user by making a GET request to the path `/companies/{company_reference}/users/{user_id}`
        on the base URL.


        This endpoint requires authentication via a bearer token, provided in the Authorisation header of the request.


        ### Request


        ##### URi PARAMETERS


        > **companyReference** `string` The ID of a specific company


        > **userId** `string` The ID of a specific user


        ##### QUERY PARAMETERS


        > NONE


        ##### RESPONSE `200`


        ##### RESPONSE DATA


        > **api_version** `string` Version of the targeted API

        >

        > **data** `string` Wrapper for response data (See response example)'
      tags:
      - Users
      parameters:
      - name: company_reference
        in: path
        required: true
        schema:
          type: string
        description: The ID of a specific company
      - name: user_id
        in: path
        required: true
        schema:
          type: string
        description: The ID of a specific user
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                GET_company_users_success:
                  value:
                    api_version: '3.0'
                    data:
                      users:
                      - id: 9f3ebcde-0d2c-4f8d-a5e8-e76b918372e4
                        first_name: firstcompany4-name
                        last_name: firstcompany4-namelast
                        email: user@firstcompany4.com
                        created_at: '2023-06-01T12:59:46.223Z'
                        updated_at: '2023-06-01T12:59:46.223Z'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              examples:
                GET_company_users_company_not_found:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPGET-AA3
                      message: Could not find company
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies/{{company_reference}}/users/{{user_id}}'
    put:
      operationId: updateUserDetails
      summary: UPDATE user details
      description: "### UPDATE **/companies/{companyId}/users/{userId}**\n\nAll API requests to this endpoint must\
        \ be **signed and encrypted** to ensure integrity and security. The signing process is explained in the\
        \ **Request Signature and Encryption** section and ensures that the request is authenticated and has not\
        \ been tampered with. Encryption protects sensitive data during transmission.\n\n**Updates** the details\
        \ of a user by making a PUT request to the path `/compliance/api/v3/companies/{company_reference}/users/{user_id}`\
        \ on the base URL\n\n**User Activation/Deactivation:**\n\nIf the boolean parameter **active** is passed\
        \ in the body as *false*, the user will be deactivated, transactional data will no longer be pulled by ZenLedger\
        \ and no data will be delivered by this API until the user is re-activated.\n\n> Pass the parameter **active**\
        \ as *false* to deactivate  \n> Pass the parameter **active** as *true* to re-activate\n\nThis endpoint\
        \ requires authentication via a bearer token, provided in the Authorisation header of the request.\n\n###\
        \ Request\n\n##### URi PARAMETERS\n\n> **companyReference** `string` The ID of a specific company\n\n> **userId**\
        \ `string` The ID of a specific user\n\n##### QUERY PARAMETERS\n\n> NONE\n\n##### BODY\n\n*In JSON format\n\
        \n> **email** (optional) `string` Email address of the user\n> \n> **first_name** (optional) `string` First\
        \ name of the user\n> \n> **last_name** (optional) `string` Last name of the user\n> \n> **active** (optional)\
        \ `boolean` Activate/Deactivate a user if passed\n\n##### RESPONSE `200`\n\n##### RESPONSE DATA\n\n> **api_version**\
        \ `string` Version of the targeted API\n> \n> **data** `string` Wrapper for response data (See response\
        \ example)"
      tags:
      - Users
      parameters:
      - name: company_reference
        in: path
        required: true
        schema:
          type: string
        description: The ID of a specific company
      - name: user_id
        in: path
        required: true
        schema:
          type: string
        description: The ID of a specific user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
            example:
              first_name: user 1 of referenced company
              last_name: user 1 of referenced company
              email: user@firstcompany2.com
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
              examples:
                UPDATE_user_details_success:
                  value:
                    api_version: '3.0'
                    data:
                      id: 9f3ebcde-0d2c-4f8d-a5e8-e76b918372e4
                      first_name: user 1 of referenced company
                      last_name: user 1 of referenced company
                      email: user@firstcompany2.com
                      created_at: '2023-06-01T12:59:46.223Z'
                      updated_at: '2023-06-01T13:08:15.608Z'
                      active: 'true'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
              examples:
                UPDATE_user_details_user_not_found:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-USRGET-AA2
                      message: Could not find user
                UPDATE_user_details_company_not_found:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-CMPGET-AA3
                      message: Could not find company
                UPDATE_user_details_active_users_limit_reached:
                  value:
                    api_version: '3.0'
                    data: []
                    errors:
                      code: ZENCS-USRPST-AA8
                      message: Maximum number of active users limit exceeded
      security:
      - bearerAuth: []
      x-postman-request: '{{base_url}}/compliance/api/v3/companies/{{company_reference}}/users/{{user_id}}'
    delete:
      operationId: deleteCompanyUser
      summary: DELETE company user
      description: '### DELETE **/companies/{companyReference}/users/{userId}**


        **Deletes** a user which is linked to the company by making a DELETE request to the `/compliance/api/v3/companies/{company_reference}/users/{user_id}`
        endpoint.


        This endpoint requires authentication via a bearer token, provided in the Authorisation header of the request.


        ### Request


        ##### URi PARAMETERS


        > **companyReference** `string` The ID of a specific company


        > **userId** `string` The ID of a specific user


        ##### QUERY PARAMETERS


        > NONE


        ##### RESPONSE `200`


        ##### RESPONSE DATA


        > **api_version** `string` Version of the targeted API

        >

        > **data** `string` Wrapper for res

# --- truncated at 32 KB (179 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zenledger/refs/heads/main/openapi/zenledger-compliance-api-openapi.yml