---
title: "Inactivate Portfolio By ID"
method: DELETE
path: "/v1/rebalancing/portfolios/{portfolio_id}"
tags: ["Rebalancing"]
---

# Inactivate Portfolio By ID

`DELETE /v1/rebalancing/portfolios/{portfolio_id}`

## Request

- Base URL: `https://broker-api.giftcity.sandbox.in.alpaca.markets`
- URL: `https://broker-api.giftcity.sandbox.in.alpaca.markets/v1/rebalancing/portfolios/{portfolio_id}`
- Auth: HTTP basic

Archives a portfolio (soft delete). Only permitted when the portfolio has no active subscriptions. Archived portfolios are hidden from the default list response and cannot be used for new subscriptions.

## Response `204`

No Content

## Other responses

- `401`: The request is not authenticated. Send a valid API key ID and secret, or a Broker Dashboard session, and try again.
- `403`: These credentials are not allowed to call this endpoint, or rebalancing is not enabled for the correspondent. Use credentials with the required permission and try again.
- `404`: No portfolio with this ID exists for your correspondent. Check the portfolio ID and try again.
- `422`: The request failed validation or cannot be completed in its current state. The message describes the reason.
- `500`: Something went wrong on our side while handling the request. Retry with backoff. If it keeps happening, contact support.

---

[API](https://skmtc.dev/alpacahq/apis/broker-api.md) - [All operations](https://skmtc.dev/alpacahq/apis/broker-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alpacahq/apis/broker-api/revisions/381b1ecb3ccc?raw)
