Skip to content
Product Documentation

How author IDs are generated

You can generate authors through the UI or programmatically through the API. When creating a new profile in Author Service UI, the Username field becomes the _id. But when using the endpoint API, you can parse a personalized _id in the request. It is important to keep in mind that the _id field is not editable after it is established. If an author goes through a name change, the _id variable remains the same.

In contrast to the ID, the Slug field is editable and is not required when creating an author. The slug is a shortcut for how the author’s name can appear in the URL. You can edit the slug at any time, like when an author changes their name.

For that reason, some organizations prefer to expose slug in URLs, so that the author’s bio page URL can change if their name changes. But _id is safer for querying the Content API, because if a query was built using the slug, and the slug changes, then the query doesn’t find content anymore. Instead, if you use the _id for querying, the query works before and after an author changes their name. You can read more in this article, How To Display Stories By A Given Author, Accounting For Name Changes.

Using the UI

Author UI

In this example author, the username (_id) was created when the author created their name profile. If the _id is set up using the UI, it is required to be input before saved or the data will not be stored. There will be a warning message in a red box advising the Author cannot be saved because not all required fields were filled.

Warning Message

Using the API

When using the API call, the _id is autogenerated in case the string is empty. Or it can be pre-filled with the author’s preference.

Example of empty _id:

API Body

Example of _id pre-filled:

API Body2