POST

Embed Script


Inserts custom script tags into a site, with the specified values for any dynamic parameters. Call this method when your app is installed on a site.

Your app must have an existing embedded script component, with exactly matching parameter names.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Embedded Scripts
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/apps/v1/scripts

Body Params
propertiesPropertiesRequired

Details of the script to embed.


componentIdstringformat GUID

Component ID of the embedded script. Available as a query parameter in the embedded script's extension page in the app dashboard.

Response Object
propertiesProperties

Details of the embedded script.

Embed Script Example 1
Request
cURL
curl -X POST \ https://www.wixapis.com/apps/v1/scripts \ -H 'Authorization: <AUTH>' \ -d '{ "properties": { "parameters": { "KeyName123": "Value123" } } }'
Response
JSON
{ "properties": { "parameters": { "KeyName123": "Value123" } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?