For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
        • Abandoned Carts
        • Carts
        • Channels
        • Checkouts
        • Currencies
          • V3
              • GETList Customers
              • POSTCreate Customers
              • PUTUpdate Customers
              • DELDelete Customers
                • GETList Customer Attributes
                • POSTCreate Customer Attribute
                • PUTUpdate Customer Attribute
                • DELDelete Customer Attributes
          • V2
        • Customer Segmentation
        • Geography
        • Infrastructure Hosting
        • Inventory
        • Orders
        • Order Operations
        • Pickup
        • Pickup Methods
        • Pickup Options
        • Pricing
        • Price Lists
        • Promotions
        • Promotion Settings
        • Redirects
        • Scripts
        • Settings
        • Shipping
        • Sites
        • Subscribers
        • System Logs
        • Tax
        • Wishlists
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
    • Tool Resynchronization
Dev Portal
LogoLogo
RESTAdminManagementCustomersV3Attributes

Create Customer Attribute

POST
https://api.bigcommerce.com/stores/:store_hash/v3/customers/attributes
POST
/stores/:store_hash/v3/customers/attributes
$curl -X POST https://api.bigcommerce.com/stores/store_hash/v3/customers/attributes \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "name": "string",
> "type": "string"
> }
>]'
1{
2 "data": [
3 {
4 "name": "Age",
5 "type": "string",
6 "id": 1,
7 "date_modified": "2018-11-14T16:46:23Z",
8 "date_created": "2018-11-13T21:42:06Z"
9 }
10 ],
11 "meta": {}
12}
Creates a Customer Attribute. Multiple customer attributes can be created in one call. **Required Fields** * name * type **Limits** * Limit of 3 concurrent requests. **Notes** Once the data type is set, it cannot be changed. The attribute will need to be deleted then created again with the new data type. This will also delete it from the customer. Customer attributes are created separately from the customer. After the name and type are created, then the attributes can be added to the customer. A store cannot have more than 50 customer attributes.
Was this page helpful?
Previous

List Customer Attributes

Next

Update Customer Attribute

Built with

Creates a Customer Attribute. Multiple customer attributes can be created in one call.

Required Fields

  • name
  • type

Limits

  • Limit of 3 concurrent requests.

Notes

Once the data type is set, it cannot be changed. The attribute will need to be deleted then created again with the new data type. This will also delete it from the customer.

Customer attributes are created separately from the customer. After the name and type are created, then the attributes can be added to the customer.

A store cannot have more than 50 customer attributes.

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Customers | modify | `store_v2_customers` | | Customers | read-only | `store_v2_customers_read_only` | | Stored Payment Instruments | modify | `store_stored_payment_instruments` | | Stored Payment Instruments | read-only | `store_stored_payment_instruments_read_only` | ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#api-accounts). | ### Further reading For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/developer/docs/overview/api-fundamentals/api-accounts#x-auth-token-header-example-requests). For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/developer/docs/overview/api-fundamentals/api-accounts#oauth-scopes). For a list of API status codes, see [API Status Codes](/developer/api-reference/rest/overview#rest-http-status-codes).

Path parameters

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringOptionalDefaults to application/json

Request

This endpoint expects a list of objects.
namestringRequired1-255 characters
Attribute name.
typeenumRequired

Attribute type should match one of: string, number, date.

Allowed values:

Response

datalist of objects
metaobject
Response metadata.

Errors

422
Unprocessable Entity Error

OAuth scopes

UI NamePermissionParameter
Customersmodifystore_v2_customers
Customersread-onlystore_v2_customers_read_only
Stored Payment Instrumentsmodifystore_stored_payment_instruments
Stored Payment Instrumentsread-onlystore_stored_payment_instruments_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.