Skip to contentDevelopersPrezly website
Galleries

Create Newsroom Gallery

Create a newsroom gallery from serialized gallery content.

Personal token scopes: sites:write. Your account must also have access to the requested data. Authentication

Choose image or video content deliberately. Gallery content has its own allowed nodes and serialization format.

Read the guide

POST
/newsrooms/{newsroom_id}/galleries

Supplied content replaces the whole gallery document. Gallery type cannot be changed. Responses serialize content in format 0.50, even when the input uses a newer supported document format.

Personal access tokens: sites:write. Every listed scope is required; the token owner's permissions, feature availability and newsroom access still apply.

Authorization

API_key
headerAuthorizationBearer <token>

Bearer authentication using an integration API key, or a personal access token only where the operation explicitly supports it. Every listed personal-token scope is required; owner permissions and newsroom access still apply.

Path Parameters

newsroom_id*string

Newsroom UUID or ID

Length1 <= length

Request Body

application/json
  1. body
name*string
description?string|null
content*|

Gallery document serialized as JSON, or a single json wrapper. Image galleries accept image blocks and video galleries accept video blocks. A parsed document and plain-text wrapper are not accepted.

status?string
Value in"private""public"
type?string

Immutable after creation.

Default"image"
Value in"image""video"

Response Body

Created

application/json
  1. response
gallery?
Example Request
curl -X POST 'https://api.prezly.com/v2/newsrooms/string/galleries' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "content": "string"}'
Example Response201
{  "gallery": {    "id": 0,    "uuid": "string",    "title": "string",    "status": "private",    "created_at": "string",    "updated_at": "string",    "uploadcare_group_uuid": "string",    "content": "string",    "images_number": 0,    "images": [      {        "id": 0,        "caption": "string",        "created_at": "string",        "updated_at": "string",        "uploadcare_image": {          "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",          "version": 0,          "filename": "string",          "mime_type": "string",          "size": 0,          "original_width": 0,          "original_height": 0,          "effects": [            "string"          ]        }      }    ],    "name": "string",    "thumbnail_image": "string",    "description": "string",    "url": "string",    "modified_at": "string",    "creator": {      "id": 0,      "email": "http://example.com",      "name": "string",      "display_name": "string",      "first_name": "string",      "last_name": "string",      "avatar_url": "http://example.com"    },    "type": "image",    "videos_number": 0,    "is_demo": true,    "size": 0  }}