# Create Import URL — Descript

> Create an import URL for a published project. See the documentation

- Key: `_descript-create-import-url`
- Type: Action (Write)
- Version: 0.0.2
- App: Descript (`_descript`) — https://pipedream.com/apps/descript.md
- This page (HTML): https://pipedream.com/apps/descript/actions/create-import-url
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/_descript/actions/create-import-url/create-import-url.mjs

## Description

Create an import URL for a published project. [See the documentation](https://docs.descriptapi.com/#tag/Edit-in-Descript/operation/postEditInDescriptSchema)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `partnerDriveId` | `string` | Yes | The drive ID to use for the import URL, visible at the end of the URL when viewing the Drive Workspace. (Does not include leading "-d" or "-p"). Example: 98130bf1-9471-4f5d-915b-bf286c230b8f |
| `uri` | `string` | Yes | A public/pre-signed uri to the audio or video asset. Supported Audio: WAV, FLAC, AAC, MP3; Supported Video: h264, HEVC (container: MOV, MP4) |
| `sourceId` | `string` | No | External source ID to be included in Descript export pages. This ID is not currently used to deduplicate data coming into Descript, a new Project is created for each import. |
| `name` | `string` | No | A name for the file |
| `startOffset` | `string` | No | The number of seconds into the Project's timeline this audio or video file should start at |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "_descript",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "_descript-create-import-url",
  arguments: {
    partnerDriveId: "Partner Drive ID",
    uri: "URI",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "_descript-create-import-url",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    _descript: { authProvisionId: "apn_xxxxxxx" },
    partnerDriveId: "Partner Drive ID",
    uri: "URI",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "_descript-create-import-url",
    "configured_props": {
      "_descript": { "authProvisionId": "apn_xxxxxxx" },
      "partnerDriveId": "Partner Drive ID",
      "uri": "URI"
    }
  }'
```

---

- App: https://pipedream.com/apps/descript.md · All apps: https://pipedream.com/apps
