# Create Caption Order Using External Link — Rev

> Submit a new caption order using a external link that contains the media. See docs here.

- Key: `rev-create-caption-order-external-link`
- Type: Action (Write)
- Version: 0.0.2
- App: Rev (`rev`) — https://pipedream.com/apps/rev.md
- This page (HTML): https://pipedream.com/apps/rev/actions/create-caption-order-external-link
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/rev/actions/create-caption-order-external-link/create-caption-order-external-link.mjs

## Description

Submit a new caption order using a external link that contains the media. [See docs here.](https://www.rev.com/api/orderspostcaption)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `externalLink` | `string` | Yes | A link to a web page where the media is embedded, but not a link to the media file. |
| `videoLength` | `integer` | No | Required, except for Youtube URLs. |
| `reference` | `string` | No | A reference number for the order, like the order ID tracked by another system. |
| `speakers` | `string[]` | No | List of speaker names. |
| `languages` | `string[]` | No | Language codes to request foreign language subtitles. Examples: es-es, it. |
| `formats` | `string[]` | No | What file formats should the captions be optimized for. Defaults to Subrip. |
| `burnedInCaptions` | `boolean` | No | Should burned-in captions be generated? Requesting burned-in captions adds $0.30 per audio minute to the cost of your orders. Burned-in captions will be available to download via the API for 7 days after they are generated. |
| `rush` | `boolean` | No | Should the order be rushed? Rush will deliver your files up to 5x faster. Requesting Rush adds $1.25 per audio minute to the cost of your orders. |
| `notificationUrl` | `string` | No | The url for notifications. Can be a Pipedream Webhook. |
| `notificationLevel` | `string` | No | Specifies which notifications are sent. |

## 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": "rev",
      },
    },
  },
)

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: "rev-create-caption-order-external-link",
  arguments: {
    externalLink: "External Link",
    videoLength: 10,
  },
})
```

**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: "rev-create-caption-order-external-link",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    rev: { authProvisionId: "apn_xxxxxxx" },
    externalLink: "External Link",
    videoLength: 10,
  },
})

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": "rev-create-caption-order-external-link",
    "configured_props": {
      "rev": { "authProvisionId": "apn_xxxxxxx" },
      "externalLink": "External Link",
      "videoLength": 10
    }
  }'
```

---

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