---
updatedAt: 2025-10-08T22:07:14.000Z
agentTools:
  projectIndex: https://docs.quable.com/llms.txt
---

# Create a new Attribute in the datamodel

Creates a attributes resource.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Quable PIM API documentation v5",
    "description": "# Pagination, Filtering, and Sorting\nMany times, a large number of results could be returned when making API calls. For that reason, one need to paginate the results, alongside allowing filtering and/or sorting in specific order, to make sure responses are easier to handle.\n## Pagination\nWhen available, pagination can be implemented using one or both of two query parameters:\n* limit to define the number of items returned in the response, and<br />\n* page to specify the *sequence* or *range* of the items list<br /><br />\nQuable API has a default limit of 100 for results (except on /assets, /documents, /classifications, /links and /variants endpoints), and start at page 1, but it is advised to always explicitly set at least the limit parameter.\n## Filtering\nMost API endpoints do allow basic filtering on several of their properties (one filter for one property).<br /> Possibility to filter on multiple values by using square brackets on those qualified.<br /> Example : /api/endpoint?id[]=value1&documentType.id[]=value2<br /><br />\nSome of them have a generic ‘**search**‘ filter available which allow a cross-properties filtering. Those properties may change over time, without warnings, when needed.<br /><br /> Filters should always be used as **query parameters**.<br /><br />\nSome of them accept a ‘**X-Quable-Locale**‘ header in order to specify the Locale on which filters must be applied.\n## Sorting\nSorting is determined through the use of the ‘**order**’ query string parameter.<br /> It use the square brackets to specify the property on which the sort must apply, and the supported sort directions, either ‘**asc**’ for ascending or ‘**desc**’ for descending, as value.<br /> Example : /api/endpoint?order[id]=asc<br /><br />\nBy default, the sort on translated properties like ‘name‘ is make on the **default language** of the PIM.<br /> This behavior can be overridden by passing the chosen - and available - **language** in the ‘**Accept-Language**‘ header parameter of the query.",
    "version": "2d049f10adc518320a4a4ebeb07b64db5b919923"
  },
  "servers": [
    {
      "url": "https://{instance_name}.quable.com/api",
      "description": ""
    }
  ],
  "paths": {
    "/attributes": {
      "post": {
        "operationId": "postAttributesCollection",
        "tags": [
          "Data Model"
        ],
        "responses": {
          "201": {
            "description": "attributes resource created",
            "content": {
              "application/ld+json": {
                "schema": {
                  "$ref": "#/components/schemas/attributes.EavAttributeOutput.jsonld"
                }
              },
              "application/hal+json": {
                "schema": {
                  "$ref": "#/components/schemas/attributes.EavAttributeOutput"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/attributes.EavAttributeOutput"
                }
              },
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/attributes.EavAttributeOutput"
                }
              }
            },
            "links": {
              "GetAttributesItem": {
                "operationId": "getAttributesItem",
                "parameters": {
                  "code": "$response.body#/code"
                },
                "description": "The `code` value returned in the response can be used as the `code` parameter in `GET /attributes/{id}`."
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "422": {
            "description": "Unprocessable entity"
          }
        },
        "summary": "Create a new Attribute in the datamodel",
        "description": "Creates a attributes resource.",
        "parameters": [],
        "requestBody": {
          "description": "The new attributes resource",
          "content": {
            "application/ld+json": {
              "schema": {
                "$ref": "#/components/schemas/attributes.AttributeInput.jsonld-attribute.input.create"
              }
            },
            "application/hal+json": {
              "schema": {
                "$ref": "#/components/schemas/attributes.AttributeInput-attribute.input.create"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attributes.AttributeInput-attribute.input.create"
              }
            },
            "text/html": {
              "schema": {
                "$ref": "#/components/schemas/attributes.AttributeInput-attribute.input.create"
              }
            }
          },
          "required": true
        },
        "deprecated": false
      },
      "parameters": []
    }
  },
  "components": {
    "schemas": {
      "DocumentTypeCode": {
        "title": "DocumentType",
        "type": "string",
        "description": "This is the unique identifier of the document type that the resource should be apply to",
        "pattern": "^[\\w\\s\\/|_.,&+-]+$",
        "maxLength": 255,
        "example": "document_type_example"
      },
      "EavAttributeType": {
        "type": "string",
        "example": "date",
        "enum": [
          "date",
          "decimal",
          "html_text",
          "integer",
          "json",
          "localized_text",
          "multi_select",
          "multiline_text",
          "simple_select",
          "switch",
          "time",
          "unlocalized_text"
        ]
      },
      "EmbedAttributeGroup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "EmbedAttributeGroup-attribute.input.create": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "EmbedAttributeGroup.jsonld": {
        "type": "object",
        "properties": {
          "@context": {
            "readOnly": true,
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "@vocab": {
                    "type": "string"
                  },
                  "hydra": {
                    "type": "string",
                    "enum": [
                      "http://www.w3.org/ns/hydra/core#"
                    ]
                  }
                },
                "required": [
                  "@vocab",
                  "hydra"
                ],
                "additionalProperties": true
              }
            ]
          },
          "@id": {
            "readOnly": true,
            "type": "string"
          },
          "@type": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "EmbedAttributeGroup.jsonld-attribute.input.create": {
        "type": "object",
        "properties": {
          "@context": {
            "readOnly": true,
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "@vocab": {
                    "type": "string"
                  },
                  "hydra": {
                    "type": "string",
                    "enum": [
                      "http://www.w3.org/ns/hydra/core#"
                    ]
                  }
                },
                "required": [
                  "@vocab",
                  "hydra"
                ],
                "additionalProperties": true
              }
            ]
          },
          "@id": {
            "readOnly": true,
            "type": "string"
          },
          "@type": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "EmbedAttributeSetInput-attribute.input.create": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "EmbedAttributeSetInput.jsonld-attribute.input.create": {
        "type": "object",
        "properties": {
          "@context": {
            "readOnly": true,
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "@vocab": {
                    "type": "string"
                  },
                  "hydra": {
                    "type": "string",
                    "enum": [
                      "http://www.w3.org/ns/hydra/core#"
                    ]
                  }
                },
                "required": [
                  "@vocab",
                  "hydra"
                ],
                "additionalProperties": true
              }
            ]
          },
          "@id": {
            "readOnly": true,
            "type": "string"
          },
          "@type": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "EmbedDocumentTypeInput-attribute.input.create": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          }
        }
      },
      "EmbedDocumentTypeInput.jsonld-attribute.input.create": {
        "type": "object",
        "properties": {
          "@context": {
            "readOnly": true,
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "@vocab": {
                    "type": "string"
                  },
                  "hydra": {
                    "type": "string",
                    "enum": [
                      "http://www.w3.org/ns/hydra/core#"
                    ]
                  }
                },
                "required": [
                  "@vocab",
                  "hydra"
                ],
                "additionalProperties": true
              }
            ]
          },
          "@id": {
            "readOnly": true,
            "type": "string"
          },
          "@type": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          }
        }
      },
      "Identifier": {
        "title": "Identifier",
        "type": "string",
        "description": "This is the unique identifier of the resource",
        "pattern": "^[\\w\\s\\/|_.,&+-]+$",
        "maxLength": 255,
        "example": "identifier_example"
      },
      "LanguageTranslation": {
        "type": "object",
        "description": "This structure does accept key & values where key has to be a language code configured in your PIM & the value is the value for this field in this language.",
        "properties": {
          "fr-FR": {
            "type": "string",
            "example": "fr-FR translation"
          },
          "en-US": {
            "type": "string",
            "example": "en-US translation"
          }
        },
        "additionalProperties": {
          "type": "string",
          "example": "additional translation"
        },
        "example": {
          "fr-FR": "fr-FR translation",
          "en-US": "en-US translation",
          "<*>": "..."
        }
      },
      "attributes.AttributeInput-attribute.input.create": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "documentType": {
            "example": {
              "id": "document-type-id"
            },
            "$ref": "#/components/schemas/EmbedDocumentTypeInput-attribute.input.create"
          },
          "type": {
            "$ref": "#/components/schemas/EavAttributeType",
            "type": "string"
          },
          "isEditable": {
            "type": "boolean"
          },
          "isFilterable": {
            "type": "boolean"
          },
          "isVisible": {
            "type": "boolean"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "isRequired": {
            "type": "boolean"
          },
          "isComputed": {
            "type": "boolean"
          },
          "name": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "helpText": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "attributeGroup": {
            "example": {
              "id": "attribute-group-code"
            },
            "nullable": true,
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbedAttributeGroup-attribute.input.create"
              }
            ]
          },
          "attributeSets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmbedAttributeSetInput-attribute.input.create"
            }
          }
        }
      },
      "attributes.AttributeInput.jsonld-attribute.input.create": {
        "type": "object",
        "properties": {
          "@context": {
            "readOnly": true,
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "@vocab": {
                    "type": "string"
                  },
                  "hydra": {
                    "type": "string",
                    "enum": [
                      "http://www.w3.org/ns/hydra/core#"
                    ]
                  }
                },
                "required": [
                  "@vocab",
                  "hydra"
                ],
                "additionalProperties": true
              }
            ]
          },
          "@id": {
            "readOnly": true,
            "type": "string"
          },
          "@type": {
            "readOnly": true,
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "documentType": {
            "example": {
              "id": "document-type-id"
            },
            "$ref": "#/components/schemas/EmbedDocumentTypeInput.jsonld-attribute.input.create"
          },
          "type": {
            "$ref": "#/components/schemas/EavAttributeType",
            "type": "string"
          },
          "isEditable": {
            "type": "boolean"
          },
          "isFilterable": {
            "type": "boolean"
          },
          "isVisible": {
            "type": "boolean"
          },
          "isPrimary": {
            "type": "boolean"
          },
          "isRequired": {
            "type": "boolean"
          },
          "isComputed": {
            "type": "boolean"
          },
          "name": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "description": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "helpText": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "attributeGroup": {
            "example": {
              "id": "attribute-group-code"
            },
            "nullable": true,
            "anyOf": [
              {
                "$ref": "#/components/schemas/EmbedAttributeGroup.jsonld-attribute.input.create"
              }
            ]
          },
          "attributeSets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EmbedAttributeSetInput.jsonld-attribute.input.create"
            }
          }
        }
      },
      "attributes.EavAttributeOutput": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/EavAttributeType",
            "readOnly": true,
            "type": "string"
          },
          "helpText": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "readOnly": true,
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "isVisible": {
            "readOnly": true,
            "type": "boolean"
          },
          "isEditable": {
            "readOnly": true,
            "type": "boolean"
          },
          "isFilterable": {
            "readOnly": true,
            "type": "boolean"
          },
          "isPrimary": {
            "readOnly": true,
            "type": "boolean"
          },
          "isRequired": {
            "readOnly": true,
            "type": "boolean"
          },
          "isAIEnabled": {
            "readOnly": true,
            "type": "boolean"
          },
          "isComputed": {
            "readOnly": true,
            "type": "boolean"
          },
          "attributeSets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                }
              }
            },
            "readOnly": true
          },
          "options": {
            "type": "object",
            "description": "Additional options that may apply to specific types",
            "minProperties": 0,
            "maxProperties": 1,
            "properties": {
              "decimalPrecision": {
                "type": "integer",
                "minimum": 1,
                "maximum": 6,
                "description": "Required when type is 'decimal'"
              },
              "maxCharactersAllowed": {
                "type": "integer",
                "nullable": true,
                "minimum": 1,
                "description": "Only used when type is 'multiline_text' or 'localized_text', if not given or null, no limit will be set"
              }
            },
            "readOnly": true,
            "additionalProperties": {
              "type": "string"
            }
          },
          "dateCreated": {
            "readOnly": true,
            "description": "This is an ISO datetime",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateModified": {
            "readOnly": true,
            "description": "This is an ISO datetime",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "attributeGroup": {
            "readOnly": true,
            "$ref": "#/components/schemas/EmbedAttributeGroup"
          },
          "documentType": {
            "readOnly": true,
            "type": "string",
            "format": "iri-reference"
          },
          "aiTemplate": {
            "readOnly": true,
            "type": "string",
            "format": "iri-reference",
            "nullable": true
          },
          "id": {
            "$ref": "#/components/schemas/Identifier",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "readOnly": true,
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "name": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "readOnly": true,
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "documentTypeCode": {
            "$ref": "#/components/schemas/DocumentTypeCode",
            "deprecated": true,
            "type": "string",
            "format": "iri-reference"
          },
          "legacyId": {
            "readOnly": true,
            "deprecated": true,
            "type": "integer"
          },
          "AITemplate": {
            "readOnly": true,
            "type": "string",
            "format": "iri-reference",
            "nullable": true
          }
        }
      },
      "attributes.EavAttributeOutput.jsonld": {
        "type": "object",
        "properties": {
          "@context": {
            "readOnly": true,
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "@vocab": {
                    "type": "string"
                  },
                  "hydra": {
                    "type": "string",
                    "enum": [
                      "http://www.w3.org/ns/hydra/core#"
                    ]
                  }
                },
                "required": [
                  "@vocab",
                  "hydra"
                ],
                "additionalProperties": true
              }
            ]
          },
          "@id": {
            "readOnly": true,
            "type": "string"
          },
          "@type": {
            "readOnly": true,
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/EavAttributeType",
            "readOnly": true,
            "type": "string"
          },
          "helpText": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "readOnly": true,
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "isVisible": {
            "readOnly": true,
            "type": "boolean"
          },
          "isEditable": {
            "readOnly": true,
            "type": "boolean"
          },
          "isFilterable": {
            "readOnly": true,
            "type": "boolean"
          },
          "isPrimary": {
            "readOnly": true,
            "type": "boolean"
          },
          "isRequired": {
            "readOnly": true,
            "type": "boolean"
          },
          "isAIEnabled": {
            "readOnly": true,
            "type": "boolean"
          },
          "isComputed": {
            "readOnly": true,
            "type": "boolean"
          },
          "attributeSets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                }
              }
            },
            "readOnly": true
          },
          "options": {
            "type": "object",
            "description": "Additional options that may apply to specific types",
            "minProperties": 0,
            "maxProperties": 1,
            "properties": {
              "decimalPrecision": {
                "type": "integer",
                "minimum": 1,
                "maximum": 6,
                "description": "Required when type is 'decimal'"
              },
              "maxCharactersAllowed": {
                "type": "integer",
                "nullable": true,
                "minimum": 1,
                "description": "Only used when type is 'multiline_text' or 'localized_text', if not given or null, no limit will be set"
              }
            },
            "readOnly": true,
            "additionalProperties": {
              "type": "string"
            }
          },
          "dateCreated": {
            "readOnly": true,
            "description": "This is an ISO datetime",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dateModified": {
            "readOnly": true,
            "description": "This is an ISO datetime",
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "attributeGroup": {
            "readOnly": true,
            "$ref": "#/components/schemas/EmbedAttributeGroup.jsonld"
          },
          "documentType": {
            "readOnly": true,
            "type": "string",
            "format": "iri-reference"
          },
          "aiTemplate": {
            "readOnly": true,
            "type": "string",
            "format": "iri-reference",
            "nullable": true
          },
          "id": {
            "$ref": "#/components/schemas/Identifier",
            "readOnly": true,
            "type": "string"
          },
          "description": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "readOnly": true,
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "name": {
            "$ref": "#/components/schemas/LanguageTranslation",
            "readOnly": true,
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "documentTypeCode": {
            "$ref": "#/components/schemas/DocumentTypeCode",
            "deprecated": true,
            "type": "string",
            "format": "iri-reference"
          },
          "legacyId": {
            "readOnly": true,
            "deprecated": true,
            "type": "integer"
          },
          "AITemplate": {
            "readOnly": true,
            "type": "string",
            "format": "iri-reference",
            "nullable": true
          }
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "description": "Value for the Authorization header parameter.",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "apiKey": []
    }
  ],
  "x-readme": {}
}
```