---
title: "Create or update portfolio location"
method: PUT
path: "/portfolio/accounts/{accountId}/locations/{id}"
tags: ["Portfolio Locations"]
---

# Create or update portfolio location

`PUT /portfolio/accounts/{accountId}/locations/{id}`

## Request

- Base URL: `https://eliq.data-management-api.eliq.com` (the document declares no server; this is the origin it was published from)
- URL: `https://eliq.data-management-api.eliq.com/portfolio/accounts/{accountId}/locations/{id}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/eliq/apis/eliq-data-management-api/docs/portfolio/accounts/:accountId/locations/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Create or update connection between location and account for the portfolio.
 If a location with the given id does not exist on the account, a new account location will be created.
 If a location with id exists on the account, that location will be updated.

## Path parameters

- `accountId` string, required
- `id` string, required

## Request body

- PortfolioLocation
  - `id` string, nullable
  - `name` string, required
  - `created_at_utc` string

## Response `200`

Portfolio location was updated

- PortfolioLocation
  - `id` string, nullable
  - `name` string, required
  - `created_at_utc` string

## Other responses

- `201`: Portfolio location was created
- `400`: Bad request. See error code and description for more info
- `404`: Portfolio account was not found

---

[API](https://skmtc.dev/eliq/apis/eliq-data-management-api.md) - [All operations](https://skmtc.dev/eliq/apis/eliq-data-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/eliq/apis/eliq-data-management-api/revisions/bb41f29473c5?raw)
