Validates an existing record field
Please note that this API method is marked as unstable and should be avoided in production environments. Changes may occur at any time without warning, potentially impacting your scripts. We recommend contacting our Support Team to explore alternative approaches that are safer and more reliable!
Body parameters
RFC 4122 UUID of record expressed in URL-safe base64 format
"hWl-mnkWRYmMCSTq4z_piQ"
Must be exactly "item".
The entity (account/collaborator/access token/sso user) who created the record
Examples
POST https://site-api.datocms.com/items/:item_id/validate HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3Content-Type: application/vnd.api+json
{ "data": { "id": "hWl-mnkWRYmMCSTq4z_piQ", "type": "item", "attributes": { "title": "My first blog post!", "content": "Lorem ipsum dolor sit amet...", "category": "24", "image": { "upload_id": "WxrWMPl3TjeSJYcl6lNCbg", "alt": "Alt text", "title": "Image title", "custom_data": {} } } }}curl -g 'https://site-api.datocms.com/items/:item_id/validate' \ -X POST \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3" \ -H "Content-Type: application/vnd.api+json" \ --data-binary '{"data":{"id":"hWl-mnkWRYmMCSTq4z_piQ","type":"item","attributes":{"title":"My first blog post!","content":"Lorem ipsum dolor sit amet...","category":"24","image":{"upload_id":"WxrWMPl3TjeSJYcl6lNCbg","alt":"Alt text","title":"Image title","custom_data":{}}}}}'await fetch("https://site-api.datocms.com/items/:item_id/validate", { method: "POST", headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", "Content-Type": "application/vnd.api+json", }, body: JSON.stringify({ data: { id: "hWl-mnkWRYmMCSTq4z_piQ", type: "item", attributes: { title: "My first blog post!", content: "Lorem ipsum dolor sit amet...", category: "24", image: { upload_id: "WxrWMPl3TjeSJYcl6lNCbg", alt: "Alt text", title: "Image title", custom_data: {}, }, }, }, }),});