---
title: "Create Import URL"
method: POST
path: "/edit_in_descript/schema"
tags: ["Edit in Descript"]
---

# Create Import URL

`POST /edit_in_descript/schema`

Create an Import URL by sending a Project schema to Descript API from your service's backend.

### Import Schema
Our import schemas are specified as a minimal JSON list of files which is detailed in full at the bottom of this
section. At it's smallest, the request body looks like:

```
{
  "partner_drive_id": "162c61d1-6ced-4b25-a622-7dba922983ee",
  "project_schema": {
    "schema_version": "1.0.0",
    "files": [{"uri": "https://descriptusercontent.com/jane.wav?signature=d182bca64bf94a1483d2fd16b579f955"}]
  }
}
```

### File Access
The file paths provided in the schema need to either be public or pre-signed URIs with enough time before
expiration for failures and retries, we suggest URIs that won't expire for 48 hours. We ask that the files have
already been saved when the import link is generated to minimize cases where we're waiting for eventually
consistent storage of files that will never be written. We will, however, wait for eventual consistency of the
storage layer and retry fetching files before eventually timing out.

Files must be hosted on preapproved hosts as our import process has an allow list which it checks URIs against.
Files will be requested with `User-Agent: Descriptbot/1.0` (version may change) for tracking purposes.

### Import link expiration
Import links are no longer valid after a user imports their data once. Viewing an already used import link will
not allow for importing again and will not provide access to a previously created Descript Project. Partners are
able to generate a new import link at any time, regardless of if a previous import link has been used.

The API does not currently provide partners with a link to the Descript Project, though users will be redirected
to it from Descript's web interface the first time they import files, and can always find the Project in Descript.

Import links expire after 3 hours and attempting to use an import link after the pre-signed links in the schema
file have expired will result in an error, so we recommend generating the import link after the user has clicked
the Edit in Descript button.

### Supported media specification
We recommend sending the highest quality, uncompressed versions of files available to you. If you have multiple
tracks, we recommend prioritizing sending us the full multi-track sequence over a combined file.

* Audio: WAV, FLAC, AAC, MP3
* Video: h264, HEVC (container: MOV, MP4)

## Request body

- EditInDescriptSchemaPostBody
  - `partner_drive_id` string, uuid, required — The drive id associated with the auth token.
  - `project_schema` object, required — The Project schema
    - `schema_version` string, string, required — Schema version id.
    - `source_id` string, string — External source id to be included in Descript export pages, see Export from Descript section for details. This ID is not currently used to deduplicate data coming into Descript, a new Project is created for each import.
    - `files` object[], required — List of remote files to import into Descript.
      - `name` string, string — A name for the file.
      - `uri` string, url, required — A public/pre-signed uri to the audio or video asset, see supported media specifications section.
      - `start_offset` object — The amount of time into the Project's timeline this audio or video file should start at.
        - `seconds` number — Float number of seconds into the timeline.

## Response `201`

Successful operation.

- EditInDescriptSchemaPostResponse
  - `url` string, url — A url for partners to redirect their user to in order to start the import process—expires after 3 hours.

## Other responses

- `400` — Invalid input.
- `403` — Associated drive does not have Edit in Descript permissions.
- `429` — Too many requests - rate limit exceeded. Use the `Retry-After` header to determine when to retry.

---

[API](https://skmtc.dev/descriptapi/apis/descript-api.md) · [All operations](https://skmtc.dev/descriptapi/apis/descript-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/descriptapi/descript-api/revisions/04c0005aef70/schema)
