# Update Subtitle Language — Amara

> Update a subtitle language. See the docs here

- Key: `amara-update-subtitle-language`
- Type: Action (Write)
- Version: 0.0.3
- App: Amara (`amara`) — https://pipedream.com/apps/amara.md
- This page (HTML): https://pipedream.com/apps/amara/actions/update-subtitle-language
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/amara/actions/update-subtitle-language/update-subtitle-language.mjs

## Description

Update a subtitle language. [See the docs here](https://apidocs.amara.org/#update-a-subtitle-language)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `team` | `string` | No | Filter by team (e.g. amplify in https://amara.org/en/teams/amplify/). Leave blank for videos that are in the public area. |
| `videoId` | `string` | Yes | Video ID as the Amara video identifier Options are loaded from the connected account. |
| `language` | `string` | Yes | Language code for the language of the subtitles (ISO 639-1 two-letter code) Options are loaded from the connected account. |
| `isPrimaryAudioLanguage` | `boolean` | No | Whether the language is the primary spoken language for the video |
| `subtitlesComplete` | `boolean` | No | Whether the subtitles are complete |
| `softLimitLines` | `integer` | No | Controls the max number of lines per subtitle. A warning is shown in the editor if this limit is exceeded. |
| `softLimitMinDuration` | `integer` | No | Controls the minimum duration of subtitles in milliseconds. A warning is shown in the editor if this limit is exceeded. |
| `softLimitMaxDuration` | `integer` | No | Controls the maximum duration of subtitles in milliseconds. This controls the message in the guidelines dialog. |
| `softLimitCharactersPerLine` | `integer` | No | Controls the maximum number of characters per line for subtitles. A warning is shown in the editor if this limit is exceeded. |
| `softLimitCharactersPerSubtitles` | `integer` | No | Controls the maximum number of characters per subtitles. A warning is shown in the editor if this limit is exceeded. |

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

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: "amara-update-subtitle-language",
  arguments: {
    team: "Team",
    videoId: "Video ID",
  },
})
```

**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: "amara-update-subtitle-language",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    amara: { authProvisionId: "apn_xxxxxxx" },
    team: "Team",
    videoId: "Video ID",
  },
})

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": "amara-update-subtitle-language",
    "configured_props": {
      "amara": { "authProvisionId": "apn_xxxxxxx" },
      "team": "Team",
      "videoId": "Video ID"
    }
  }'
```

---

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