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
        • Customer Segmentation
              • GETList Segments
              • POSTCreate Segments
              • PUTUpdate Segments
              • DELDelete Segments
        • 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
Dev Portal
LogoLogo
RESTAdminManagementCustomer SegmentationSegments

Update Segments

PUT
https://api.bigcommerce.com/stores/:store_hash/v3/segments
PUT
/stores/:store_hash/v3/segments
$curl -X PUT https://api.bigcommerce.com/stores/store_hash/v3/segments \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '[
> {
> "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
> }
>]'
1{
2 "data": [
3 {
4 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
5 "name": "Loyal Customers",
6 "description": "Segment of customers with over 5 purchases in the last year",
7 "created_at": "2023-11-10T09:15:30Z",
8 "updated_at": "2024-04-20T16:45:00Z"
9 }
10 ],
11 "meta": {}
12}
Updates *Segments*. **Limits** * Limit of 10 concurrent requests.
Was this page helpful?
Previous

Create Segments

Next

Delete Segments

Built with

Updates Segments.

Limits

  • Limit of 10 concurrent requests.

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Customers | modify | `store_v2_customers` | | Customers | read-only | `store_v2_customers_read_only` | **NOTE**: GET endpoints require only read-only permission, except for the [Get All Shopper Profiles in a Segment](/developer/api-reference/rest/admin/management/customer-segmentation/shopper-profiles-for-a-segment/get-segment-profiles) endpoint which requires modify permission. ### Authentication header | Header | Argument | Description | |:-------|:---------|:------------| | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see [API Accounts and OAuth Scopes](/developer/docs/overview/api-fundamentals/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 [API Accounts and OAuth Scopes](/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

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects a list of objects.
idstringRequiredformat: "uuid"
ID of the segment.
namestringOptional
Name of the segment.
descriptionstringOptional
Description of the segment.

Response

An array of created Segments.

datalist of objects
metaobject

Errors

400
Bad Request Error

OAuth scopes

UI NamePermissionParameter
Customersmodifystore_v2_customers
Customersread-onlystore_v2_customers_read_only

NOTE: GET endpoints require only read-only permission, except for the Get All Shopper Profiles in a Segment endpoint which requires modify permission.

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see API Accounts and OAuth Scopes.

Further reading

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

For more about BigCommerce OAuth scopes, see API Accounts and OAuth Scopes.

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