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.
Resources
Get started
ReferenceGuidesChangelog
ReferenceGuidesChangelog
  • Token
    • GETGet Authorization User Info
    • GETGet Authorization Info
    • POSTResolve ID Token
  • Sites
    • GETList Sites
    • GETGet Site
    • GETGet Custom Domains
    • POSTPublish Site
  • Pages and Components
  • CMS
  • Forms
  • Custom Code
      • GETGet Custom Code
      • PUTAdd/Update Custom Code
      • DELDelete Custom Code
  • Assets
  • Comments
    • GETSearch Users by Email
    • GETList Comment Threads
    • GETGet Comment Thread
    • GETList Comment Replies
    • POSTCreate Comment Reply
  • Ecommerce
  • Webhooks
  • Site Configuration
  • Enterprise
  • App Subscriptions
    • GETGet app subscriptions
LogoLogo
Resources
Get started
Custom CodeCustom Code - Sites

Get Custom Code

GET
https://api.webflow.com/beta/sites/:site_id/custom_code
GET
/beta/sites/:site_id/custom_code
$curl https://api.webflow.com/beta/sites/580e63e98c9a982ac9b8b741/custom_code \
> -H "Authorization: Bearer <token>"
1{
2 "scripts": [
3 {
4 "id": "cms_slider",
5 "location": "header",
6 "version": "1.0.0",
7 "attributes": {
8 "my-attribute": "some-value"
9 }
10 },
11 {
12 "id": "alert",
13 "location": "header",
14 "version": "0.0.1",
15 "attributes": {}
16 }
17 ],
18 "lastUpdated": "2022-10-26T00:28:54.191Z",
19 "createdOn": "2022-10-26T00:28:54.191Z"
20}
Get all scripts applied to a site by the App. <Note title="Script Registration"> To apply a script to a site or page, the script must first be registered to a site via the [Register Script](/data/reference/custom-code/custom-code/register-hosted) endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on [working with Custom Code](/data/docs/custom-code) for more information. </Note> <Note>Access to this endpoint requires a bearer token obtained from an [OAuth Code Grant Flow](/data/reference/oauth-app).</Note> Required scope | `custom_code:read`
Was this page helpful?
Previous

Add/Update Custom Code

Next
Built with

Get all scripts applied to a site by the App.

Script Registration

To apply a script to a site or page, the script must first be registered to a site via the Register Script endpoints. Once registered, the script can be applied to a Site or Page using the appropriate endpoints. See the documentation on working with Custom Code for more information.

Access to this endpoint requires a bearer token obtained from an OAuth Code Grant Flow.

Required scope | custom_code:read

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

site_idstringRequiredformat: "objectid"
Unique identifier for a Site

Response

Request was successful
scriptslist of objects
A list of scripts applied to a Site or a Page
lastUpdatedstringRead-onlyformat: "date-string"
Date when the Site's scripts were last updated
createdOnstringRead-onlyformat: "date-string"
Date when the Site's scripts were created

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error