{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"You can update a news item.\n\nYou can also send this request with `PATCH`; it behaves the same as `PUT`.\n\n`title`, `body`, `state`, `deliver_silently` and `cover_image_url` keep their current values when you leave them out. `labels` and `newsfeed_assignments` do not: leaving either out clears it, so send the full list on every update. Leaving `reactions` out disables reactions, although the list in the response does not change.\n\nRequires the `read_write_news_scope` OAuth scope.\n","properties":{"headers":{"type":"object","properties":{"Intercom-Version":{"$ref":"#/definitions/intercom_version","enum":["2.17"]}},"required":[],"additionalProperties":false},"path":{"type":"object","properties":{"news_item_id":{"type":"integer","examples":[123],"description":"The unique identifier for the news item which is given by Intercom."}},"required":["news_item_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/update_news_item_request","examples":[{"title":"Christmas is here!","body":"<p>New gifts in store for the jolly season</p>","sender_id":991267845,"reactions":["\uD83D\uDE1D","\uD83D\uDE02"]}]}},"required":["path"],"additionalProperties":false,"definitions":{"intercom_version":{"description":"Intercom API version.</br>If you omit the header, the API uses the version set in your app package, and 1.0 if none is set.","type":"string","enum":["1.0","1.1","1.2","1.3","1.4","2.0","2.1","2.2","2.3","2.4","2.5","2.6","2.7","2.8","2.9","2.10","2.11","2.12","2.13","2.14","2.15","2.16","2.17"],"examples":["2.17"]},"update_news_item_request":{"description":"The body of a request that updates an existing news item. Leaving `labels` or `newsfeed_assignments` out clears them, and leaving `reactions` out disables reactions; every other optional field keeps its current value when left out.","type":"object","title":"Update News Item Request","properties":{"title":{"type":"string","description":"The title of the news item.","examples":["Halloween is here!"]},"body":{"type":"string","description":"The news item body, which may contain HTML.","examples":["<p>New costumes in store for this spooky season</p>"]},"sender_id":{"type":"integer","description":"The id of the sender of the news item. Must be a teammate on the workspace.","examples":[123]},"state":{"type":"string","description":"News items will not be visible to your users in the assigned newsfeeds until they are set live.","enum":["draft","live"],"examples":["live"]},"deliver_silently":{"type":"boolean","description":"When set to `true`, the news item will appear in the messenger newsfeed without showing a notification badge.","examples":[true]},"labels":{"type":"array","description":"Label names displayed to users to categorize the news item. Send the full list; the labels you leave out are removed.","items":{"type":"string"},"examples":[["Product","Update","New"]]},"cover_image_url":{"type":"string","format":"uri","description":"URL of the image to use as the cover. Must contain `.png` or `.jpg` in lower case, so `.jpeg` and `.PNG` are rejected. Intercom copies the image and serves it from its own signed URL.","examples":["https://example.com/cover.jpg"]},"reactions":{"type":"array","description":"Ordered list of emoji reactions to the news item. Send an empty list to disable reactions. Send at most five, each a single Unicode code point, so an emoji with a skin tone, a joiner sequence or a variation selector (such as ❤️) is rejected.","items":{"type":"string"},"examples":[["\uD83D\uDE06","\uD83D\uDE05"]]},"newsfeed_assignments":{"type":"array","description":"A list of newsfeed_assignments to assign to the specified newsfeed. Send the full list; the assignments you leave out are removed.","items":{"$ref":"#/definitions/newsfeed_assignment"}}},"required":["sender_id"]},"newsfeed_assignment":{"title":"Newsfeed Assignment","type":"object","description":"Assigns a news item to a newsfeed.","properties":{"newsfeed_id":{"type":"integer","description":"The unique identifier for the newsfeed which is given by Intercom.","examples":[198313]},"published_at":{"type":["integer","null"],"description":"Publish date of the news item on the newsfeed, use this field if you want to set a publish date in the past (e.g. when importing existing news items). On write, this field will be ignored if the news item state is \"draft\", and a date in the future is rejected with a `400`. Null while the news item isn't live.","examples":[1674917488]}}}}},"name":"Update a news item","id":"intercom.updatenewsitem","example":{"path":{"news_item_id":123}},"maxRequests":1,"summary":false}}