---
title: "Get ad"
method: GET
path: "/projects/{project_id}/ads/{id}"
tags: ["Ads"]
---

# Get ad

`GET /projects/{project_id}/ads/{id}`

Returns a single ad by ID.

## Response `200`

OK

- AdModel
  - `id` integer — Unique identifier for the object
  - `type` 'custom' | 'vast' — The type of ad, either `custom` or `vast`. Ads of type `custom` must have `title`, `url` and `media` fields. Ads of type `vast` must have `title` and `vast_url` fields.
  - `enabled` boolean — Whether the ad will play in the BeyondWords player
  - `placement` 'pre-roll' | 'mid-roll' | 'post-roll' — Whether the ad should play before/during/after the audio content. Possible values are `pre-roll`, `mid-roll`, or `post-roll`
  - `vast_url` string, uri, nullable — A VAST-compliant URL that contains the ads to be played
  - `title` string, nullable — The title of the ad
  - `click_through_url` string, uri, nullable — The click-through URL of the `custom` ad to show in the player
  - `image_url` string, uri, nullable — The image URL to show in the player while the ad is playing
  - `media_url` string, uri, nullable — The URL of the media file of the `custom` ad to play in the player
  - `audio_url` string, uri, nullable — The URL of the audio file of the `custom` ad to play in the player
  - `video_url` string, uri, nullable — The URL of the video file of the `custom` ad to play in the player
  - `media` AdAudioModel[] — The transcoded media of the `custom` ad to play in the player This is read-only and generated automatically from the media_url.
    - `id` integer — Unique identifier for the object (automatically set)
    - `content_type` string — The content type of the media (automatically set)
    - `url` string — The URL of the media file
    - `duration` integer — The duration of the media in milliseconds (automatically set)
    - `base64_file` string, nullable — The content of the media file encoded as base64. Only present for .m3u8 metadata files
  - `audio` AdAudioModel[] — The transcoded media of the `custom` ad to play in the player This is read-only and generated automatically from the media_url.
    - `id` integer — Unique identifier for the object (automatically set)
    - `content_type` string — The content type of the media (automatically set)
    - `url` string — The URL of the media file
    - `duration` integer — The duration of the media in milliseconds (automatically set)
    - `base64_file` string, nullable — The content of the media file encoded as base64. Only present for .m3u8 metadata files
  - `video` AdVideoModel[] — The array of video files.
    - `id` integer — Unique identifier for the object (automatically set)
    - `content_type` string — The content type of the media (automatically set)
    - `url` string — The URL of the media file
    - `duration` integer — The duration of the media in milliseconds (automatically set)
    - `base64_file` string, nullable — The content of the media file encoded as base64. Only present for .m3u8 metadata files
  - `theme` 'auto' | 'dark' | 'light', nullable — The color theme to use for the ad when it is playing. Possible values are `auto`, `dark`, `light`. The `auto` theme is based on the user's light/dark mode system preference.
  - `dark_theme` object, nullable — The dark theme colors
    - `text_color` string — The hexadecimal text color to use in the player
    - `background_color` string — The hexadecimal background color to use in the player
    - `icon_color` string — The hexadecimal icon color to use in the player
  - `light_theme` object, nullable — The light theme colors
    - `text_color` string — The hexadecimal text color to use in the player
    - `background_color` string — The hexadecimal background color to use in the player
    - `icon_color` string — The hexadecimal icon color to use in the player
  - `video_theme` object, nullable — The video theme colors
    - `text_color` string — The hexadecimal text color to use in the player
    - `background_color` string — The hexadecimal background color to use in the player
    - `icon_color` string — The hexadecimal icon color to use in the player
  - `time_range` object, nullable — The time range for when the ad should play in the player
    - `start` string, nullable — The start time of when the ad should play
    - `end` string, nullable — The end time of when the ad should play
  - `created` string — Time at which the object was created (ISO 8601)
  - `updated` string — Time at which the object was updated (ISO 8601)

---

[API](https://skmtc.net/beyondwords/apis/beyondwords-rest-api.md) · [All operations](https://skmtc.net/beyondwords/apis/beyondwords-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/beyondwords/beyondwords-rest-api/revisions/8c4bfe3e2ebd/schema)
