Create or replace many records by externalId
const url = 'https://api.example.com/cms/data/matches/records/bulk?createMissingRefs=1';const options = { method: 'POST', headers: {'API-Key': '<API-Key>', 'Content-Type': 'application/json'}, body: '{"records":[{"externalId":"opta:m1","status":"draft","data":{"label":"Arsenal v Chelsea","home":{"externalId":"opta:t3"},"kickoff":"2026-11-20T20:00:00Z"}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://api.example.com/cms/data/matches/records/bulk?createMissingRefs=1' \ --header 'API-Key: <API-Key>' \ --header 'Content-Type: application/json' \ --data '{ "records": [ { "externalId": "opta:m1", "status": "draft", "data": { "label": "Arsenal v Chelsea", "home": { "externalId": "opta:t3" }, "kickoff": "2026-11-20T20:00:00Z" } } ] }'Up to 500 records, each with an externalId. Each succeeds or fails on its own (207 when some failed); a record can point to one earlier in the batch. Requires the “Structured data - Write records” permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Collection key
Example
matchesQuery Parameters
Section titled “Query Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
A record as it is written. In data, a reference to a record can be its id or {“externalId”: “…”}.
object
The connector’s own id (taken from the path on PUT …/external/{externalId})
Example
opta:m1Status (the collection’s default status when left out on create)
The field values, by field key. On PATCH, merged onto the stored values; null removes a value.
object
Example
{ "label": "Arsenal v Chelsea", "home": { "externalId": "opta:t3" }, "kickoff": "2026-11-20T20:00:00Z"}Responses
Section titled “Responses”All written
What a bulk upsert did, item by item. Each item succeeds or fails on its own.
object
Whether every item was written
object
Position in records
Record ID, when written
When failed
When failed: what is wrong, by field key
object
Example
{ "results": [ { "result": "created" } ]}Some failed
What a bulk upsert did, item by item. Each item succeeds or fails on its own.
object
Whether every item was written
object
Position in records
Record ID, when written
When failed
When failed: what is wrong, by field key
object
Example
{ "results": [ { "result": "created" } ]}Not {“records”: […]}, or more than 500
Needs an API key linked to a CMS user with the Structured data permission
No such collection or record