# /subaccount

Retrieves a list of all subaccounts associated with the current account

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Formstack API v2025.0",
    "version": "0.0.4"
  },
  "servers": [
    {
      "url": "https://www.formstack.com/api/v2025",
      "description": "Production server"
    },
    {
      "url": "https://staging-formstack.com/api/v2025",
      "description": "Staging server"
    },
    {
      "url": "https://dev-formstack.com/api/v2025",
      "description": "Development server"
    }
  ],
  "paths": {
    "/subaccount": {
      "get": {
        "tags": [
          "Subaccounts"
        ],
        "description": "Retrieves a list of all subaccounts associated with the current account",
        "operationId": "listSubaccounts",
        "responses": {
          "200": {
            "description": "Successfully retrieved subaccounts list",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubaccountsListingApiDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "401": {
            "description": "Unauthorized"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SmtpCredentialsApiDto": {
        "title": "SMTP Credentials",
        "description": "SMTP credentials for a subaccount",
        "properties": {
          "auth_method": {
            "description": "SMTP authentication method (e.g., plain, login, oauth)",
            "type": "string",
            "nullable": true
          },
          "host": {
            "description": "SMTP server hostname or IP address",
            "type": "string",
            "nullable": true
          },
          "port": {
            "description": "SMTP server port number",
            "type": "integer",
            "nullable": true
          },
          "username": {
            "description": "SMTP username",
            "type": "string",
            "nullable": true
          },
          "password": {
            "description": "SMTP password",
            "type": "string",
            "nullable": true
          },
          "oauth_token": {
            "description": "OAuth token for SMTP",
            "type": "string",
            "nullable": true
          },
          "oauth_refresh_token": {
            "description": "OAuth refresh token for SMTP",
            "type": "string",
            "nullable": true
          },
          "oauth_token_expires": {
            "description": "OAuth token expiration timestamp",
            "type": "string",
            "nullable": true
          }
        },
        "type": "object"
      },
      "SubaccountListItemApiDto": {
        "title": "Subaccount List Item",
        "description": "Subaccount details for listing",
        "properties": {
          "id": {
            "description": "The ID of the subaccount",
            "type": "string",
            "nullable": false
          },
          "url": {
            "description": "The base URL for accessing the subaccount",
            "type": "string",
            "nullable": true
          },
          "smtp_credentials": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/SmtpCredentialsApiDto"
              }
            ],
            "nullable": true,
            "description": "SMTP credentials for the subaccount"
          },
          "apikeys": {
            "description": "List of API access tokens associated with the subaccount",
            "type": "array",
            "items": {
              "properties": {
                "token": {
                  "type": "string"
                }
              },
              "type": "object"
            },
            "nullable": true
          }
        },
        "type": "object"
      },
      "SubaccountsListingApiDto": {
        "title": "Subaccounts Listing",
        "description": "List of subaccounts",
        "properties": {
          "subaccounts": {
            "description": "Array of subaccount details",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SubaccountListItemApiDto"
            },
            "nullable": false
          }
        },
        "type": "object"
      }
    }
  },
  "tags": [
    {
      "name": "Subaccounts",
      "description": "Subaccounts let a parent account manage separate child accounts. Use these endpoints to list subaccounts and to work with subaccount-scoped resources: copy a form into a subaccount, list a subaccount's themes, copy or delete a subaccount theme, list the forms using a subaccount theme, and assign a theme to a subaccount form. Subaccount records include details such as SMTP credentials."
    }
  ]
}
```