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

# endstate.collections.create

> Creates a collection and returns it immediately in `deploying` status with its unique address. Provisioning completes asynchronously; the status becomes `active` once the collection is ready to use.

```ts theme={null}
create(body: CreateCollectionRequest, options?: IdempotentRequestOptions): Promise<Collection>
```

|                 |                                                                          |
| --------------- | ------------------------------------------------------------------------ |
| Endpoint        | [`POST /v1/collections`](/api-reference/collections/create-a-collection) |
| Credential      | Secret key (`end_sk_...`)                                                |
| Retry class     | `keyed`                                                                  |
| Idempotency key | Accepted                                                                 |

Carries an idempotency key. Retried on network failure, timeout, `429`, and `409 idempotency.in_progress` - never on a `5xx`.

## Example

```ts theme={null}
const result = await endstate.collections.create({
  name: "Example Collection",
});
```

## Parameters

<ParamField body="name" type="string" required>
  Human-readable collection name.
</ParamField>

<ParamField body="symbol" type="string">
  Short collection symbol (max 4 chars). Derived from `name` when omitted.
</ParamField>

<ParamField body="external_id" type="string">
  Your own mapping to this collection (SKU / concept id).
</ParamField>

<ParamField body="chain_id" type="integer">
  Identifier of the network to create the collection on. Defaults to your organization's configured network; send a value only to override it where enabled for your organization.
</ParamField>

<ParamField body="redirect_url" type="string | null">
  Tap redirect URL for this collection's units. Omit or null for none; unit- and product-level redirects still take precedence.
</ParamField>

## Returns

`201` - `Collection`.

<ResponseField name="id" type="string" required />

<ResponseField name="contract" type="object" required />

<ResponseField name="name" type="string | null" required />

<ResponseField name="external_id" type="string | null" required />

<ResponseField name="redirect_url" type="string | null" required>
  URL a tap on this collection's units redirects to. Unit- and product-level redirects take precedence over this value.
</ResponseField>

## Errors

Branch on `error.code`, never on the HTTP status - several codes share one.

| Code                        | HTTP | Retry         |
| --------------------------- | ---- | ------------- |
| `auth.unauthorized`         | 401  | Do not retry  |
| `collection.already_exists` | 409  | Do not retry  |
| `idempotency.in_progress`   | 409  | Safe to retry |
| `idempotency.key_conflict`  | 409  | Do not retry  |
| `internal.error`            | 500  | Safe to retry |
| `validation.failed`         | 400  | Do not retry  |

See [Errors and retries](/sdks/core/errors-and-retries) for the error types and how to narrow them.
