Skip to content

Update an existing content post

Request

Update an existing content record. Content can be updated in any state, but some states have different validations. Any or all of the content attributes can be provided and only those provided will be updated.

This endpoint cannot be used to change content type, state, or topics. If author.user_id is provided, it will be used to determine display_name and avatar_url, overriding any values provided for display_name and avatar_url.

To change the state (i.e. publish a draft) see Publish an existing content post.
Response body data will be the updated record.

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

Attributes of the content to update.

titleany

A title for the post

Example:"Example Post Title"
bodyany

The body text for the post. HTML is permitted.

Example:"Example post body"
summaryany

Post summary blurb

Example:"Example post summary"
authorobject(Content.Post.Resource.author)
featuredboolean

Whether the post is featured.

Example:true
featured_labelstring

The featured label.

Example:"A Label"
visibilitystring

An indication of the native availability of the post within the Firstup platform. If 'public', the post has a public_link_url and shares of the post should use that url as the canonical url. If 'private', the post requires user authentication to view.

Default:"private"
Enum:"private""public"
targetedboolean

Works with groups: true limits visibility to listed audiences; false uses audiences for delivery only.

Example:true
groupsArray of strings

A non-empty list of audiences this post targets. Required to enable targeting; if empty or omitted, targeting will not be applied.

Example:
[ "group1", "group2" ]
sourceobject
templateobject
imagesArray of objects(Content.Creation.Images)

An ordered list of images for this content.

Images are only validated for content of "image" type. There is a limit of ten images.

Note: The content returned immediately after content creation or modification contains will not contain the final image URIs due to additional post-processing

curl -i -X PUT \
  'https://partner.socialchorus.com/v2/content/{content_id}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "Example Post Title",
    "body": "Example post body",
    "summary": "Example post summary",
    "author": {
      "avatar_url": "https://example.com/avatar.png",
      "display_name": "Some User",
      "user_id": 123
    },
    "featured": true,
    "featured_label": "A Label",
    "visibility": "private",
    "targeted": true,
    "groups": [
      "group1",
      "group2"
    ],
    "source": {
      "post_id": "abc123",
      "posted_at": "2000-01-01T00:00:00Z"
    },
    "template": {
      "id": 234
    },
    "images": [
      {
        "image_url": "https://image.site.com/an_image.png"
      }
    ],
    "link_url": "https://google.com"
  }'

Responses

Content Updated

Bodyapplication/json
dataArray of objects(Content.Post.Resource)
Response
{ "data": [ {} ] }