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

# Preview Accounts From an Organization ID

> See the accounts an organization ID would create before creating them

# Preview Accounts From an Organization ID

Shows the biggest organizations that [creating accounts](/api-reference/accounts/organization-ids-create) from `propertyKey` would make: the name each account would get, how many contacts would join it, and a few of those contacts. Nothing is created.

Each account is named from `nameKey` when you pass one. Otherwise it is named after the work email domain most of its contacts share, so `organization_id: zplgap...` with contacts at `leadpages.com` becomes **Leadpages**. Personal and disposable providers, such as `gmail.com`, and your own sending domains are ignored. A domain needs most of the organization's contacts, so one consultant among personal emails does not name it. When no name can be found, `name` is `null` and the account shows its ID. Accounts that already exist keep their current name and domain, and `contactCount` can include contacts that were deleted since, which are skipped when creating.

Requires the `subscribers:read` scope.

## Request

<ParamField query="propertyKey" type="string" required>
  Event property or contact attribute holding your organization ID, from [Detect
  Organization IDs](/api-reference/accounts/organization-ids-detect).
</ParamField>

<ParamField query="source" type="string" default="event">
  `event` for an event property, `attribute` for a contact attribute.
</ParamField>

<ParamField query="nameKey" type="string">
  Property or attribute holding the organization name.
</ParamField>

<ParamField query="limit" type="number" default="5">
  Organizations to return, biggest first. Values outside 1 to 50 are clamped,
  and non-numeric values use the default.
</ParamField>

```bash theme={null}
curl "https://api.sequenzy.com/api/v1/account-suggestions/organization-ids/preview?propertyKey=organization_id" \
  -H "Authorization: Bearer API_KEY"
```

## Response

<ResponseField name="organizations" type="array">
  The biggest organizations first.

  <Expandable title="properties">
    <ResponseField name="externalId" type="string">
      The organization ID, which becomes the account's external ID.
    </ResponseField>

    <ResponseField name="name" type="string | null">
      The name the account gets, or `null` when none can be found.
    </ResponseField>

    <ResponseField name="domain" type="string | null">
      The work email domain most of its contacts share.
    </ResponseField>

    <ResponseField name="contactCount" type="number">
      Contacts that would become members.
    </ResponseField>

    <ResponseField name="sampleEmails" type="string[]">
      Up to 3 of those contacts, those at `domain` first.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "organizations": [
      {
        "externalId": "zplgaplihqncouqlmqf8os3e",
        "name": "Leadpages",
        "domain": "leadpages.com",
        "contactCount": 14,
        "sampleEmails": [
          "henny@leadpages.com",
          "nicola@leadpages.com",
          "corah@leadpages.com"
        ]
      }
    ]
  }
  ```

  ```json 400 theme={null}
  { "success": false, "error": "`propertyKey` cannot be blank." }
  ```

  ```json 401 theme={null}
  { "success": false, "error": "Unauthorized" }
  ```

  ```json 403 theme={null}
  { "success": false, "error": "No company selected" }
  ```

  ```json 422 theme={null}
  { "success": false, "error": "Expected property 'propertyKey' to be string" }
  ```
</ResponseExample>
