---
title: "Set the Variable Studio references for an element."
method: POST
path: "/variables/d/{did}/w/{wid}/e/{eid}/variablestudioreferences"
tags: ["Variables"]
---

# Set the Variable Studio references for an element.

`POST /variables/d/{did}/w/{wid}/e/{eid}/variablestudioreferences`

## Request

- Base URL: `https://api.onshape.com/api/v17`
- URL: `https://api.onshape.com/api/v17/variables/d/{did}/w/{wid}/e/{eid}/variablestudioreferences`
- Auth: OAuth 2 and HTTP basic
  - Authorization code: `/oauth/authorize`
  - Token URL: `/oauth/token` scopes: `OAuth2Write`

## Path parameters

- `did` string, required
- `wid` string, required
- `eid` string, required

## Query parameters

- `linkDocumentId` string

## Request body

- BTVariableStudioReferenceListInfo
  - `references` BTVariableStudioReferenceInfo[]: List of variable studio references
    - `configurationIdToValue` object: Optional map of configuration parameter id to value
    - `entireVariableStudio` boolean: Whether all variables in the referenced variable studio are included
    - `referenceDocumentId` string: DocumentId of referenced variable studio, blank for intra-workspace references
    - `referenceElementId` string, required: ElementId of referenced variable studio
    - `referenceVersionId` string: VersionId of referenced variable studio, blank for intra-workspace references
    - `variableNames` string[]: Optional list of selected variables

## Response `default`

default response

---

[API](https://skmtc.dev/onshape/apis/onshape-rest-api.md) - [All operations](https://skmtc.dev/onshape/apis/onshape-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/onshape/apis/onshape-rest-api/revisions/c5c4c780f831?raw)
