---
title: "POST /v1/portfolios"
method: POST
path: "/v1/portfolios"
tags: ["Portfolios"]
---

# POST /v1/portfolios

`POST /v1/portfolios`

## Request

- Base URL: `https://api.tokenbooks.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.tokenbooks.io/v1/portfolios`
- Auth: API key in header `x-api-key`

## Request body

- CreatePortfolioRequestDto
  - `name` string, required: Portfolio name
  - `slug` string: Portfolio slug (auto-generated if not supplied)
  - `currency` string: Functional currency (default USD)
  - `legalEntityType` 'CORPORATION' | 'INDIVIDUAL' | 'TRUST' | 'PARTNERSHIP' | 'null', nullable: Legal entity classification for an explicit country profile
  - `financialReportingFramework` 'TAX_ONLY' | 'US_GAAP_PRE_2025' | 'US_GAAP_ASC350_60' | 'IFRS_IAS38' | 'IFRS_IAS38_REVAL' | 'IFRS_IAS2_LCNRV' | 'IFRS_IAS2_BROKER_TRADER_FVLCTS' | 'ASPE' | 'FRS_102' | 'AASB_138' | 'OTHER': Financial reporting framework (default TAX_ONLY)
  - `reportingTimezone` string: Canonical IANA reporting timezone (default UTC)
  - `accountingConfiguration` object: Accounting configuration (defaults applied if omitted)
    - `gasFeeAccountingTreatment` 'DISPOSAL_AND_COST_BASIS' | 'EXPENSE_ONLY'
    - `isPurchaseTaxable` boolean
    - `costBasisLotMethod` 'FIFO' | 'LIFO' | 'HIFO' | 'ACB'
    - `baseCurrency` string
    - `stablecoinTreatment` 'BASE' | 'ASSET'
    - `costBasisPerWallet` boolean
    - `defiDepositTreatment` 'TAXABLE_EXCHANGE' | 'NON_TAXABLE_RESERVATION' | 'null', nullable
    - `separateIncomeExpenseLines` boolean
    - `jurisdictionCode` string

## Response `201`

- PortfolioDetailsResponseDto
  - `slug` string, required: Portfolio slug
  - `name` string, required: Portfolio name
  - `createdAt` string, date-time, required: Creation timestamp (ISO 8601)
  - `updatedAt` string, date-time, required: Last update timestamp (ISO 8601)
  - `currency` string, required: Base currency
  - `accountingConfiguration` object, required: Accounting configuration
    - `gasFeeAccountingTreatment` 'DISPOSAL_AND_COST_BASIS' | 'EXPENSE_ONLY', required
    - `isPurchaseTaxable` boolean, required
    - `costBasisLotMethod` 'FIFO' | 'LIFO' | 'HIFO' | 'ACB', required
    - `baseCurrency` string, required
    - `jurisdictionCode` string, required
    - `stablecoinTreatment` 'BASE' | 'ASSET', required
    - `costBasisPerWallet` boolean, required
    - `defiDepositTreatment` 'TAXABLE_EXCHANGE' | 'NON_TAXABLE_RESERVATION', required
    - `separateIncomeExpenseLines` boolean, required
    - `financialReportingFramework` 'TAX_ONLY' | 'US_GAAP_PRE_2025' | 'US_GAAP_ASC350_60' | 'IFRS_IAS38' | 'IFRS_IAS38_REVAL' | 'IFRS_IAS2_LCNRV' | 'IFRS_IAS2_BROKER_TRADER_FVLCTS' | 'ASPE' | 'FRS_102' | 'AASB_138' | 'OTHER', required
  - `legalEntityType` 'BUSINESS' | 'CORPORATION' | 'INDIVIDUAL' | 'TRUST' | 'PARTNERSHIP' | 'null', nullable, required: Legal entity type, or null when none is configured
  - `reportingTimezone` string, required: Reporting timezone
  - `hasPostedActivity` boolean, required: True when the portfolio has at least one POSTED or CLOSED transaction. Accounting-policy fields that would reinterpret existing entries cannot be changed once this is true, so callers use it to decide which settings to offer.

---

[API](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api.md) · [All operations](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenbooks/apis/tokenbooks-public-api/revisions/180622e6255e?raw)
