Authors
Using the /authors endpoint you can fetch the authors.
The author model
The author model contains all the information about your authors, such as their id, name, slug and description, and more. Here are the base properties:
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the article.
- Name
name
- Type
- string
- Description
The author name.
- Name
slug
- Type
- string
- Description
The article slug.
- Name
description
- Type
- object
- Description
The localized description, returned for each locale.
- Name
media
- Type
- object
- Description
The localized media, returned for each locale.
GET/v0/authors
List all authors
This endpoint allows you to retrieve a list of all your authors.
Optional attributes
- Name
localeCode
- Type
- string
- Description
The locale for which you want to fetch the author for.
Response Type (Typescript)
interface Author {
id: string
name: string
slug: string
description: {
[languageCode: string]: string
}
media: {
[languageCode: string]: Media
}
}
interface Media {
id: string
url: string
createdAt: string
updatedAt: string
}
Request
GET
/v0/:blogId/authorscurl -G https://api.vaporcms.com/v0/{blogId}/authors \
-H "Authorization: Bearer {token}" \
-d limit=10
Response
[
{
"id": "cm1uyaobf003hfe8jr9op2cep",
"name": "Eraldo Forgoli",
"slug": "eraldo-forgoli",
"description": {
"en": "I like writing content from time to time.",
"es": "Me gusta escribir contenido de vez en cuando.",
"ja": "時々コンテンツを書くのが好きです。",
"de": "Ich schreibe von Zeit zu Zeit gerne Inhalte."
},
"media": {
"en": {
"id": "cm1v0rrn8006zfe8jo1jq0pxt",
"url": "https://pub-3cc8205d6e8c4052925eca5aa4110239.r2.dev/aasdfsd2sdfasdf",
"createdAt": "2024-10-04T17:48:59.440Z",
"updatedAt": "2024-10-04T17:50:58.787Z"
},
"es": {
"id": "cm1v0rrnc0072fe8jd9vul379",
"url": "https://pub-3cc8205d6e8c4052925eca5aa4110239.r2.dev/aasdfsd2sdfasdfasdf",
"createdAt": "2024-10-04T17:48:59.440Z",
"updatedAt": "2024-10-04T17:50:58.787Z"
},
"ja": {
"id": "cm1v0rrnf0075fe8jxkwoqffm",
"url": "https://pub-3cc8205d6e8c4052925eca5aa4110239.r2.dev/aasdfsd2sdfasdfasdf",
"createdAt": "2024-10-04T17:48:59.440Z",
"updatedAt": "2024-10-04T17:50:58.787Z"
},
"de": {
"id": "cm1v0rrnj0078fe8jmup4vj1x",
"url": "https://pub-3cc8205d6e8c4052925eca5aa4110239.r2.dev/adsfasdfs23sd",
"createdAt": "2024-10-04T17:48:59.440Z",
"updatedAt": "2024-10-04T17:50:58.787Z"
}
}
}
]