---
updatedAt: 2025-06-09T22:26:52.000Z
agentTools:
  projectIndex: https://docs.connio.com/llms.txt
---

# Closing sub account

## Api Key Authorization

| Required Fields | Values                                |
| :-------------- | :------------------------------------ |
| Context type    | `Account`                             |
| Scopes          | `account:modify`, `subaccount:delete` |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "admin-services-api",
    "version": "3"
  },
  "servers": [
    {
      "url": "https://api.connio.cloud/v3"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/accounts/{ref}": {
      "delete": {
        "summary": "Permanently deleting sub account",
        "description": "",
        "operationId": "permanently-deleting-sub-account",
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "description": "id or name of the sub account.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "hard",
            "in": "query",
            "description": "In order to remove a sub account permanently, you must make the same request second time with `?hard=true`.",
            "required": true,
            "schema": {
              "type": "boolean",
              "default": true
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"nrOfItems\": 1\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "nrOfItems": {
                      "type": "integer",
                      "example": 1,
                      "default": 0
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true
}
```