---
title: "Create portfolios allocation"
method: POST
path: "/portfolios/allocations"
tags: ["Portfolios"]
---

# Create portfolios allocation

`POST /portfolios/allocations`

## Request

- Base URL: `https://sandbox.upvest.co`
- URL: `https://sandbox.upvest.co/portfolios/allocations`
- Auth: OAuth 2 (client credentials, token URL `https://sandbox.upvest.co/auth/token`, scopes: `portfolios:admin`)

Creates a named portfolio allocation specifying a set of instrument weights.

The `allocation` array must contain at least one instrument entry. Weights are expressed as percentages and must sum to 100.

See the Portfolios guide ([TOL](https://docs.upvest.co/products/tol/guides/portfolios) / [BYOL](https://docs.upvest.co/products/byol/guides/portfolios)) for implementation details.

## Headers

- `idempotency-key` string, uuid, required

## Request body

- object: Request body for creating a portfolio allocation. Specifies the allocation name, instrument weights, and optional rebalancing strategy IDs.
  - `name` string: Allocation name
  - `allocation` object[], required: List of portfolios allocations
    - `instrument_id` union, required
      - string: International securities identification number defined by [ISO 6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
      - string, uuid: UPVEST instrument identifier
    - `instrument_id_type` 'ISIN' | 'UPVEST', required: The type of the ID used in the request. * ISIN - International Securities Identification Number * UPVEST - UPVEST's unique instrument identifier
    - `weight` string, required: Instrument allocation weight
  - `rebalancing_strategy_ids` string[]: List of rebalancing strategy ids

## Response `200`

Portfolios allocation

- object: Defines a named set of instrument weights for a portfolio. The `allocation` array specifies each instrument (by ISIN or Upvest UUID) and its target weight percentage. Weights must sum to 100.
  - `id` string, uuid, required: Universally Unique Identifier (UUID) of a portfolio allocation.
  - `created_at` string, date-time, required: Date and time when the resource was created. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
  - `updated_at` string, date-time, required: Date and time when the resource was last updated. [RFC 3339-5](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), [ISO8601 UTC](https://www.iso.org/iso-8601-date-and-time-format.html)
  - `name` string, required: Allocation name
  - `allocation` object[], required: List of portfolios allocations
    - `instrument_id` union, required
      - string: International securities identification number defined by [ISO 6166](https://en.wikipedia.org/wiki/International_Securities_Identification_Number).
      - string, uuid: UPVEST instrument identifier
    - `instrument_id_type` 'ISIN' | 'UPVEST', required: The type of the ID used in the request. * ISIN - International Securities Identification Number * UPVEST - UPVEST's unique instrument identifier
    - `weight` string, required: Instrument allocation weight

## Other responses

- `400`: Bad Request. The incoming request had a malformed parameter/object.
- `401`: Unauthorized. The caller has not been authenticated.
- `403`: Forbidden. The caller has been authenticated but is not allowed to take the requested action.
- `404`: Not Found. The requested resource could not be found.
- `406`: Not Acceptable. The resource does not have a current representation that would be acceptable to the user agent. "Accept" header defined unsupported value.
- `429`: Too Many Requests. The caller has exceeded their quota for the time period and has been throttled.
- `500`: Internal Server Error. The service encountered an unexpected error.
- `503`: Service Unavailable. The service handling for this request cannot be reached at this time.
- `504`: Gateway Timeout. The service gateway has reached its internal timeout.

---

[API](https://skmtc.dev/upvest/apis/upvest-investment-api.md) · [All operations](https://skmtc.dev/upvest/apis/upvest-investment-api/llms.txt) · [OpenAPI document](https://skmtc.dev/upvest/apis/upvest-investment-api/revisions/ca69534b631d?raw)
