> For the complete documentation index, see [llms.txt](https://docs.umbraco.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.umbraco.com/umbraco-cms/extend-your-project/tutorials/creating-a-backoffice-api/umbraco-schema-and-operation-ids.md).

# Umbraco Schema and Operation IDs

Umbraco's Management API uses custom naming conventions for its OpenAPI schema and operation IDs.

These conventions are opt-in to avoid affecting custom APIs by default. This article shows how to opt in.

{% hint style="info" %}
If you're happy with the default schema and operation IDs, you don't need the Umbraco conventions.
{% endhint %}

{% hint style="info" %}
If you register your OpenAPI document using `AddBackOfficeOpenApiDocument`, Umbraco's schema conventions are applied for you. The examples below show how to opt in manually when registering without the builder.
{% endhint %}

## Schema IDs

Schema IDs are configured using the `CreateSchemaReferenceId` property when adding your OpenAPI document. You can use the `UmbracoSchemaIdGenerator.Generate()` method to generate schema IDs following Umbraco's naming conventions:

{% code title="MyItemApiComposer.cs" %}

```csharp
using Microsoft.AspNetCore.OpenApi;
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Cms.Core.Composing;

public class MyItemApiComposer : IComposer
{
    public void Compose(IUmbracoBuilder builder)
    {
        builder.Services.AddOpenApi("my-item-api", options =>
        {
            // ...other configuration

            options.CreateSchemaReferenceId = jsonTypeInfo =>
            {
                // Inline primitives and other types the default generator skips
                var defaultId = OpenApiOptions.CreateDefaultSchemaReferenceId(jsonTypeInfo);
                if (defaultId is null)
                {
                    return null;
                }

                return UmbracoSchemaIdGenerator.Generate(jsonTypeInfo.Type);
            };
        });
    }
}
```

{% endcode %}

## Operation IDs

Operation IDs are configured using operation transformers. You can use the `UmbracoOperationIdTransformer` to generate operation IDs following Umbraco's naming conventions:

{% code title="MyItemApiComposer.cs" %}

```csharp
using Umbraco.Cms.Api.Common.OpenApi;
using Umbraco.Cms.Core.Composing;

public class MyItemApiComposer : IComposer
{
    public void Compose(IUmbracoBuilder builder)
    {
        builder.Services.AddOpenApi("my-item-api", options =>
        {
            // ...other configuration

            options.AddOperationTransformer<UmbracoOperationIdTransformer>();
        });
    }
}
```

{% endcode %}

If you need more control, you can create a custom operation transformer. See the [Operation IDs](/umbraco-cms/extend-your-project/server-side-extensions/api-versioning-and-openapi.md#operation-ids) section for an example.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.umbraco.com/umbraco-cms/extend-your-project/tutorials/creating-a-backoffice-api/umbraco-schema-and-operation-ids.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
