# LinkedIn Ads

> Read LinkedIn ad accounts, campaign groups, campaigns, creatives and performance; manage draft campaign groups.

App · 14 actions. Web page: https://docs.lodol.com/docs/integrations/linkedin-ads

## Actions

### Create campaign group

Create a draft campaign group. It cannot serve ads until its status is changed.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Name (`name`, text, required): Name.
- Start time (`start_time`, date and time, required): Start time.
- End time (`end_time`, date and time): End time.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "id": "Example"
  },
  "has_more": false,
  "next_cursor": null
}
```

### Delete draft campaign

Delete a draft campaign. Other statuses must use Update to request PENDING_DELETION.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Campaign (`campaign_id`, text, required): Campaign id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Delete draft campaign group

Delete a draft campaign group. Other statuses must use Update to request PENDING_DELETION.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Campaign group (`campaign_group_id`, text, required): Campaign group id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get ad account

Get ad account in LinkedIn Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get campaign

Get campaign in LinkedIn Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Campaign (`campaign_id`, text, required): Campaign id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get campaign analytics

Read campaign performance for an account and date range. Request only metrics permitted for your approved Marketing API application.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Start date (`start_date`, date, required): Start date.
- End date (`end_date`, date, required): End date.
- Time granularity (`time_granularity`, text, required): Time granularity. One of: `ALL`, `DAILY`, `MONTHLY`, `YEARLY`.
- Fields (`fields`, list): Fields. One or more of: `impressions`, `clicks`, `costInLocalCurrency`, `externalWebsiteConversions`, `likes`, `shares`, `comments`, `dateRange`, `pivotValues`.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "elements": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Get campaign group

Get campaign group in LinkedIn Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Campaign group (`campaign_group_id`, text, required): Campaign group id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Get creative

Get creative in LinkedIn Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Creative (`creative_id`, text, required): Creative id.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### List ad accounts

List ad accounts in LinkedIn Ads.

**Inputs**

- Page token (`page_token`, text): Page token.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "elements": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List campaign groups

List campaign groups in LinkedIn Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Page token (`page_token`, text): Page token.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "elements": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List campaigns

List campaigns in LinkedIn Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Page token (`page_token`, text): Page token.
- Page size (`page_size`, number): Page size. At least 1.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "elements": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### List creatives

List creatives in LinkedIn Ads.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Next page token (`page_token`, text): Token returned by the previous page.
- Page size (`page_size`, number): How many creatives to return, up to 100. From 1 to 100.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {
    "elements": []
  },
  "has_more": false,
  "next_cursor": null
}
```

### Update campaign

Change only the supplied fields. ACTIVE can start ad spending; PENDING_DELETION schedules deletion.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Campaign (`campaign_id`, text, required): Campaign id.
- Name (`name`, text): Name.
- Status (`status`, text): Status. One of: `ACTIVE`, `PAUSED`, `ARCHIVED`, `CANCELED`, `DRAFT`, `PENDING_DELETION`.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```

### Update campaign group

Change only the supplied fields. ACTIVE can start ad spending; PENDING_DELETION schedules deletion.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Campaign group (`campaign_group_id`, text, required): Campaign group id.
- Name (`name`, text): Name.
- Status (`status`, text): Status. One of: `ACTIVE`, `PAUSED`, `ARCHIVED`, `CANCELED`, `DRAFT`, `PENDING_DELETION`.

**Outputs**: Response.

- `data` (object): The official API response, including records and response metadata.
- `has_more` (true/false): Whether another page is available.
- `next_cursor` (text): Continuation token or offset to pass to the next request.

**Example output**

```json
{
  "data": {},
  "has_more": false,
  "next_cursor": null
}
```
