> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Create a shortcut

POST https://api.sigmacomputing.com/v2/shortcuts
Content-Type: application/json

Create a shortcut that surfaces an existing item in another folder or workspace without duplicating it.

  ### Usage notes
  - A shortcut requires a **parentId** (the folder or workspace to place it in) and a **target** (the item the shortcut points to).
    - Retrieve the ID of a folder to use as a **parentId** by calling the [/v2/files](https://help.sigmacomputing.com/reference/list-files) endpoint and reviewing the `id` field in the response for files with a `type` of `folder`.
    - Retrieve the ID of a workspace to use as a **parentId** by calling the [/v2/workspaces](https://help.sigmacomputing.com/reference/list-workspaces) endpoint.
  - The target can be a document (workbook, data model, report, dataset, or folder) or a database object (table, view, schema, database, or stored procedure).
  - You must have at least **Can view** access to the target document or folder, or **Can use** access to the target database object.

  ### Usage scenarios
  - **Deployment and embedding**: Surface shared workbooks or data models in tenant workspaces or folders without exposing a central workspace to end users.
    

Reference: https://help.sigmacomputing.com/reference/create-shortcut

## Authentication

- OAuth2 — send the obtained token as `Authorization: Bearer <token>`

## Servers

- `https://api.sigmacomputing.com` (Server for GCP (US) hosted organizations, default)
- `https://api.sa.gcp.sigmacomputing.com` (Server for GCP (KSA) hosted organizations)
- `https://aws-api.sigmacomputing.com` (Server for AWS US (West) hosted organizations)
- `https://api.us-a.aws.sigmacomputing.com` (Server for AWS US (East) hosted organizations)
- `https://api.ca.aws.sigmacomputing.com` (Server for AWS Canada hosted organizations)
- `https://api.eu.aws.sigmacomputing.com` (Server for AWS Europe hosted organizations)
- `https://api.au.aws.sigmacomputing.com` (Server for AWS Australia and APAC hosted organizations)
- `https://api.uk.aws.sigmacomputing.com` (Server for AWS UK hosted organizations)
- `https://api.us.azure.sigmacomputing.com` (Server for Azure US hosted organizations)
- `https://api.eu.azure.sigmacomputing.com` (Server for Azure Europe hosted organizations)
- `https://api.ca.azure.sigmacomputing.com` (Server for Azure Canada hosted organizations)
- `https://api.uk.azure.sigmacomputing.com` (Server for Azure United Kingdom hosted organizations)
- `https://api.au.azure.sigmacomputing.com` (Server for Azure Australia hosted organizations)

## Request

### Body (application/json)

- `parentId` (string, required) — The ID of the folder or workspace to place the shortcut in.
- `target` (object, required) — The item the shortcut points to.
  - `id` (string, required) — The ID of the workbook, data model, report, dataset, folder, or database object the shortcut points to.
- `name` (string, optional) — A name for the shortcut. Defaults to the name of the item it points to if this field is omitted.

## Response

### 200

The response body.

- `id` (string, required)
- `urlId` (string, required)
- `name` (string, required)
- `parentId` (string, required)
- `parentUrlId` (string, required)
- `path` (string, required)
- `target` (object, required)
  - `type` (enum, required) — The type of the item this shortcut points to. For database targets, `table` also covers views, and `scope` covers schemas and databases.
    - Allowed values: `workbook`, `data-model`, `dataset`, `report`, `folder`, `table`, `scope`, `stored-procedure`
  - `id` (string, required) — The ID of the item this shortcut points to.
- `createdBy` (string, required) — The identifier of the user who created this object.
- `updatedBy` (string, required) — The identifier of the user or process that last updated this object.
- `createdAt` (datetime, required) — When the object was created.
- `updatedAt` (datetime, required) — When the object was last updated.
- `ownerId` (string, optional, nullable)

## Examples

**Request**

```json
{
  "parentId": "string",
  "target": {
    "id": "string"
  }
}
```

**Response**

```json
{
  "id": "string",
  "urlId": "string",
  "name": "string",
  "parentId": "string",
  "parentUrlId": "string",
  "path": "string",
  "target": {
    "type": "workbook",
    "id": "string"
  },
  "createdBy": "string",
  "updatedBy": "string",
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "ownerId": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.sigmacomputing.com/v2/shortcuts"

payload = {
    "parentId": "string",
    "target": { "id": "string" }
}
headers = {
    "Authorization": "<token>.",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sigmacomputing.com/v2/shortcuts';
const options = {
  method: 'POST',
  headers: {Authorization: '<token>.', 'Content-Type': 'application/json'},
  body: '{"parentId":"string","target":{"id":"string"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sigmacomputing.com/v2/shortcuts"

	payload := strings.NewReader("{\n  \"parentId\": \"string\",\n  \"target\": {\n    \"id\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "<token>.")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sigmacomputing.com/v2/shortcuts")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<token>.'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"parentId\": \"string\",\n  \"target\": {\n    \"id\": \"string\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sigmacomputing.com/v2/shortcuts")
  .header("Authorization", "<token>.")
  .header("Content-Type", "application/json")
  .body("{\n  \"parentId\": \"string\",\n  \"target\": {\n    \"id\": \"string\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sigmacomputing.com/v2/shortcuts', [
  'body' => '{
  "parentId": "string",
  "target": {
    "id": "string"
  }
}',
  'headers' => [
    'Authorization' => '<token>.',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sigmacomputing.com/v2/shortcuts");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<token>.");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"parentId\": \"string\",\n  \"target\": {\n    \"id\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "<token>.",
  "Content-Type": "application/json"
]
let parameters = [
  "parentId": "string",
  "target": ["id": "string"]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sigmacomputing.com/v2/shortcuts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```