---
title: "display ads"
method: PUT
path: "/api/display_ads/{id}"
tags: ["display ads"]
---

# display ads

`PUT /api/display_ads/{id}`

This endpoint allows the client to update the attributes of a single display ad, via its id.

## Path parameters

- `id` integer, required

## Request body

- object
  - `name` string, required — For internal use, helps distinguish ads from one another
  - `body_markdown` string, required — The text (in markdown) of the ad (required)
  - `approved` boolean — Ad must be both published and approved to be in rotation
  - `published` boolean — Ad must be both published and approved to be in rotation
  - `organization_id` integer — Identifies the organization to which the ad belongs
  - `display_to` 'all' | 'logged_in' | 'logged_out' — Potentially limits visitors to whom the ad is visible
  - `placement_area` 'sidebar_left' | 'sidebar_left_2' | 'sidebar_right' | 'post_sidebar' | 'post_comments', required — Identifies which area of site layout the ad can appear in
  - `tag_list` string — Tags on which this ad can be displayed (blank is all/any tags)

## Response `200`

successful

## Other responses

- `401` — unauthorized
- `404` — not found

## Changes

- **2023-01-10** (v1) `754f8b25f815` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/forem/apis/forem-api-v1/changes/api/display_ads/:id/put.md)

---

[API](https://skmtc.dev/forem/apis/forem-api-v1.md) · [All operations](https://skmtc.dev/forem/apis/forem-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/forem/forem-api-v1/revisions/754f8b25f815/schema)
