Skip to content

Add a video for use in content of type article

Request

Add a new video to a content record. Response body is the attributes of the video record. Insert the returned embed_html into the body of the article at the location you want the video to appear in the article.

Security
oauth2_as_a_user(Required scopes: content.write) or oauth2_as_a_server(Required scopes: content.write)
Path
content_idintegerrequired

ID or UUID of the content post

Bodyapplication/json
video_urlstringrequired

URL of the video to add.

Example:"https://some.video.url"
captionstring

Video caption

Example:"Watch out!"
preview_image_urlstring

Video preview image URL

Example:"https://preview_image.video.url"
curl -i -X PUT \
  'https://partner.socialchorus.com/v2/content/{content_id}/videos' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "video_url": "https://some.video.url",
    "caption": "Watch out!",
    "preview_image_url": "https://preview_image.video.url"
  }'

Responses

Content Video Added

Bodyapplication/json
dataobject(Content.Video.Resource)required
Response
{ "data": { "id": 0, "uuid": "205ba32a-7f12-439d-b33d-df1c611c8e9c", "caption": "Example video caption", "source": "socialchorus", "state": "completed", "duration": 30, "preview_image_url": "string", "embed_html": "<iframe href='https://onfirstup.com/acme/acmetimes/sc4#contents/456/videos/abc123'></iframe>\n", "link_url": "https://onfirstup.com/acme/acmetimes/sc4#contents/456/videos/abc123", "created_at": "2000-01-01T00:00:00Z" } }