Product Updates

DatoCMS changelog for new features and general improvements
Content Management API

Assign a creator at item creation via API

April 28th, 2023

Since today it's possible to assign a creator when an item is created via API. The creator can be anyone that belongs to the site or the organization. The call must be made using a token with permission to edit the creator.

API users can assign the creator by declaring the type and the ID of the desired creator in the relationship field of the creation request:

POST https://site-api.datocms.com/items HTTP/1.1
X-Api-Version: 3
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
Content-Type: application/vnd.api+json
{
"data": {
"type": "item",
"attributes": { [...] }
},
"meta": { [...] },
"relationships": {
"item_type": {
"data": {
"type": "item_type",
"id": "44"
}
},
"creator": {
"data": {
"type": "account",
"id": "312"
}
}
}
}
}
Start using DatoCMS today
According to Gartner 89% of companies plan to compete primarily on the basis of customer experience this year. Don't get caught unprepared.
  • No credit card
  • Easy setup
Subscribe to our newsletter! 📥
One update per month. All the latest news and sneak peeks directly in your inbox.
support@datocms.com ©2024 Dato srl, all rights reserved P.IVA 06969620480