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

# Add Catalog Attributes

> This API adds new attributes to the catalog. If the API request contains attributes that already exist, they will not be added again.


#### Rate Limit

* Request limit: You can add 100 attributes per minute OR 1000 attributes per hour.

* Payload size limit - 5 MB 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**, **item ingestion, updates,
    deletion**, and **retrieval**.


    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 ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center
          (DC). MoEngage hosts each customer in a different DC. You can find
          your DC number and replace the value of ‘dc’ in the URL by referring
          to the DC and API endpoint mapping
          [here](/api/introduction#data-centers). Your MoEngage Data Center (DC)
          can be 01, 02, 03, 04, 05, 06, or 101.
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: >
        This API adds new attributes to the catalog. If the API request contains
        attributes that already exist, they will not be added again.
      operationId: addCatalogAttributes
      parameters:
        - name: MOE-APPKEY
          in: header
          description: >-
            This is the Workspace ID of your MoEngage account that must be
            passed with the request. You can find it in the MoEngage dashboard
            at **Settings** > **Account** > **APIs** > **Workspace ID (earlier
            app id)**.
          required: true
          schema:
            type: string
        - $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
                    - name: sale_start_date
                      type: datetime
                    - name: store_location
                      type: geopoint
      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:
                      - pricing
              examples:
                new-attribute-added:
                  summary: New attribute added successfully
                  description: >-
                    All requested attributes were new and added to the catalog.
                    The `duplicate-item-attributes` array is empty.
                  value:
                    success: true
                    duplicate-item-attributes: []
                duplicate-attribute:
                  summary: Duplicate attribute ignored
                  description: >-
                    One or more requested attributes already existed on the
                    catalog and were ignored. The duplicates are listed in
                    `duplicate-item-attributes`.
                  value:
                    success: true
                    duplicate-item-attributes:
                      - pricing
        '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. Supported values:

            - `string` — text values.

            - `bool` — boolean values (`true` or `false`).

            - `double` — numeric values, including decimals.

            - `datetime` — ISO 8601 timestamp with milliseconds and a UTC offset
            (`Z` or `±HH:mm`). Example: `2025-08-27T19:26:38.00Z`.

            - `geopoint` — a geographic coordinate as `"latitude,longitude"`.
            Example: `"12.9716,77.5946"`.
          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: >
        Authentication is done via Basic Auth. This requires a base64-encoded
        string of your credentials in the format 'username:password'.


        - **Username**: Use your MoEngage workspace ID (also known as the App
        ID). You can find it in the MoEngage dashboard at **Settings** >
        **Account** > **APIs** > **Workspace ID (earlier app id)**.

        - **Password**: Use your API Key, which you can find within the
        **Campaign report/Business events/Custom templates/Catalog API/Inform
        Report** tile.


        For more information on authentication and getting your credentials,
        refer
        [here](https://www.moengage.com/docs/api/introduction#getting-your-credentials).

````