[Tenjin API Reference](https://api-docs.tenjin.com/llms.txt) › [Campaign Management API](https://api-docs.tenjin.com/campaign-management-api.md) › Get an ad account

- Campaign Management API OpenAPI spec: https://api-docs.tenjin.com/openapi/campaign-management-api.json

# Get an ad account

- **Method:** `GET`
- **Path:** `/v2/ad_accounts/{id}`
- **Operation ID:** `get_ad_accounts_id`
- **Tags:** Ad Accounts

## Effective servers

- `https://api.tenjin.com`

## Authentication

- **Bearer**: HTTP bearer (`JWT`)

  Generate an access token on the [Access Tokens](https://dashboard.tenjin.com/dashboard/access_tokens) page of the Tenjin dashboard and send it as `Authorization: Bearer <access token>`. [API access tokens](https://tenjin.com/docs/api-access-tokens/) explains them.

## Path parameters

- **`id` (required)**: `string`, format: `uuid`

  Id of the ad account

## Responses

### 200 The ad account

**Content type:** `application/json`

schema: `AdAccountDocument`

- **`data` (required)**: `object`, schema: `AdAccountResource`
  - **`attributes` (required)**: `object`
    - **`channel_id` (required)**: `integer`

      Id of the ad account's channel
    - **`external_id` (required)**: `string | null`

      Id of the account on the ad network
    - **`name` (required)**: `string`

      Name of the ad account
  - **`id` (required)**: `string`, format: `uuid`
  - **`type` (required)**: `string`, possible values: `"ad_account"`
- **`links` (required)**: `object`, schema: `Links`
  - **`self` (required)**: `string`, format: `uri`

    URL of this request
  - **`first`**: `string`, format: `uri`

    URL of the first page of a list
  - **`last`**: `string`, format: `uri`

    URL of the last page of a list
  - **`next`**: `string`, format: `uri`

    URL of the next page of a list
  - **`prev`**: `string`, format: `uri`

    URL of the previous page of a list
- **`meta` (required)**: `object`

  Always empty

**Example: The ad account**

```json
{
  "data": {
    "id": "6e3fbfa6-27cc-45f2-af3f-5c9ead45280e",
    "type": "ad_account",
    "attributes": {
      "name": "Facebook Account",
      "channel_id": 3,
      "external_id": "444509211788999"
    }
  },
  "links": {
    "self": "https://api.tenjin.com/v2/ad_accounts/6e3fbfa6-27cc-45f2-af3f-5c9ead45280e"
  },
  "meta": {}
}
```

### 400, 401, 403, 498

- `400` A param is missing or invalid, a record is not found, or the request cannot be served
- `401` Missing or invalid credentials, or no access to the requested data
- `403` Invalid token, or the user's role does not allow the request
- `498` Expired token, or a token with an invalid signature

**Content type:** `application/json`

schema: `Error`

- **`error` (required)**: `string`

  What went wrong

**Example:**

```json
{
  "error": ""
}
```

## Schemas

- `Error` — shown above.
- `AdAccountDocument` — shown above.
- `Links` — shown above.
- `AdAccountResource` — shown above.
