A custom entity type is a definition with its own layout; its records are content of that type. Every type answers on the same routes with its identifier in the path: the singular identifier for one record, the plural for a list.
API ReferenceContent
Custom Entities
Records of any custom entity type, addressed by the type’s identifier in the path, with their revisions and bulk changes.
About custom entities
Records keep their content in revisions. An edit makes one that is not live; a second request makes it live.
Revisions, publishing and approvalRecords can nest under a parent record when the definition allows it.
Custom entitiesThe bulk route changes published for many records at once, and nothing else.
List records#
/cdna-api/custom-entities/{pluralIdentifier}
Lists the records of one type, addressed by its plural identifier. The singular identifier answers a count with no rows.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Record, in the Reference
Parameters
pluralIdentifierpathrequired- string
- The type’s plural identifier, such as
apiSandboxes. The singular returns a count and no rows. propertiesquery- selector
- The fields and relations to return, such as
{id,slug}. filtersquery- name=value
- Any stored field, or a relation with a dot, such as
parent.id=12. Prefix the name with!,>,<,%or|. Use stored field names exactly as in the model, and comparetotalCountwith the unfiltered list's to confirm a filter applied. orderByquery- string
field:ASCorfield:DESC, comma-separated. Stored fields only.limitquery- integer
- Records per response. There is no default.
offsetquery- integer
- Records to skip.
retrieveUnpublishedquery- 1
- Include unpublished records.
Example
GET /cdna-api/custom-entities/apiSandboxes?limit=2&properties={id,slug} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"totalCount": 1,
"data": [
{
"id": 2,
"slug": "sandbox-record-one"
}
]
}Show a record#
/cdna-api/custom-entities/{identifier}/{id}
Reads one record, addressed by the type’s singular identifier and the record id.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Record, in the Reference
Parameters
identifierpathrequired- string
- The type’s singular identifier, such as
apiSandbox. The plural is a 404 here. idpathrequired- integer
- The record id.
propertiesquery- selector
- The fields and relations to return, such as
{id,slug}.
Example
GET /cdna-api/custom-entities/apiSandbox/2?properties={id,slug} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"data": {
"id": 2,
"slug": "sandbox-record-one"
}
}Create a record#
/cdna-api/custom-entities/{definition.identifier}
Creates a record.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
definition.identifierpathrequired- string
- The type’s singular identifier. The plural is a 404 here.
namebody- string
- The name.
areasContentbody- object
- Area values by name.
relatedRecordsbody- object
- Related records, by id.
Example
POST /cdna-api/custom-entities/event HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"name": "Forever in Berlin",
"areasContent": {
"description": "An evening with Forever Green Socks at the Olympiastadion."
},
"relatedRecords": {
"location": 11,
"artists": [
17
]
}
}{
"result": "success",
"data": {
"id": 50,
"areasContent": {
"description": {
"id": 214665,
"type": "Richtext",
"category": "text",
"editor": "richtext",
"text": "Join us for an electrifying evening as the acclaimed alternative rock sensation, Forever Green Socks, takes the stage at…"
},
"date": {
"id": null,
"type": "Date",
"category": "text",
"editor": "date",
"content": null
},
"doors": {
"id": null,
"type": "Text",
"category": "text",
"editor": "text",
"content": null
}
}
},
"message": "The Record has been added successfully."
}Edit a record#
/cdna-api/custom-entities/{definition.identifier}/{id}
Changes a record. Fields left out keep their values.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
definition.identifierpathrequired- string
- The type’s singular identifier. The plural is a 404 here.
idpathrequired- integer
- The record id.
namebody- string
- The name.
areasContentbody- object
- Area values by name.
relatedRecordsbody- object
- Related records, by id.
An edit makes a new revision that is not live unless "activeRevision": true is sent inside patchRevision or revisions. At the top level of the body activeRevision takes a revision id, and true there is a 422. To change one area and keep the rest, send patchRevision with originRevision and areaContent(name); a top-level areaContent(name) answers success and changes nothing.
Example
PUT /cdna-api/custom-entities/event/19 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"name": "Forever Green Socks in Berlin",
"areasContent": {
"description": "An evening with Forever Green Socks at the Olympiastadion.",
"doors": "19:00"
},
"relatedRecords": {
"location": 11,
"artists": [
17
]
}
}{
"result": "success",
"data": {
"record": {
"name": "Forever Green Socks in Berlin",
"layout": 131,
"originalPath": "/event/forever-in-berlin",
"fullSlug": "forever-in-berlin",
"fullPath": "/event/forever-in-berlin",
"url": "//www.example.com/event/forever-in-berlin",
"id": 19,
"slug": "forever-in-berlin",
"position": null,
"created": "2024-02-06T15:35:42+00:00"
}
},
"message": "The Record has been saved successfully."
}Learn more
Delete a record#
/cdna-api/custom-entities/{definition.identifier}/{id}
Deletes a record.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
definition.identifierpathrequired- string
- The type’s singular identifier. The plural is a 404 here.
idpathrequired- integer
- The record id.
Example
DELETE /cdna-api/custom-entities/event/51 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"data": {
"record": {
"name": "Forever in Berlin",
"layout": 131,
"originalPath": "/event/forever-in-berlin-1",
"fullSlug": "forever-in-berlin-1",
"fullPath": "/event/forever-in-berlin-1",
"url": "//www.example.com/event/forever-in-berlin-1",
"id": 51,
"slug": "forever-in-berlin-1",
"position": null,
"created": "2024-02-12T15:44:30+00:00"
}
},
"message": "The Record has been successfully deleted."
}List custom entity types#
/cdna-api/custom-entities/definitions
Lists custom entity types. Without limit every match comes back.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Definition, in the Reference
Parameters
propertiesquery- selector
- The fields and relations to return, such as
{id,name,identifier,pluralIdentifier}. filtersquery- name=value
- Any stored field, or a relation with a dot, such as
parent.id=12. Prefix the name with!,>,<,%or|. Use stored field names exactly as in the model, and comparetotalCountwith the unfiltered list's to confirm a filter applied. orderByquery- string
field:ASCorfield:DESC, comma-separated. Stored fields only.limitquery- integer
- Records per response. There is no default.
offsetquery- integer
- Records to skip.
retrieveUnpublishedquery- 1
- Include unpublished records.
Example
GET /cdna-api/custom-entities/definitions?limit=2&properties={id,name,identifier,pluralIdentifier} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"totalCount": 1,
"data": [
{
"id": 2,
"name": "API sandbox",
"identifier": "apiSandbox",
"pluralIdentifier": "apiSandboxes"
}
]
}Show a custom entity type#
/cdna-api/custom-entities/definition/{id}
Reads one custom entity type by its id.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
- Model
- Definition, in the Reference
Parameters
idpathrequired- integer
- The custom entity type id.
propertiesquery- selector
- The fields and relations to return, such as
{id,name,identifier,pluralIdentifier}.
Example
GET /cdna-api/custom-entities/definition/2?properties={id,name,identifier,pluralIdentifier} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"data": {
"id": 2,
"name": "API sandbox",
"identifier": "apiSandbox",
"pluralIdentifier": "apiSandboxes"
}
}Create a custom entity type#
/cdna-api/custom-entities/definition
Creates a custom entity type: its name, singular and plural identifiers, and layout.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
namebody- string
- The name.
identifierbody- string
- The identifier: unique, and used in routes and templates.
iconbody- string
- The admin icon class, such as
fa-calendar. pathbody- string
- The path segment of the type’s listing.
recordPathbody- string
- The path pattern of one record.
sitedbody- boolean
- Whether records belong to one site.
urlAddressablebody- boolean
- Whether records have their own URL.
seoSettingsEnabledbody- boolean
- Whether records have SEO settings.
publishablebody- boolean
- Whether records can be published and unpublished.
positionedbody- boolean
- Whether records have a position among their siblings.
categorizablebody- boolean
- Whether records take categories.
taggablebody- boolean
- Whether records take tags.
Example
POST /cdna-api/custom-entities/definition HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"name": "Event",
"identifier": "event",
"icon": "fa-calendar",
"path": "events",
"recordPath": "event",
"sited": true,
"urlAddressable": true,
"seoSettingsEnabled": true,
"publishable": true,
"positioned": false,
"categorizable": false,
"taggable": false
}Edit a custom entity type#
/cdna-api/custom-entities/definition/{id}
Changes a custom entity type. Types are not versioned: the change applies at once.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The custom entity type id.
namebody- string
- The name.
identifierbody- string
- The identifier: unique, and used in routes and templates.
iconbody- string
- The admin icon class, such as
fa-calendar. taggablebody- boolean
- Whether records take tags.
Example
PUT /cdna-api/custom-entities/definition/2 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"name": "Event",
"identifier": "event",
"icon": "fa-calendar",
"taggable": true
}Delete a custom entity type#
/cdna-api/custom-entities/definition/{id}
Deletes a custom entity type. A type that still has records is refused unless cascade=1 is sent, which deletes the records too.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The custom entity type id.
Example
DELETE /cdna-api/custom-entities/definition/2?cascade=1 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/jsonDuplicate a record#
/cdna-api/custom-entities/duplicate-record/{id}
Copies a record. The copy is unpublished.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
idpathrequired- integer
- The record id.
Example
POST /cdna-api/custom-entities/duplicate-record/2 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/jsonDelete several records#
/cdna-api/custom-entities/{definition.identifier}/records
Deletes several records of one type at once: their ids in ids.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
definition.identifierpathrequired- string
- The type’s singular identifier. The plural is a 404 here.
idsbody- list
- The ids of the records.
Example
DELETE /cdna-api/custom-entities/apiSandbox/records HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"ids": [
1,
2,
3
]
}Publish or unpublish several records#
/cdna-api/custom-entities/{definition.identifier}/records
Changes published on several records of one type at once. Any other field is refused with 400.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
definition.identifierpathrequired- string
- The type’s singular identifier. The plural is a 404 here.
idsbody- list
- The ids of the records.
publishedbody- string
truepublishes now, a future datetime schedules,falseornullunpublishes.
Example
PUT /cdna-api/custom-entities/apiSandbox/records HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"ids": [
1,
2,
3
],
"published": "2026-09-18 09:00:00"
}Make an earlier revision live#
/cdna-api/custom-entities/activate-revision/{record.id}/{revision.id}
Makes a revision of a record live, without making a new one. "activeRevision": <revision id> on the edit route does the same.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
record.idpathrequired- integer
- The record id.
revision.idpathrequired- integer
- The revision id.
Example
PUT /cdna-api/custom-entities/activate-revision/2/5 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json{
"result": "success",
"data": [],
"message": "The active revision has been set"
}Delete a revision#
/cdna-api/custom-entities/record-revision/{record.id}/{revision.id}
Deletes one revision of a record. The live revision cannot be deleted.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
record.idpathrequired- integer
- The record id.
revision.idpathrequired- integer
- The revision id.
Example
DELETE /cdna-api/custom-entities/record-revision/2/6 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/jsonCheck a slug#
/cdna-api/custom-entities/check-record-slug/{definition.id}
Checks whether a slug is free for a record of a type, under a parent when the type is hierarchical.
- Access
- Admin users and integrations, with an OAuth access token or an API key.
Parameters
definition.idpathrequired- integer
- The custom entity type id.
slugbody- string
- The path segment. Made from the name when left out.
parentbody- number
- The parent record, by id.
Example
POST /cdna-api/custom-entities/check-record-slug/2 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json
{
"slug": "forever-in-berlin",
"parent": 1
}