Must be exactly "scheduled_unpublishing".
"scheduled_unpublishing"
The future date for the unpublishing
"2025-02-10T11:03:42Z"
List of locales whose content will be unpublished, or nil if the whole record needs to be unpublished
Returns a resource object of type scheduled_unpublishing.
1POST https://site-api.datocms.com/items/:item_id/scheduled-unpublishing HTTP/1.12Authorization: Bearer YOUR-API-TOKEN3Accept: application/json4X-Api-Version: 35Content-Type: application/vnd.api+json6 7{8 "data": {9 "type": "scheduled_unpublishing",10 "attributes": {11 "unpublishing_scheduled_at": "2025-02-10T11:03:42Z"12 }13 }14}
1curl -g 'https://site-api.datocms.com/items/:item_id/scheduled-unpublishing' \2 -X POST \3 -H "Authorization: Bearer YOUR-API-TOKEN" \4 -H "Accept: application/json" \5 -H "X-Api-Version: 3" \6 -H "Content-Type: application/vnd.api+json" \7 --data-binary '{"data":{"type":"scheduled_unpublishing","attributes":{"unpublishing_scheduled_at":"2025-02-10T11:03:42Z"}}}'
1await fetch(2 "https://site-api.datocms.com/items/:item_id/scheduled-unpublishing",3 {4 method: "POST",5 headers: {6 Authorization: "Bearer YOUR-API-TOKEN",7 Accept: "application/json",8 "X-Api-Version": "3",9 "Content-Type": "application/vnd.api+json",10 },11 body: JSON.stringify({12 data: {13 type: "scheduled_unpublishing",14 attributes: { unpublishing_scheduled_at: "2025-02-10T11:03:42Z" },15 },16 }),17 },18);
1HTTP/1.1 200 OK2Content-Type: application/json3Cache-Control: cache-control: max-age=0, private, must-revalidate4X-RateLimit-Limit: 305X-RateLimit-Remaining: 286 7{8 "data": {9 "type": "scheduled_unpublishing",10 "id": "34",11 "attributes": {12 "unpublishing_scheduled_at": "2025-02-10T11:03:42Z",13 "content_in_locales": [14 "en"15 ]16 },17 "relationships": {18 "item": {19 "data": {20 "type": "item",21 "id": "hWl-mnkWRYmMCSTq4z_piQ"22 }23 }24 }25 },26 "included": [27 {28 "type": "item",29 "id": "hWl-mnkWRYmMCSTq4z_piQ",30 "relationships": {31 "item_type": {32 "data": {33 "type": "item_type",34 "id": "DxMaW10UQiCmZcuuA-IkkA"35 }36 }37 },38 "attributes": {39 "title": "My first blog post!",40 "content": "Lorem ipsum dolor sit amet...",41 "category": "24",42 "image": {43 "alt": "Alt text",44 "title": "Image title",45 "custom_data": {},46 "focal_point": null,47 "upload_id": "20042921"48 }49 },50 "meta": {51 "created_at": "2020-04-21T07:57:11.124Z",52 "updated_at": "2020-04-21T07:57:11.124Z",53 "published_at": "2020-04-21T07:57:11.124Z",54 "first_published_at": "2020-04-21T07:57:11.124Z",55 "publication_scheduled_at": "2020-04-21T07:57:11.124Z",56 "unpublishing_scheduled_at": "2020-04-21T07:57:11.124Z",57 "status": "published",58 "is_current_version_valid": true,59 "is_published_version_valid": true,60 "current_version": "4234",61 "stage": null62 }63 }64 ]65}