---
title: "Add Attribute to Schema"
method: POST
path: "/v1/schema-attributes"
tags: ["Object Attribute Management"]
---

# Add Attribute to Schema

`POST /v1/schema-attributes`

Use this API to add an attribute to a specific schema.

> 🗒 Things to Know
> 
> - This API only supports objects created via Object Manager, including Projects, Models, and Datasets.

## Query parameters

- `schemaName` string, required — Name of the schema to add attribute to

## Request body

- AttributeCreateRequest
  - `fieldName` string, required — Field name used to uniquely identify the attribute
  - `name` string, required — Attribute name
  - `nameKey` string — Attribute name key used for translation
  - `description` string — Attribute description
  - `descriptionKey` string — Attribute description key used for translation
  - `required` boolean — Indicates if this attribute is required
  - `allowOther` boolean — Indicates if user-specified values are allowed
  - `responseType` 'Text' | 'SingleSelect' | 'MultiSelect' | 'Date' | 'Formula' | 'Score' | 'Level' | 'Range', required — Response type for the attribute
  - `optionType` 'None' | 'Static' | 'Dynamic' — Source for attribute options
  - `options` AttributeOptionRequest[] — List of options for the attribute (applicable for SingleSelect and MultiSelect)
    - `option` string, required — The option text to be displayed
    - `optionKey` string — Option key which can be used for translation and internationalization
    - `optionSelectionValue` string — Option selection value used to identify the option in forms or programmatic interfaces
    - `colorCode` '#000000' | '#FFFFFF' | '#FF0000' | '#00FF00' | '#0000FF' — Color code in hexadecimal format for UI representation
    - `metadata` AttributeOptionMetadata
      - `hint` string — The associated option hint.
      - `hintKey` string — The associated option hint key.
  - `referenceCategoryIds` string[] — List of category IDs associated with the attribute
  - `formula` string — Formula expression for calculated attributes
  - `context` AttributeContext
    - `parameters` object
  - `source` string — Source of the attribute
  - `responseSubType` 'STANDARD' | 'FORMULA' | 'MATRIX' — Response sub type for the attribute
  - `associatedAttributeRequest` AssociatedAttributeRequest
    - `associatedAttributes` AssociatedAttribute[] — Associated attributes
      - `fieldName` string — Field Name
      - `name` string, required — Attribute Name
      - `nameKey` string — Attribute Name Key. Used for Translation
      - `description` string — Attribute Description
      - `descriptionKey` string — Attribute Description Key
      - `options` AttributeOptionRequest[] — Attribute Options
        - `option` string, required — The option text to be displayed
        - `optionKey` string — Option key which can be used for translation and internationalization
        - `optionSelectionValue` string — Option selection value used to identify the option in forms or programmatic interfaces
        - `colorCode` '#000000' | '#FFFFFF' | '#FF0000' | '#00FF00' | '#0000FF' — Color code in hexadecimal format for UI representation
        - `metadata` AttributeOptionMetadata
          - `hint` string — The associated option hint.
          - `hintKey` string — The associated option hint key.
  - `maxMultiSelectAllowedOptionValues` integer — Maximum number of option values allowed for MultiSelect attributes
  - `encrypted` boolean — Indicates if this attribute should be encrypted
  - `metadata` string — Metadata about the attribute in JSON format
  - `intakeQuestion` IntakeQuestion
    - `nameKey` string — The question name key for schema.
    - `name` string — The question name for schema.
    - `descriptionKey` string — The question description key for schema.
    - `description` string — The question description for schema.
  - `validationRuleId` string — ID of the validation rule to associate with the attribute
  - `abacBasicAssignmentInfo` AbacBasicAssignmentInfo[] — GUID, name and the objectType of the linked assignment
    - `assignmentId` string, uuid — GUID of the linked assignment
    - `assignmentName` string — Name of the linked assignment
    - `policyStatus` 'INACTIVE' | 'ACTIVE' | 'PROCESSING' | 'FAILED' — Policy status of the linked assignment

## Response `201`

Created

