> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LinkedIn Ads Audiences: Update Audience Template

> Update the name, description, or targetingCriteria of a saved audience template. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Update the name, description, or targetingCriteria of a saved audience template.

> [!NOTE]
>
> Tool ID: `linkedin_ads_audiences_update_audience_template`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'linkedin_ads_audiences_update_audience_template',
  {
    "template_id": "template_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute linkedin_ads_audiences_update_audience_template --input '{
  "template_id": "template_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "template_id": "template_123",
    "status": "example"
  }
}
```

Use `deepline describe linkedin_ads_audiences_update_audience_template --json` for the latest machine-readable contract.

## Input reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.template_id` | `string` | Yes | — | Minimum length: 1. |
| `payload.name` | `string` | No | — | Minimum length: 1. Maximum length: 100. |
| `payload.description` | `string` | No | — | Minimum length: 1. Maximum length: 500. |
| `payload.targeting_criteria` | `record` | No | — | LinkedIn targetingCriteria object: \{include: \{and: \[\{or: \{'urn:li:adTargetingFacet:\<facet>': \['urn:li:...']}}]}, exclude: \{or: \{...}}}. Facet URNs come from LinkedIn's Targeting Criteria Facet reference. matched-audience segments go under urn:li:adTargetingFacet:audienceMatchingSegments. LinkedIn validates facet and value URNs server-side. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "template_id": {
        "type": "string",
        "minLength": 1
      },
      "name": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100
      },
      "description": {
        "type": "string",
        "minLength": 1,
        "maxLength": 500
      },
      "targeting_criteria": {
        "type": "object",
        "description": "LinkedIn targetingCriteria object: {include: {and: [{or: {'urn:li:adTargetingFacet:<facet>': ['urn:li:...']}}]}, exclude: {or: {...}}}. Facet URNs come from LinkedIn's Targeting Criteria Facet reference; matched-audience segments go under urn:li:adTargetingFacet:audienceMatchingSegments. LinkedIn validates facet and value URNs server-side.",
        "additionalProperties": {}
      }
    },
    "required": [
      "template_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.template_id` | `string` | Yes | — | — |
| `result.data.status` | `string` | Yes | — | — |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "template_id",
          "status"
        ],
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": true
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.