---
title: "Create accounts from an organization ID"
method: POST
path: "/account-suggestions/organization-ids"
tags: ["Accounts"]
---

# Create accounts from an organization ID

`POST /account-suggestions/organization-ids`

## Request

- Base URL: `https://api.sequenzy.com/api/v1`
- URL: `https://api.sequenzy.com/api/v1/account-suggestions/organization-ids`
- Auth: HTTP bearer

Starts a background job that creates one account per distinct value of `propertyKey` and adds each contact seen with that value as a `member`. Accounts are named from `nameKey` when set, otherwise after the work email domain most of their contacts share; existing names, domains and roles are kept. No emails are sent, no sync rules run and segment-entered sequences are not triggered. A run already queued or running for the same key is returned with `alreadyRunning` set instead of starting another; its `job.settings` show the source and name key it uses. Reruns are safe. Accounts is turned on before the job is queued and stays on even if the job fails.

## Request body

- AccountOrganizationIdKey
  - `propertyKey` string, required: Event property or contact attribute holding your organization ID, such as `workspaceId`. Trimmed.
  - `source` 'event' | 'attribute': Where the ID lives.
  - `nameKey` string, nullable: Property or attribute holding the organization name. Without it, accounts are named after the work email domain their contacts share.

## Response `202`

Job queued, or the run already in progress for this key

- object
  - `success` boolean
  - `jobId` string: Pass to `GET /account-suggestions/organization-ids/jobs/{jobId}`.
  - `alreadyRunning` boolean: True when a run for this key was already queued or running, so none was started.
  - `job` AccountOrganizationIdJob
    - `jobId` string
    - `settings` object, nullable: What the run reads. A run already in progress for the same `propertyKey` keeps its own `source` and `nameKey`, which may differ from a later request.
      - `source` 'event' | 'attribute' | 'domains'
      - `propertyKey` string
      - `nameKey` string, nullable
    - `state` 'queued' | 'running' | 'completed' | 'failed'
    - `result` object, nullable: Present when `completed`.
      - `accountsCreated` integer
      - `accountsUpdated` integer: Existing accounts that got a name or domain.
      - `membershipsCreated` integer
      - `membershipsUpdated` integer
      - `skipped` integer: Contacts that no longer exist, or invalid IDs.
      - `truncated` boolean: History was larger than one run covers. Start the job again to continue.
    - `error` string, nullable: Present when `failed`.

## Other responses

- `400`: `propertyKey` is blank after trimming. Nothing is written.
- `401`: Missing or invalid API key
- `403`: The API key lacks `subscribers:write`, or no company is selected.
- `409`: Creating accounts would turn Accounts on, but contacts already use a custom attribute named `account` or `account.*`. Rename those contact attributes, then retry.
- `422`: Request shape validation failed (missing `propertyKey` or an unknown `source`).

## Changes

- **2026-10-16** `db3873ca3d4d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/account-suggestions/organization-ids/post.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) - [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sequenzy/apis/sequenzy-api/revisions/3d816357b738?raw)
