Skip to main content
POST
/
attributes
Create an attribute definition
curl --request POST \
  --url https://www.merchkit.com/api/v1/attributes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "entityType": "<string>",
  "aiGenerated": true,
  "customInstructions": "<string>",
  "acceptableValues": "<string>",
  "defaultValue": "<string>",
  "isPrimary": true,
  "selectedTools": [],
  "sourceAttributeKeys": [
    "<string>"
  ],
  "requiredDependencies": [
    "<string>"
  ],
  "videoModel": "veo3.1",
  "imageSourceAttributeKey": [
    "<string>"
  ],
  "videoSourceAttributeKey": [
    "<string>"
  ],
  "visionImageSourceAttributeKey": [
    "<string>"
  ]
}
'

Authorizations

Authorization
string
header
required

Workspace-scoped API key. Available scopes:

  • read:products: List and read products, assets, vendors, sources, and merch.
  • write:products: Create and update products and their attribute values.
  • delete:products: Delete products.
  • read:attributes: List and read attribute definitions.
  • write:attributes: Create, update, and delete attribute definitions.
  • write:attribute_values: Set attribute values on entities.
  • read:views: List and read saved grid views.
  • write:views: Create and update grid views.
  • read:vendors: List and read vendor records.
  • write:vendors: Create and update vendor records.
  • read:categories: List and read categories.
  • write:categories: Create and update categories.
  • read:channels: Read the available channel catalog.
  • read:completeness: Check per-channel completeness for entities.
  • read:history: Read entity history and the account change feed.
  • read:jobs: Poll asynchronous job status.
  • data:import: Start import operations.
  • data:export: Start export operations.

Body

application/json

Attribute definition config. On create, name/entityType/dataType/aiGenerated are required; on update, only entityType is required and any field may be supplied.

name
string
entityType
string
dataType
enum<string>
Available options:
single_line_text_field,
multi_line_text_field,
rich_text_field,
number,
boolean,
date,
url,
json,
single_select_list,
multi_select_list,
image,
video,
formula,
status,
progress,
rank
aiGenerated
boolean
customInstructions
string

Generation prompt; reference other attributes with {{key}}.

acceptableValues
string

Comma-separated allowed values for select/dictionary attributes.

defaultValue
string
isPrimary
boolean
selectedTools
enum<string>[]

AI text-generation tools. includeWebSearch = live web research; includeDataSources = scraped sites/CSVs.

Available options:
includeDataSources,
includeImages,
includeWebSearch,
includeProductAttributes
sourceAttributeKeys
string[]
requiredDependencies
string[]
imageModel
enum<string>
Available options:
gpt-image-1,
nano-banana
aspectRatio
enum<string>
Available options:
Square,
Landscape,
Portrait
videoModel
enum<string>
Available options:
veo3.1
imageSourceAttributeKey
string[]
videoSourceAttributeKey
string[]
visionImageSourceAttributeKey
string[]

Response

201

The created attribute definition.