---
title: "Create an asset"
method: POST
path: "/v1/assets/"
tags: ["assets"]
---

# Create an asset

`POST /v1/assets/`

## Request

- Base URL: `https://api.ethiack.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ethiack.com/v1/assets/`
- Auth: none declared

Create an asset, after the ownership gate.

Audience (organization, partner) is enforced by the asset policy.
The gate is the workflow's: a domain or public IP/CIDR needs an
active verification covering it (legacy answered 403 "Unverified
domain"); an integrator flagged to vouch for its clients gets the
proof minted for it instead -- legacy's ownership bypass, recorded as
a self-attestation. ``organization_id`` defaults to the caller's org.

Args:
    body (CreateAssetRequest): Asset creation payload.
    db (AsyncSession): Request-scoped database session.
    context (ActiveContext): Resolved caller identity and scope.

Returns:
    SuccessResponse: The legacy create envelope carrying the new id.

Raises:
    ValueError: No ``organization_id`` was given and the caller has no
        default organization.
    PermissionError: No active verification covers the target and the
        caller may not have one minted, or Cerbos denied the create.

## Request body

- CreateAssetRequest: Request body for asset creation. Matches api-3's ``AddAsset`` schema. Attributes: organization_id (int | None): Target organization. Defaults to the actor's organization when omitted. asset_value (str): Asset value, automatically lowercased. asset_type (ImplementedAssetType): Asset type. ``domain`` is accepted as a previous name for ``fqdn``. beacon_id (int | None): Associated beacon ID. tier (AssetTier | None): Asset tier override.
  - `organization_id` integer, nullable
  - `asset_value` string, required
  - `asset_type` 'fqdn' | 'ip' | 'cidr', required: Asset types that can be created through the public API. A subset of :class:`~phoenix.db.models.asset.AssetType`: the rest are produced by discovery rather than declared by a caller. A private ``CIDR`` additionally requires a ``beacon_id`` — see :meth:`CreateAssetRequest._private_ranges_need_a_beacon`.
  - `beacon_id` integer, nullable
  - `tier` 'low' | 'medium' | 'high': Tier (importance level) of an asset. Stored as the lowercase token (``low``/``medium``/``high``) — the same value the public API uses, so no wire<->storage mapping is needed.

## Response `201`

Successful Response

- SuccessResponse: Standard response for successful write operations. Matches the ``SuccessResponse`` contract from api-3. Attributes: code (int): HTTP status code. description (str): Human-readable result description. id (int | str | None): Created/affected resource ID. success (bool): Always ``True`` for successful responses.
  - `code` integer, required
  - `description` string, required
  - `id` union
    - integer
    - string
  - `success` boolean

## Other responses

- `422`: Validation Error

---

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