> ## Documentation Index
> Fetch the complete documentation index at: https://docs.closient.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit Product Videos

> Add, update, list, and delete a product's YouTube video links — the programmatic equivalent of the dashboard's videos page.

Programmatic equivalent of the dashboard's `products/<gtin>/videos/` page
(and its `videos/new/`, `videos/<id>/edit/`, `videos/<id>/delete/`
sub-pages).

## When to use

* A brand owner needs to attach a YouTube video (demo, unboxing, how-to) to
  a product, or update/remove one already attached.

## Auth

`X-API-Key` header or OAuth token with `dashboard:write` scope. The caller
must be a member of `organization_id` and hold the
`organization.contribute_organization` permission; the product must be owned
by that organization.

## Flow

```
GET    /dashboard/api/v1/trade-items/{organization_id}/{gtin}/videos
POST   /dashboard/api/v1/trade-items/{organization_id}/{gtin}/videos
PATCH  /dashboard/api/v1/trade-items/{organization_id}/{gtin}/videos/{video_id}
DELETE /dashboard/api/v1/trade-items/{organization_id}/{gtin}/videos/{video_id}
```

* **List** — paginated, ordered by ascending `priority`, then most-recent.
* **Add** — the URL must be a form a video id can be parsed from (`watch`,
  `youtu.be`, or `embed` links); other URLs are rejected with `422`.
* **Update / Delete** — edit or remove a single row by id; `video_id` must
  belong to the targeted product.

Returns `201` on add, `403` for a caller without the contribute permission,
`404` for a GTIN/video not owned by `organization_id`, `422` for an
unparsable URL.

## Notes

Writes go through an audited `@org_action` service — the direct
`form.save()` this dashboard page used before C-4070 is gone.
