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

# Delete a portfolio

> Requires `portfolio:write` and `Idempotency-Key`. Deleting a portfolio never deletes accounts or assets.



## OpenAPI

````yaml /openapi/portfobit-openapi.yaml delete /portfolios/{portfolio_id}
openapi: 3.1.0
info:
  title: Portfobit Open API
  version: 0.1.0
  description: >
    Public REST API for direct API clients, CI, scripts, service accounts,
    third-party agents, and developer integrations.

    Public REST requests use scoped Portfobit Open API keys. OAuth access tokens
    issued for the Portfobit MCP resource are not accepted by `/api/v1/*`
    endpoints.

    Portfobit is crypto-CEX-only. Financial values are decimal strings and
    timestamps are RFC 3339 UTC strings.

    The API never supports withdrawals, external-address transfers,
    cross-exchange transfers, or P2P transfers.
servers:
  - url: https://api.portfobit.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Context
  - name: Accounts
  - name: Portfolios
  - name: Valuation
  - name: Activity
  - name: Trading
  - name: Market data
  - name: Support
paths:
  /portfolios/{portfolio_id}:
    delete:
      tags:
        - Portfolios
      summary: Delete a portfolio
      description: >-
        Requires `portfolio:write` and `Idempotency-Key`. Deleting a portfolio
        never deletes accounts or assets.
      operationId: deletePortfolio
      parameters:
        - $ref: '#/components/parameters/MutablePortfolioId'
        - $ref: '#/components/parameters/IdempotencyKey'
      responses:
        '200':
          $ref: '#/components/responses/PortfolioDeleteResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  parameters:
    MutablePortfolioId:
      name: portfolio_id
      in: path
      required: true
      schema:
        type: string
        not:
          const: global
      description: User-created portfolio ID; `global` cannot be changed.
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 255
      description: Opaque retry key, unique to the same user, method, and path.
  responses:
    PortfolioDeleteResponse:
      description: Portfolio deletion response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PortfolioDeleteResponseSchema'
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  schemas:
    PortfolioDeleteResponseSchema:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: object
          required:
            - id
            - deleted
            - deleted_at
          properties:
            id:
              type: string
            deleted:
              type: boolean
            deleted_at:
              type: string
              format: date-time
        meta:
          type: object
          required:
            - request_id
            - generated_at
          properties:
            request_id:
              type: string
            generated_at:
              type: string
              format: date-time
      example:
        data:
          id: pf_01J2K7M9N3
          deleted: true
          deleted_at: '2026-08-07T08:00:00Z'
        meta:
          request_id: req_01J2K8B7QW
          generated_at: '2026-08-07T08:00:01Z'
    ErrorEnvelope:
      type: object
      required:
        - error
        - meta
      properties:
        error:
          $ref: '#/components/schemas/Error'
        meta:
          $ref: '#/components/schemas/Meta'
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
    Meta:
      type: object
      required:
        - request_id
        - generated_at
      properties:
        request_id:
          type: string
        generated_at:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Portfobit Open API key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.