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

# Create download URLs

POST https://api.cadrooms.workers.dev/v1/revisions/download-urls
Content-Type: application/json

Returns temporary, signed URLs for downloading the content of multiple revisions in a single request. Use `type` to specify the type of content to download.

Revisions that could not be served are listed in `errors`. The remaining revisions are processed successfully.

Required permission: Viewer or higher in the project of each revision, or a share of the file.


Reference: https://docs.cadrooms.com/api-reference/files/create-revision-download-urls

## Authentication

- `Authorization` header (bearer token, required) — An API key associated with your user account and workspace. API requests inherit your existing workspace permissions.
- `Authorization` header (bearer token, required) — The session token of a user signed in to the CAD ROOMS app. Every endpoint accepts it in place of an API key.

## Request

### Body (application/json)

This endpoint expects an object.

- `revisionIds` (list of string, required) — The revisions to return URLs for.
- `type` (enum, optional, default: original) — The content to return. - `original`: The uploaded file. - `scs`: The 3D model that CAD processing created for the viewer. - `brep_json`: The geometry data that CAD processing created, as JSON.
  - Allowed values: `original`, `scs`, `brep_json`
- `expiresIn` (integer, optional, default: 3600) — Number of seconds the download URLs stay valid.

## Response

### 200

Returns one result per revision. A revision that could not be served is listed in `errors`.

- `data` (list of RevisionDownloadUrl, required) — The revisions that were served.
- `errors` (list of RevisionDownloadUrlError, optional) — The revisions that could not be served.

## Errors

### 400 Bad Request Error

The request contains invalid or missing parameters. See `details` for specific validation errors.

- `error` (ErrorError, required)

### 401 Unauthorized Error

The API key is missing, invalid, expired, or revoked.

- `error` (ErrorError, required)

### 429 Too Many Requests Error

The rate limit has been exceeded. Wait for the duration specified in the `Retry-After` header before retrying.

- `error` (ErrorError, required)

### 500 Internal Server Error

An unexpected server error occurred. Retry later. Include the `requestId` when contacting support.

- `error` (ErrorError, required)

## Types

### RevisionDownloadUrl

The URL for the content of one revision. CAD processing content has a `status`, and has `downloadUrl` when the content is ready.

- `revisionId` (string, required) — ID of the revision.
- `path` (string, required) — Path of the file in the project.
- `type` (enum, required) — The content the URL points to.
  - Allowed values: `original`, `scs`, `brep_json`
- `status` (enum, optional) — CAD processing status of the content.
  - Allowed values: `pending`, `processing`, `completed`, `failed`, `incompatible`
- `downloadUrl` (string, optional) — Temporary, signed download URL.
- `contentType` (string, optional) — Content type of the file. Returned for `original`.
- `sizeBytes` (integer, optional) — Size of the content in bytes.
- `scsXml` (RevisionDownloadUrlScsXml, optional) — The XML file that CAD processing created with the 3D model. Returned for `scs` when it exists.

### RevisionDownloadUrlError

A revision that could not be served.

- `revisionId` (string, required) — ID of the revision.
- `reason` (string, required) — Why the revision could not be served.

### ErrorError

- `code` (string, required) — Stable error identifier for programmatic error handling. Every endpoint can return the general codes listed on the Errors page. Where a business condition applies, an endpoint returns a more specific code, documented on that endpoint.
- `message` (string, required) — Human-readable error description. May change over time.
- `requestId` (string, required) — Unique request identifier used for troubleshooting. The same value is returned in the `Request-Id` header of every response. Include this when contacting support.
- `details` (list of ErrorErrorDetailsItems, optional) — Optional. Contains field-level validation errors for `400` responses.

### RevisionDownloadUrlScsXml

The XML file that CAD processing created with the 3D model. Returned for `scs` when it exists.

- `status` (enum, required) — CAD processing status of the XML file.
  - Allowed values: `pending`, `processing`, `completed`, `failed`, `incompatible`
- `downloadUrl` (string, optional) — Temporary, signed download URL.
- `sizeBytes` (integer, optional) — Size of the XML file in bytes.

### ErrorErrorDetailsItems

- `field` (string, required) — Name of the request field that failed validation.
- `message` (string, required) — Description of the validation issue.

## Examples

**Request**

```json
{
  "revisionIds": [
    "e88d65cd-879d-4df3-adfc-ef0ca99238bf"
  ],
  "type": "scs"
}
```

**Response**

```json
{
  "data": [
    {
      "revisionId": "e88d65cd-879d-4df3-adfc-ef0ca99238bf",
      "path": "parts/bracket.prt",
      "type": "scs",
      "status": "completed",
      "downloadUrl": "https://storage.cadrooms.com/signed/e88d65cd",
      "sizeBytes": 182340
    }
  ]
}
```

**SDK Code**

```python Files_createRevisionDownloadUrls_example
import requests

url = "https://api.cadrooms.workers.dev/v1/revisions/download-urls"

payload = {
    "revisionIds": ["e88d65cd-879d-4df3-adfc-ef0ca99238bf"],
    "type": "scs"
}
headers = {
    "Authorization": "Bearer <API key>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Files_createRevisionDownloadUrls_example
const url = 'https://api.cadrooms.workers.dev/v1/revisions/download-urls';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <API key>', 'Content-Type': 'application/json'},
  body: '{"revisionIds":["e88d65cd-879d-4df3-adfc-ef0ca99238bf"],"type":"scs"}'
};

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

```go Files_createRevisionDownloadUrls_example
package main

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

func main() {

	url := "https://api.cadrooms.workers.dev/v1/revisions/download-urls"

	payload := strings.NewReader("{\n  \"revisionIds\": [\n    \"e88d65cd-879d-4df3-adfc-ef0ca99238bf\"\n  ],\n  \"type\": \"scs\"\n}")

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

	req.Header.Add("Authorization", "Bearer <API key>")
	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 Files_createRevisionDownloadUrls_example
require 'uri'
require 'net/http'

url = URI("https://api.cadrooms.workers.dev/v1/revisions/download-urls")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <API key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"revisionIds\": [\n    \"e88d65cd-879d-4df3-adfc-ef0ca99238bf\"\n  ],\n  \"type\": \"scs\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.cadrooms.workers.dev/v1/revisions/download-urls")
  .header("Authorization", "Bearer <API key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"revisionIds\": [\n    \"e88d65cd-879d-4df3-adfc-ef0ca99238bf\"\n  ],\n  \"type\": \"scs\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.cadrooms.workers.dev/v1/revisions/download-urls', [
  'body' => '{
  "revisionIds": [
    "e88d65cd-879d-4df3-adfc-ef0ca99238bf"
  ],
  "type": "scs"
}',
  'headers' => [
    'Authorization' => 'Bearer <API key>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Files_createRevisionDownloadUrls_example
using RestSharp;

var client = new RestClient("https://api.cadrooms.workers.dev/v1/revisions/download-urls");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API key>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"revisionIds\": [\n    \"e88d65cd-879d-4df3-adfc-ef0ca99238bf\"\n  ],\n  \"type\": \"scs\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Files_createRevisionDownloadUrls_example
import Foundation

let headers = [
  "Authorization": "Bearer <API key>",
  "Content-Type": "application/json"
]
let parameters = [
  "revisionIds": ["e88d65cd-879d-4df3-adfc-ef0ca99238bf"],
  "type": "scs"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.cadrooms.workers.dev/v1/revisions/download-urls")! 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()
```