---
title: "View subaccounts"
method: POST
path: "/subaccounts/search"
tags: ["SUBACCOUNTS"]
---

# View subaccounts

`POST /subaccounts/search`

## Request

- Base URL: `https://api.smtp2go.com/v3`
- URL: `https://api.smtp2go.com/v3/subaccounts/search`
- Auth: one of:
  - API key in header `X-Smtp2go-Api-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/smtp2go/apis/smtp2go-api-v3-0-4/docs/subaccounts/search/post.ts> (a function with typed inputs; its response is checked against the schema)

Returns any subaccounts that match search criteria

## Request body

- object
  - `fuzzy_search` boolean: Determines if search terms match complete field values and are case sensitive (false) or partial fields and are case insensitive (true). Default: true
  - `search_terms` string[]: Return subaccounts with one or more of the strings in the following array.<br><br><strong>Note:</strong> See 'fuzzy_search' for impact on case sensitivity
  - `states` string: Controls which states you will be searched <br><br><strong>Valid values:</strong><br> all, active, closed, suspended
  - `sort_direction` string: Sort direction, sorts either asc or desc by subaccount name
  - `page_size` integer: Number of subaccounts to retrieve per call
  - `continue_token` string: A token provided by a prior call to this endpoint, passing this will cause it to fetch the next page of results

## Response `200`

List of subaccounts

- object
  - `request_id` string, required
  - `data` object, required
    - `continue_token` unknown, required
    - `total_count` integer, required
    - `subaccounts` object[], required
      - `email` string, required
      - `state` string, required
      - `plan_size` integer, required
      - `plan_remaining` integer, required
      - `plan_used` integer, required
      - `name` string, required

## Other responses

- `400`: 400

---

[API](https://skmtc.dev/smtp2go/apis/smtp2go-api-v3-0-4.md) - [All operations](https://skmtc.dev/smtp2go/apis/smtp2go-api-v3-0-4/llms.txt) - [OpenAPI document](https://skmtc.dev/smtp2go/apis/smtp2go-api-v3-0-4/revisions/313dcf9dd255?raw)
