Documentation0 followers

We know how to have our cake and eat it too. Our docs are built using our app.

Authors

The authors entity is designed to be a pseudonym. Pseudonyms, also known as pen names or nom de plumes, have been used since antiquity to provide authors with anonymity or to create a distinct literary persona. The earliest known use of a pseudonym date as far back as ancient Greece. You can create as many authors as you like and attribute them to various posts across your blogs. You're free to create an author using your actual name or use a pseudonym of your choice.

Available Actions

Action Route Description
List GET /api/authors Get a list of all authors
Get GET /api/authors/{authorId} Retrieve details of a specific author
Create POST /api/authors Create a new author
Update PUT /api/authors/{authorId} Update an existing author's details
Delete DELETE /api/authors/{authorId} Delete a specific author

List Authors

Route: GET /api/authors

Returns a paginated list of all authors. No request parameters needed.

Example response:

{
  "current_page": 1,
  "data": [
    {
      "id": "99916745-06ce-45e3-a8d3-b920ae8d5060",
      "slug": "sample-slug",
      "name": "Dr. Sample",
      "email": "sample@blogpop.io",
      "bio": "A well written bio goes here",
      "avatar": "[some image url]",
      "created_at": "2023-07-04T19:10:18.000000Z",
      "updated_at": "2023-07-04T19:10:18.000000Z"
    }
  ],
  // Rest of the pagination metadata
}

Get an Author

Route: GET /api/authors/{authorId}

Retrieves the details of a specific author. Required path parameter: authorId

Example response:

{
  "id": "99916745-06ce-45e3-a8d3-b920ae8d5060",
  "slug": "sample-slug",
  "name": "Dr. Sample",
  "email": "sample@blogpop.io",
  "bio": "A well written bio goes here",
  "avatar": "[some image url]",
  "created_at": "2023-07-04T19:10:18.000000Z",
  "updated_at": "2023-07-04T19:10:18.000000Z"
}

Create an Author

Route: POST /api/authors

Creates a new author.

Request body:

{
  "slug": "string|required",
  "name": "string|required",
  "email": "string|optional",
  "bio": "string|optional",
  "avatar": "string|optional",
}

The response will be the same as the "Get an Author" action.

Update an Author

Route: PUT /api/authors/{authorId}

Updates an existing author's details. Required path parameter: authorId

Request body:

{
  "slug": "string|optional",
  "name": "string|optional",
  "email": "string|optional",
  "bio": "string|optional",
  "avatar": "string|optional",
}

The response will be the same as the "Get an Author" action.

Delete an Author

Route: DELETE /api/authors/{authorId}

Deletes a specific author. Required path parameter: authorId. There is no request body.

Example response:

{
  "message": "Delete successful."
}

Share post: