Docs
/
/

Preference categories mAPI reference

Complete reference documentation for the Preference categories resource.

Preference categories

#

Preference categories are named groupings in your project's catalog that you can use to organize preferences. Preference categories are project-scoped and are not tied to an environment.

List preference categories

#

Returns all preference categories in the project's catalog, ordered by name. Preference categories are project-scoped and not tied to an environment.

Endpoint

GET/v1/preference_categories

Returns

PreferenceCategoriesResponse

A list of preference categories in the project's catalog.

Preference categories, ordered by name.

archived_at
string(date-time)

The timestamp of when the preference category was archived.

created_at
string(date-time)
Required

The timestamp of when the preference category was created.

name
string
Required

The unique name of the preference category within a project.

updated_at
string(date-time)
Required

The timestamp of when the preference category was last updated.

Delete a preference category

#

Archives a preference category by name.

Endpoint

DELETE/v1/preference_categories/{name}

Path parameters

name
string

The name of the preference category to delete.

Returns

204 No Content

Upsert a preference category

#

Creates a preference category by name. If a non-archived category with the same name already exists, returns the existing category.

Endpoint

PUT/v1/preference_categories/{name}

Path parameters

name
string

The name of the preference category to upsert.

Returns

WrappedPreferenceCategoryResponse

Wraps the PreferenceCategory response under the preference_category key.

preference_category

A named preference category in a project's catalog.

archived_at
string(date-time)

The timestamp of when the preference category was archived.

created_at
string(date-time)

The timestamp of when the preference category was created.

name
string

The unique name of the preference category within a project.

updated_at
string(date-time)

The timestamp of when the preference category was last updated.

PreferenceCategory

#

A named preference category in a project's catalog.

Attributes

archived_at
string(date-time)

The timestamp of when the preference category was archived.

created_at
string(date-time)

The timestamp of when the preference category was created.

name
string

The unique name of the preference category within a project.

updated_at
string(date-time)

The timestamp of when the preference category was last updated.

New chat