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

# Delete Sub-Account

> Delete a sub-account. All sub-account orders and mailing lists are moved to the main account. All image templates, message templates, and campaigns are deleted.



## OpenAPI

````yaml delete /sub-accounts/{subAccountId}
openapi: 3.1.0
info:
  title: thanks.io API
  description: >-
    Use the thanks.io API to send postcards, letters, notecards, windowless
    letters, and gift cards.
  contact:
    url: https://www.thanks.io
    email: support@thanks.io
  version: 1.0.0
servers:
  - url: https://api.thanks.io/api/v2
    description: The main API server for thanks.io
security:
  - bearerAuth: []
tags:
  - name: Recipients
  - name: Mailing Lists
  - name: Send Mailer
  - name: Orders
  - name: Message Templates
  - name: Image Templates
  - name: Handwriting Styles
  - name: Giftcards
  - name: Dynamic Images
    description: ''
  - name: Image Builder
  - name: Sub Accounts
externalDocs:
  description: Learn more about thanks.io
  url: https://docs.thanks.io
paths:
  /sub-accounts/{subAccountId}:
    parameters:
      - name: subAccountId
        in: path
        description: ID of sub-account
        required: true
        schema:
          type: integer
          example: 56
    delete:
      tags:
        - Sub Accounts
      summary: >-
        Delete Sub Account.  All sub account orders and mailing lists are moved
        to the main account. All image templates, message templates, and
        campaigns are deleted.
      operationId: deleteSubAccount
      responses:
        '200':
          description: Successful Response
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
              example:
                message: success
        '403':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    Unauthorized:
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Unauthorized
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                example: Not Found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication using your thanks.io API key

````