contentstack Attributes API

Attributes represent individual user data characteristics such as age, location, or browsing history used to define audience segments.

Operations 4

GET /attributes Get all attributes #
POST /attributes Create an attribute #
PUT /attributes/{id} Update an attribute #
DELETE /attributes/{id} Delete an attribute #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/contentstack-attributes-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

contentstack-attributes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Contentstack Personalize Management Attributes API
  description: The Contentstack Personalize Management API provides programmatic control over the resources in a Contentstack Personalize project, including Attributes, Audiences, Events, and Experiences.
  version: v1
  contact:
    name: Contentstack Support
    url: https://www.contentstack.com/contact
  termsOfService: https://www.contentstack.com/legal/terms-of-service
servers:
- url: https://personalize-api.contentstack.com
  description: AWS North America Production Server
- url: https://eu-personalize-api.contentstack.com
  description: AWS Europe Production Server
- url: https://au-personalize-api.contentstack.com
  description: AWS Australia Production Server
- url: https://azure-na-personalize-api.contentstack.com
  description: Azure North America Production Server
- url: https://azure-eu-personalize-api.contentstack.com
  description: Azure Europe Production Server
security:
- bearerAuth: []
- authtokenAuth: []
tags:
- name: Attributes
  description: Attributes represent individual user data characteristics such as age, location, or browsing history used to define audience segments.
paths:
  /attributes:
    get:
      operationId: getAllAttributes
      summary: Get all attributes
      description: Retrieves all user attribute definitions configured in the Personalize project. Attributes are used to build audience segment rules.
      tags:
      - Attributes
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      responses:
        '200':
          description: A list of all attributes in the project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttributeList'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createAttribute
      summary: Create an attribute
      description: Creates a new user attribute definition in the Personalize project. Attributes can be of various types including string, number, boolean, and date, and are used to build audience segment rules.
      tags:
      - Attributes
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAttributeRequest'
      responses:
        '201':
          description: The newly created attribute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attribute'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /attributes/{id}:
    put:
      operationId: updateAttribute
      summary: Update an attribute
      description: Updates the configuration of an existing attribute in the Personalize project including its name, key, and data type.
      tags:
      - Attributes
      parameters:
      - $ref: '#/components/parameters/AttributeId'
      - $ref: '#/components/parameters/ProjectUid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAttributeRequest'
      responses:
        '200':
          description: The updated attribute.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Attribute'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteAttribute
      summary: Delete an attribute
      description: Permanently deletes an attribute from the Personalize project. Attributes referenced in audience rules cannot be deleted until those references are removed.
      tags:
      - Attributes
      parameters:
      - $ref: '#/components/parameters/AttributeId'
      - $ref: '#/components/parameters/ProjectUid'
      responses:
        '200':
          description: Attribute deleted successfully.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  responses:
    BadRequest:
      description: The request is malformed or contains invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    AttributeList:
      type: object
      description: A list of user attribute definitions.
      properties:
        data:
          type: array
          description: Array of attribute objects.
          items:
            $ref: '#/components/schemas/Attribute'
    CreateAttributeRequest:
      type: object
      description: Parameters for creating or updating an attribute.
      required:
      - name
      - key
      - data_type
      properties:
        name:
          type: string
          description: Display name for the attribute.
        key:
          type: string
          description: Machine-readable key for the attribute.
        data_type:
          type: string
          description: Data type of the attribute.
          enum:
          - string
          - number
          - boolean
          - date
    Attribute:
      type: object
      description: A user attribute definition used in audience segment rules.
      properties:
        uid:
          type: string
          description: Unique identifier of the attribute.
        name:
          type: string
          description: Display name of the attribute.
        key:
          type: string
          description: Machine-readable key used to reference this attribute in rules and SDKs.
        data_type:
          type: string
          description: Data type of the attribute.
          enum:
          - string
          - number
          - boolean
          - date
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the attribute was created.
    Error:
      type: object
      description: Standard error response.
      properties:
        message:
          type: string
          description: Human-readable description of the error.
        status:
          type: integer
          description: HTTP status code.
  parameters:
    ProjectUid:
      name: x-project-uid
      in: header
      required: true
      description: The UID of the Contentstack Personalize project.
      schema:
        type: string
    AttributeId:
      name: id
      in: path
      required: true
      description: The unique identifier of the attribute.
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 Bearer token with personalize:manage or personalize:read scope.
    authtokenAuth:
      type: apiKey
      in: header
      name: authtoken
      description: Contentstack user authtoken for session-based authentication.
externalDocs:
  description: Contentstack Personalize Management API Documentation
  url: https://www.contentstack.com/docs/developers/apis/personalize-management-api