- AttributeInformation
  - `id` string, uuid — The unique identifier of the schema attribute.
  - `name` string, required — The name of the schema attribute.
  - `nameKey` string — The translation key for schema attribute.
  - `description` string — The description of the schema attribute.
  - `descriptionKey` string — The translation key for schema description.
  - `fieldName` string, required — The field name of the schema attribute.
  - `mappedFieldName` string — The mapped field name for schema sorting.
  - `enabled` boolean, required — The enabled flag for schema attribute.
  - `required` boolean — The required flag for schema attribute.
  - `readOnly` boolean — The read-only flag for schema attribute.
  - `encrypted` boolean — The encryption flag for schema attribute.
  - `allowOther` boolean — The user-defined options flag for schema.
  - `baseAttribute` boolean — The core entity flag for schema attribute.
  - `responseType` 'Text' | 'SingleSelect' | 'MultiSelect' | 'Date' | 'Formula' | 'Score' | 'Level' | 'Range' — The response type for schema attribute.
  - `formula` string — The formula for schema attribute.
  - `optionType` 'None' | 'Static' | 'Dynamic' — The option source type for schema.
  - `optionAllowed` boolean — The options allowed flag for schema.
  - `schemaId` string, uuid — The schema identifier for attribute.
  - `schemaName` string — The schema name for attribute.
  - `options` AttributeOptionInformation[] — The options collection for schema attribute.
    - `id` string, uuid — Option GUID
    - `option` string, required — Option name
    - `optionKey` string — Option Key which can be used for translation
    - `colorCode` string — Color code for the option
    - `sequence` integer — Option sequence for ordering
    - `enabled` boolean — Indicates if the option is enabled or disabled
    - `metadata` AttributeOptionMetadata
      - `hint` string — The associated option hint.
      - `hintKey` string — The associated option hint key.
  - `referenceCategories` CategoryInformation[] — The reference categories for schema.
    - `id` string, uuid — Category unique identifier
    - `name` string — Category name
    - `nameKey` string — Category nameKey for localization support
  - `responseMaxLength` integer — The max response length for schema.
  - `responseSubType` 'STANDARD' | 'FORMULA' | 'MATRIX' — The response subtype for schema.
  - `associatedAttributeInformation` AssociatedAttributeInformation[] — The associated attributes for schema.
    - `id` string, uuid, required — Associated Attribute GUID
    - `name` string — Name
    - `nameKey` string — Name key
    - `description` string — Description
    - `descriptionKey` string — Description Key
    - `schemaId` string, uuid — Attribute Schema GUID
    - `schemaName` string — Attribute Schema Name
    - `fieldName` string, required — Attribute field name
    - `mappedFieldName` string — Mapped Attribute field name. Should be used for sorting
    - `enabled` boolean, required — Indicator for attribute enabled/disabled
    - `responseType` 'Text' | 'SingleSelect' | 'MultiSelect' | 'Date' | 'DateTime' | 'NumericalText' | 'NumericalSingleSelect' | 'RadioButton' | 'TextArea' | 'Formula' | 'Level' | 'Range' | 'Score' | 'System', required — Response Type
    - `responseSubType` 'Standard' | 'Formula' | 'Matrix' | 'RollUp' — Response sub type
    - `formula` string — Formula for attribute
    - `options` AttributeOptionInformation[] — Attribute options
      - `id` string, uuid — Option GUID
      - `option` string, required — Option name
      - `optionKey` string — Option Key which can be used for translation
      - `colorCode` string — Color code for the option
      - `sequence` integer — Option sequence for ordering
      - `enabled` boolean — Indicates if the option is enabled or disabled
      - `metadata` AttributeOptionMetadata
        - `hint` string — The associated option hint.
        - `hintKey` string — The associated option hint key.
    - `optionsByDomain` object — Override options by Domain
  - `multiSelectMaxOptionValues` integer — The maximum multi-select options for schema.
  - `hidden` boolean — The hidden flag for schema attribute.
  - `optionUrl` string — The option URL for schema attribute.
  - `intakeQuestion` IntakeQuestion
    - `nameKey` string — The question name key for schema.
    - `name` string — The question name for schema.
    - `descriptionKey` string — The question description key for schema.
    - `description` string — The question description for schema.
  - `deleteMarker` 'MARKED_FOR_DELETE' | 'DELETING' | 'DELETED' — The deletion marker for schema attribute.
  - `optionMetadata` AttributeOptionMetadataInformation
    - `entityTypeName` string — The entity type for schema options.
    - `basicServiceContextPath` string — The service path for schema options.
    - `optionUrl` string — The option URL for schema options.
    - `optionListUrl` string — Api URL for the Drop Down Api. Complete List of entities
    - `viewType` string — The view type for schema options.
    - `optionType` string — Option Type
    - `permissions` string[] — Permissions
    - `applicationUrl` string — Application Url
  - `validationRuleId` string — The validation rule for schema attribute.
  - `abacBasicAssignmentInfo` AbacBasicAssignmentInfo[] — Contains the id, name and ObjectType of the linked assignment
    - `assignmentId` string, uuid — GUID of the linked assignment
    - `assignmentName` string — Name of the linked assignment
    - `policyStatus` 'INACTIVE' | 'ACTIVE' | 'PROCESSING' | 'FAILED' — Policy status of the linked assignment
  - `optionsByDomain` object — Override options by Domain
  - `formulaByDomain` object — Formula by Domain
  - `displayResponseType` 'Text' | 'SingleSelect' | 'MultiSelect' | 'Date' | 'DateTime' | 'NumericalText' | 'NumericalSingleSelect' | 'RadioButton' | 'TextArea' | 'Formula' | 'Level' | 'Range' | 'Score' | 'System' — Display response type for UI - System attributes are displayed as SingleSelect or MultiSelect based on multiSelectMaxOptionValues
  - `associatedAttributeFieldName` string — The associated field name for schema.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `429` — Too Many Requests. For more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).
- `500` — Internal Server Error

---

[API](https://skmtc.net/onetrust/apis/platform-access-management.md) · [All operations](https://skmtc.net/onetrust/apis/platform-access-management/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onetrust/platform-access-management/versions/21de3aa0b170/schema)
