---
title: "Add the specified media resources to the media collection for the news story"
method: POST
path: "/batch/{batch_id}/news/{id}/media"
tags: ["news", "media"]
---

# Add the specified media resources to the media collection for the news story

`POST /batch/{batch_id}/news/{id}/media`

## Request

- Base URL: `https://submitapi.dvidshub.net`
- URL: `https://submitapi.dvidshub.net/batch/{batch_id}/news/{id}/media`
- Auth: OAuth 2
  - Authorization code: `https://api.dvidshub.net/auth/authorize`
  - Token URL: `https://api.dvidshub.net/auth/access_token` scopes: `basic`, `email`, `upload`
- TypeScript: <https://skmtc.dev/dvidshub/apis/dvids-content-submission-api/docs/batch/:batch_id/news/:id/media/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- object
  - `data` object[], required: A set of relationship data representing a media collection. You may submit up to 50 media assets associated with a single story.
    - `id` string, required
    - `type` 'audio' | 'photo' | 'graphic' | 'news' | 'video' | 'publication-issue', required
    - `meta` object, required
      - `is_primary` boolean: Set to true if this is the primary media item in the set. Only one item in the array may be marked as primary.

## Response `200`

The updated relationship data

- object
  - `data` object[], required: A set of relationship data representing a media collection. You may submit up to 50 media assets associated with a single story.
    - `id` string, required
    - `type` 'audio' | 'photo' | 'graphic' | 'news' | 'video' | 'publication-issue', required
    - `meta` object, required
      - `is_primary` boolean: Set to true if this is the primary media item in the set. Only one item in the array may be marked as primary.

## Other responses

- `400`: The request payload is not correctly formed.
- `403`: Access is denied to the requested resource.
- `404`: The object identified by path parameters does not exist.

---

[API](https://skmtc.dev/dvidshub/apis/dvids-content-submission-api.md) - [All operations](https://skmtc.dev/dvidshub/apis/dvids-content-submission-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dvidshub/apis/dvids-content-submission-api/revisions/921b385ab6b9?raw)
