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

Get Script

GET
https://api.bigcommerce.com/stores/:store_hash/v3/content/scripts/:uuid
GET
/stores/:store_hash/v3/content/scripts/:uuid
$curl https://api.bigcommerce.com/stores/store_hash/v3/content/scripts/03805148-a592-4803-9482-e91fe5c1be12 \
> -H "Accept: application/json" \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json"
1{
2 "data": {
3 "api_client_id": "bc_api_client_987654321",
4 "auto_uninstall": true,
5 "channel_id": 1,
6 "consent_category": "analytics",
7 "date_created": "2024-01-15T09:30:00Z",
8 "date_modified": "2024-01-15T09:30:00Z",
9 "description": "Adds Google Analytics tracking to all storefront pages.",
10 "enabled": true,
11 "html": "<script>console.log('This script tag is not used for src kind');</script>",
12 "integrity_hashes": [
13 "sha384-DgtwqxoPLKnJSER+TUmSPIpE6ZbVb2ZZwR241HHiqJipLiZQPN/JkKX5xxrEHUTt",
14 "sha384-UiwrqEuzfCtJKLI+dXmPNOpE6ZvBh2IIqT371rJiqJxyKjZ6PP/JmSD5hdsEUPOl"
15 ],
16 "kind": "src",
17 "load_method": "default",
18 "location": "head",
19 "name": "Google Analytics Integration",
20 "src": "https://www.googletagmanager.com/gtag/js?id=UA-12345678-1",
21 "uuid": "03805148-a592-4803-9482-e91fe5c1be12",
22 "visibility": "storefront"
23 },
24 "meta": {}
25}

Returns a single Script.

Was this page helpful?
Previous

Create Script

Next

Update 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

uuidstringRequiredformat: "uuid"
The identifier for a specific script.
store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Response

Success
dataobject
metaobject
Response metadata.

Errors

404
Not Found Error
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.