> ## 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: List Audience Templates

> List saved audience templates for a sponsored account. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

List saved audience templates for a sponsored account.

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

## 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_list_audience_templates',
  {
    "account_id": "123456789",
    "sort_field": "ID",
    "sort_order": "ASCENDING"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute linkedin_ads_audiences_list_audience_templates --input '{
  "account_id": "123456789",
  "sort_field": "ID",
  "sort_order": "ASCENDING"
}' --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": {
    "templates": [
      {
        "id": "id_123",
        "name": "Example",
        "description": "Example description",
        "account": "example",
        "approximate_member_count": 1,
        "created_time": 1,
        "last_modified_time": 1,
        "targeting_criteria": {}
      }
    ]
  }
}
```

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

## Input reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.account_id` | `string` | No | — | LinkedIn sponsored account ID. Find it in Campaign Manager under Account Assets, or in the URL as /campaignmanager/accounts/\{id}. Pass the bare numeric id or a full urn:li:sponsoredAccount:\{id}. Deepline normalizes either form. Optional: defaults to the workspace default account, or the sole enabled account when only one exists. Minimum length: 1. |
| `payload.sort_field` | `"ID" \| "NAME"` | No | `"ID"` | Sort field. NAME is an unlocalized alphabetical sort. Allowed: `ID`, `NAME`. |
| `payload.sort_order` | `"ASCENDING" \| "DESCENDING"` | No | `"ASCENDING"` | Allowed: `ASCENDING`, `DESCENDING`. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "properties": {
      "account_id": {
        "type": "string",
        "description": "LinkedIn sponsored account ID. Find it in Campaign Manager under Account Assets, or in the URL as /campaignmanager/accounts/{id}. Pass the bare numeric id or a full urn:li:sponsoredAccount:{id}; Deepline normalizes either form. Optional: defaults to the workspace default account, or the sole enabled account when only one exists.",
        "minLength": 1
      },
      "sort_field": {
        "type": "string",
        "description": "Sort field. NAME is an unlocalized alphabetical sort.",
        "default": "ID",
        "enum": [
          "ID",
          "NAME"
        ]
      },
      "sort_order": {
        "type": "string",
        "default": "ASCENDING",
        "enum": [
          "ASCENDING",
          "DESCENDING"
        ]
      }
    },
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.templates` | `array` | Yes | — | — |
| `result.data.templates[].id` | `string` | Yes | — | — |
| `result.data.templates[].name` | `string \| null` | Yes | — | — |
| `result.data.templates[].description` | `string \| null` | Yes | — | — |
| `result.data.templates[].account` | `string \| null` | Yes | — | — |
| `result.data.templates[].approximate_member_count` | `number \| null` | Yes | — | — |
| `result.data.templates[].created_time` | `number \| null` | Yes | — | — |
| `result.data.templates[].last_modified_time` | `number \| null` | Yes | — | — |
| `result.data.templates[].targeting_criteria` | `object \| null` | 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": {
          "templates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "account": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "approximate_member_count": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "created_time": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "last_modified_time": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "targeting_criteria": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "additionalProperties": {}
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "account",
                "approximate_member_count",
                "created_time",
                "last_modified_time",
                "targeting_criteria"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "templates"
        ],
        "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.