# How author IDs are generated

Source: https://dev.arcxp.com/author-service/developer-docs/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 pass 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](https://dev.arcxp.com/author-service/developer-docs/how-to-display-stories-by-a-given-author-accounting-for-name-changes).

> **Note:**
> 
> You can create a maximum of 50,000 authors in Author Service.

# Using the UI

![Author UI](https://dev.arcxp.com/_astro/author-ui.DQDIdUf2_1J4fUX.webp)

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 being 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](https://dev.arcxp.com/_astro/warning-message.BDCxJb8i_Z2nnRtn.webp)

# 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](https://dev.arcxp.com/_astro/api-body.C_xKeCVp_1jd5iD.webp)

**Example of `_id` pre-filled:**

![API Body2](https://dev.arcxp.com/_astro/api-body2.DNvcfhqB_Z1MK4g5.webp)
