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 Cart Emails
        • Custom Template Associations
        • Email Templates
        • Pages
        • Marketing
              • GETList Scripts
              • POSTCreate Script
              • GETGet Script
              • PUTUpdate Script
              • DELDelete Script
        • Store Content
        • Themes
        • Widgets
        • Page Widgets
      • Payments
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminContentMarketingScripts

List Scripts

GET
https://api.bigcommerce.com/stores/:store_hash/v3/content/scripts
GET
/stores/:store_hash/v3/content/scripts
$curl https://api.bigcommerce.com/stores/store_hash/v3/content/scripts \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json"
1{
2 "data": [
3 {
4 "api_client_id": "bc_api_client_123456",
5 "auto_uninstall": true,
6 "channel_id": 2,
7 "consent_category": "functional",
8 "date_created": "2024-01-15T09:30:00Z",
9 "date_modified": "2024-02-20T11:45:00Z",
10 "description": "Adds a customer review widget to product pages",
11 "enabled": true,
12 "html": "<script>console.log('Review widget loaded');</script>",
13 "integrity_hashes": [
14 "sha384-DgtwqxoPLKnJSER+TUmSPIpE6ZbVb2ZZwR241HHiqJipLiZQPN/JkKX5xxrEHUTt",
15 "sha384-UiwrqEuzfCtJKLI+dXmPNOpE6ZvBh2IIqT371rJiqJxyKjZ6PP/JmSD5hdsEUPOl"
16 ],
17 "kind": "src",
18 "load_method": "async",
19 "location": "footer",
20 "name": "Customer Review Widget",
21 "src": "https://cdn.example.com/widgets/review-widget.js",
22 "uuid": "a3f1c9e2-4b7d-4f9a-9c3e-2b8f7d6a1e4c",
23 "visibility": "storefront"
24 }
25 ],
26 "meta": {
27 "pagination": {
28 "total": 36,
29 "count": 36,
30 "per_page": 50,
31 "current_page": 1,
32 "total_pages": 1,
33 "links": {
34 "previous": null,
35 "current": "?page=1&limit=50",
36 "next": null
37 }
38 }
39 }
40}

Returns a list of Scripts. Optional parameters can be passed in.

This operation will only return scripts generated by the API key and password used to create the script originally.

Was this page helpful?
Previous

Delete All Gift Certificates

Next

Create Script

Built with

Authentication

X-Auth-Tokenstring
### OAuth scopes | UI Name | Permission | Parameter | |:--------|:-----------|:----------| | Checkout Content | modify | `store_content_checkout` | | Checkout Content | read-only | `store_content_checkout_read_only` | | Content | modify | `store_v2_content` | | Content | read-only | `store_v2_content_read_only` | To read or modify scripts on checkout pages, add `Checkout Content` scopes. ### 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

AcceptstringRequiredDefaults to application/json
The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Query parameters

pageintegerOptional

Specifies the page number in a limited (paginated) list of products.

limitintegerOptional

Controls the number of items per page in a limited (paginated) list of products.

sortenumOptional

Field name to sort the scripts by. Note: Since id increments when new scripts are added, you can use that field to sort by script create date.

Allowed values:
directionenumOptional

Sort direction. Acceptable values are: asc, desc.

Allowed values:
channel_id:inlist of integersOptional
Filters list of scripts by the associated channel ID.

Response

datalist of objects
metaobject
Data about the response, including pagination and collection totals.

Errors

422
Unprocessable Entity Error

OAuth scopes

UI NamePermissionParameter
Checkout Contentmodifystore_content_checkout
Checkout Contentread-onlystore_content_checkout_read_only
Contentmodifystore_v2_content
Contentread-onlystore_v2_content_read_only

To read or modify scripts on checkout pages, add Checkout Content scopes.

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.

The MIME type of the response body.