API Reference

Authors

Author records, the byline on blog posts and other authored content.

Prefix /cdna-api/users ReferenceAuthor model GuideAuthors
Authors in Postman

List authors#

GET /cdna-api/users/authors

Lists authors. Without limit every match comes back. The example finds authors by part of their byline.

Access
Admin users and integrations, with an OAuth access token or an API key.
Model
Author, in the Reference

Parameters

propertiesquery
selector
The fields and relations to return, such as {id,displayName,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 compare totalCount with the unfiltered list's to confirm a filter applied.
orderByquery
string
field:ASC or field:DESC, comma-separated. Stored fields only.
limitquery
integer
Records per response. There is no default.
offsetquery
integer
Records to skip.

Example

List authors
GET /cdna-api/users/authors?%displayName=team&properties={id,displayName,slug} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "result": "success",
  "totalCount": 1,
  "data": [
    {
      "id": 3,
      "displayName": "bwired team",
      "slug": "bwired-team"
    }
  ]
}
Open in Postman docs Real response from this documentation site

Create an author#

POST /cdna-api/users/author

Creates an author.

Access
Admin users and integrations, with an OAuth access token or an API key.
Returns
The new author under data.author, and a message.

Parameters

displayNamebody
string
The byline.

Example

Create an author
POST /cdna-api/users/author HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "displayName": "Chief editor"
}

Edit an author#

PUT /cdna-api/users/author/{id}

Changes an author. Fields left out keep their values.

Access
Admin users and integrations, with an OAuth access token or an API key.
Returns
The saved author under data.author, and a message.

Parameters

idpathrequired
integer
The author id.
websitebody
string
A website link.
linkedinUrlbody
string
A LinkedIn link.

Example

Edit an author
PUT /cdna-api/users/author/4 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "website": "https://coredna.com/",
  "linkedinUrl": "https://www.linkedin.com/company/coredna/"
}

Show an author#

GET /cdna-api/users/author/{id}

Reads one author by its id.

Access
Admin users and integrations, with an OAuth access token or an API key.
Model
Author, in the Reference

Parameters

idpathrequired
integer
The author id.
propertiesquery
selector
The fields and relations to return, such as {id,displayName,slug}.

Example

Show an author
GET /cdna-api/users/author/3?properties={id,displayName,slug} HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Response 200 OK
{
  "result": "success",
  "data": {
    "id": 3,
    "displayName": "bwired team",
    "slug": "bwired-team"
  }
}
Open in Postman docs Real response from this documentation site

Delete an author#

DELETE /cdna-api/users/author/{id}

Deletes an author.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

idpathrequired
integer
The author id.

Example

Delete an author
DELETE /cdna-api/users/author/4 HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Check that an author slug is free#

POST /cdna-api/users/check-author-slug

Answers {"result":"success"} when no author uses the slug. A slug in use, or one with characters a slug cannot have, answers HTTP 200 too, with "result": "error" and a message.

Access
Admin users and integrations, with an OAuth access token or an API key.

Parameters

slugbodyrequired
string
The slug to check.
idbody
integer
A record to leave out of the check, when renaming it.
sitebody
integer
The site to check in.

Example

Check that an author slug is free
POST /cdna-api/users/check-author-slug HTTP/1.1
Host: hub.coredna.com
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
Content-Type: application/json

{
  "slug": "api-sandbox-author"
}
Response 200 OKFree
{
  "result": "success"
}
Real response from this documentation site