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

# Delete User & Data

> Delete a user and their data.



## OpenAPI

````yaml POST /user/delete
openapi: 3.1.0
info:
  title: Knot API
  description: An API to interact with the Knot merchant connectivity platform.
  version: 1.0.0
servers:
  - url: https://development.knotapi.com
    description: Development server
security:
  - basicAuth: []
paths:
  /user/delete:
    post:
      description: Delete a user and their data.
      operationId: user_delete
      requestBody:
        description: The input parameters required for deleting a user and their data.
        content:
          application/json:
            schema:
              type: object
              properties:
                external_user_id:
                  type: string
                  description: Your unique identifier for the user.
                  example: abc123
              required:
                - external_user_id
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message.
                    example: Success
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                ExternalUserIdRequired:
                  summary: external_user_id not found
                  value:
                    error_type: INVALID_REQUEST
                    error_code: INVALID_FIELD
                    error_message: The external user id field is required.
                UserNotFound:
                  summary: User was not found
                  value:
                    error_type: USER_ERROR
                    error_code: USER_NOT_FOUND
                    error_message: >-
                      The user was not found. Please check the external_user_id
                      provided.
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AuthFailed:
                  summary: Auth failed
                  value:
                    error_type: INVALID_INPUT
                    error_code: INVALID_API_KEYS
                    error_message: Invalid client_id or secret provided.
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                InternalServerError:
                  summary: Unexpected server error
                  value:
                    message: Server Error
components:
  schemas:
    Error:
      type: object
      properties:
        error_type:
          type: string
          description: Type of error.
          enum:
            - INVALID_INPUT
            - INVALID_REQUEST
            - USER_ERROR
            - SESSION_ERROR
            - MERCHANT_ACCOUNT_ERROR
            - MERCHANT_ERROR
            - SUBSCRIPTION_ERROR
            - TRANSACTION_ERROR
            - CART_ERROR
          example: INVALID_REQUEST
        error_code:
          type: string
          description: Error code.
          enum:
            - INVALID_API_KEYS
            - INVALID_FIELD
            - INVALID_JWE
            - INVALID_CURSOR_FORMAT
            - USER_NOT_FOUND
            - MERCHANT_ACCOUNT_NOT_FOUND
            - MERCHANT_ACCOUNT_DISCONNECTED
            - SESSION_NOT_FOUND
            - EXTEND_NOT_SUPPORTED
            - MERCHANT_UNAVAILABLE
            - NO_ACCESS
            - TRANSACTION_NOT_FOUND
            - NO_TRANSACTIONS
            - SUBSCRIPTION_NOT_FOUND
            - ONGOING_OPERATION
            - CART_NOT_FOUND
            - FULFILLMENT_NOT_FOUND
          example: INVALID_FIELD
        error_message:
          type: string
          description: Detailed error message.
          example: The limit may not be greater than 10.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication header of the form `Basic <encoded-value>`, where
        `<encoded-value>` is the base64-encoded string `username:password`. Use
        your `client_id` as the `username` and your `secret` as the `password`
        value.

````