> ## Documentation Index
> Fetch the complete documentation index at: https://moengage-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Catalog Attributes

> You can use this API to add new attributes to the catalog. If the API request contains attributes that already exist, they will not be added again.


### Rate Limit Information

Request limit - 100/min OR 1000/hr.
Payload size limit - 5MB only when Content-Length header is provided.


## OpenAPI

````yaml /api/catalog/catalog.yaml patch /catalog/{catalog_id}/attributes
openapi: 3.0.3
info:
  title: MoEngage Catalog API
  description: >
    This API allows for the management of product and item catalogs, including
    **creation**, **attribute definition**, and **item ingestion, updates, and
    deletion**.


    Authentication is handled via **Basic Auth** (using your Workspace ID as
    username and API Key as password), and all requests additionally require the
    `MOE-APPKEY` header (Workspace ID).


    The API has a platform-wide rate limit of **100 requests/minute OR 1000
    requests/hour**, with a maximum payload size of **5MB**.
  x-mint:
    content: |
      #example 500 max #
  version: '1.0'
servers:
  - url: https://api-{dc}.moengage.com/v1
    variables:
      dc:
        default: '01'
        description: >-
          The data center number for your account (e.g., 01, 02, 03). Refer to
          the MoEngage documentation for mapping.
security:
  - basicAuth: []
tags:
  - name: Catalog
    description: Operations related to creating and managing catalog schemas (attributes).
  - name: Items
    description: >-
      Operations related to ingesting, updating, and deleting items within a
      catalog.
paths:
  /catalog/{catalog_id}/attributes:
    patch:
      tags:
        - Catalog
      summary: Add Catalog Attributes
      description: >
        You can use this API to add new attributes to the catalog. If the API
        request contains attributes that already exist, they will not be added
        again.
      operationId: addCatalogAttributes
      parameters:
        - $ref: '#/components/parameters/CatalogIdPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - attributes
              properties:
                attributes:
                  type: array
                  description: A list of new attributes to add to the catalog schema.
                  items:
                    $ref: '#/components/schemas/AttributeDefinition'
            examples:
              example-1:
                summary: Add new attributes
                value:
                  attributes:
                    - name: color
                      type: string
                    - name: weight_kg
                      type: double
      responses:
        '202':
          description: >-
            Accepted. The request was processed. The response contains a list of
            attributes that were already present and ignored.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  duplicate-item-attributes:
                    type: array
                    description: >-
                      A list of attributes that already existed in the catalog
                      and were ignored.
                    items:
                      type: string
                    example:
                      - colour
                      - weight
              example:
                success: true
                duplicate-item-attributes:
                  - colour
                  - weight
        '400':
          description: Bad Request - Attribute already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error-code: attribute-exists
                message: Attribute already exists in the catalog
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          description: Payload Too Large - Maximum attributes exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error-code: too-many-attributes
                message: Maximum allowed attributes is 50
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    CatalogIdPath:
      name: catalog_id
      in: path
      required: true
      description: The unique identifier for the catalog, obtained during catalog creation.
      schema:
        type: string
  schemas:
    AttributeDefinition:
      type: object
      required:
        - name
        - type
      properties:
        name:
          type: string
          description: The name of the attribute (e.g., 'color', 'price').
        type:
          type: string
          description: The data type of the attribute.
          enum:
            - string
            - bool
            - double
            - datetime
            - geopoint
    Error:
      type: object
      properties:
        error-code:
          type: string
          description: A machine-readable error code.
        message:
          type: string
          description: A human-readable description of the error.
  responses:
    Unauthorized:
      description: >-
        Unauthorized - The request does not have valid authentication
        credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error-code: request-unauthenticated
            message: >-
              Your request is unauthorized. Please verify your credentials and
              try again.
    Forbidden:
      description: Forbidden - The client does not have access rights to the Catalog APIs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error-code: request-denied
            message: Your account does not have access to the Catalog APIs.
    NotFound:
      description: Not Found - The specified resource (catalog) could not be found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error-code: catalog-not-found
            message: >-
              We could not find any API based catalog for the provided catalog
              id.
    TooManyRequests:
      description: >
        Too Many Requests - The rate limit for the API has been exceeded.


        The following headers are returned in case of rate-limit breach:

        * **x-ratelimit-limit (integer)**: The maximum number of requests that
        the consumer is permitted to make in a given time window.

        * **x-ratelimit-remaining (integer)**: The number of requests remaining
        in the current rate limit window.

        * **x-ratelimit-reset (integer)**: The time at which the current rate
        limit window resets in UTC epoch seconds.
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >
        Basic Authentication sends a Base64-encoded string containing your
        username and password.


        You can obtain the username and password from the MoEngage Dashboard:

        1.  Navigate to **Settings > Account > APIs**.

        2.  **Username**: Copy the **Workspace ID**.

        3.  **Password**: Copy the **Catalog API** key.

````