# /organizations/{organizationId}/subaccounts

Get a list of subaccounts

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Partner API",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://admin.formstack.com/api/v1",
      "description": "Partner API"
    }
  ],
  "paths": {
    "/organizations/{organizationId}/subaccounts": {
      "get": {
        "tags": [
          "PartnerApi"
        ],
        "description": "Get a list of subaccounts",
        "operationId": "listSubaccounts",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "description": "Filter by subaccount name",
            "required": false,
            "schema": {
              "type": "string",
              "example": "Acme"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Page",
            "required": false,
            "schema": {
              "type": "integer",
              "example": 1,
              "default": 1
            }
          },
          {
            "name": "orderBy",
            "in": "query",
            "description": "Sort field",
            "required": false,
            "schema": {
              "type": "string",
              "example": "createdAt",
              "default": "createdAt",
              "enum": [
                "name",
                "createdAt",
                "id",
                "status"
              ]
            }
          },
          {
            "name": "orderDir",
            "in": "query",
            "description": "Sort direction",
            "required": false,
            "schema": {
              "type": "string",
              "example": "asc",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "description": "ID of the organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "example": "b443d63c-3e37-11f1-8898-0242ac000003"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "subaccounts list",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "total": {
                      "title": "total",
                      "type": "integer",
                      "example": 3
                    },
                    "page": {
                      "title": "page",
                      "type": "integer",
                      "example": 1
                    },
                    "data": {
                      "title": "result set",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PartnerApiSubaccountBasic"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Organization could not be found"
          },
          "422": {
            "description": "Errors occurred",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/general_validation_error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "OrganizationBillingOverviewUsage": {
        "properties": {
          "label": {
            "description": "Text for the feature",
            "type": "string",
            "example": "Users"
          },
          "current": {
            "description": "current usage value for the feature",
            "type": "integer",
            "example": 2
          },
          "currentFormatted": {
            "description": "current usage formatted (optional)",
            "type": [
              "string",
              "null"
            ],
            "example": "512M"
          },
          "limit": {
            "description": "maximum usage value for the feature",
            "type": "integer",
            "example": 10
          },
          "limitFormatted": {
            "description": "limit formatted (optional)",
            "type": [
              "string",
              "null"
            ],
            "example": "3G"
          },
          "warningMessage": {
            "description": "Warning message",
            "type": "string",
            "example": "Nearing monthly limit"
          },
          "validUntil": {
            "description": "Usage valid until",
            "type": [
              "string",
              "null"
            ],
            "example": "6 days 20 hours"
          }
        },
        "type": "object"
      },
      "general_validation_error": {
        "properties": {
          "message": {
            "description": "Basic error description",
            "type": "string",
            "example": "The given data failed to pass validation."
          },
          "errors": {
            "description": "Basic error description",
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string",
                "example": "cannot be blank"
              }
            }
          }
        },
        "type": "object"
      },
      "PartnerApiSubaccountBasic": {
        "description": "Subaccount fields returned by GET /subaccounts (list). For products and entitlements, GET a single subaccount. `appIds` and `appAdmins` keys depend on enabled products (e.g. forms, docs, sign, copilot, or the application id).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "readOnly": true,
            "example": "8ecb0a3c-3e38-11f1-96c0-0242ac000003"
          },
          "name": {
            "type": "string",
            "example": "Acme Subaccount"
          },
          "appIds": {
            "properties": {
              "forms": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "123456"
              },
              "docs": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "78910"
              },
              "sign": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "111213"
              }
            },
            "type": "object",
            "example": {
              "forms": "123456",
              "docs": null,
              "sign": "111213"
            },
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "appUsage": {
            "properties": {
              "forms": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrganizationBillingOverviewUsage"
                }
              },
              "docs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrganizationBillingOverviewUsage"
                }
              },
              "sign": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrganizationBillingOverviewUsage"
                }
              }
            },
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/OrganizationBillingOverviewUsage"
              }
            }
          },
          "appAdmins": {
            "properties": {
              "forms": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "john@doe.org"
              },
              "docs": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "jane@doe.org"
              },
              "sign": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "john@doe.org"
              }
            },
            "type": "object",
            "example": {
              "forms": "john@doe.org",
              "docs": null,
              "sign": "john@doe.org"
            },
            "additionalProperties": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer authentication"
      }
    }
  },
  "tags": [
    {
      "name": "PartnerApi",
      "description": "PartnerApi"
    }
  ]
}
```