Skip to main content
PUT
/
v1
/
scripts
/
{id}
Update or create script
curl --request PUT \
  --url https://api.quickbutik.com/v1/scripts/{id} \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "content": "<string>",
  "placement": "head",
  "is_active": 0,
  "load_priority": 123
}
'
{
  "id": "<string>",
  "name": "<string>",
  "placement": "head",
  "value": "<string>",
  "is_active": 0,
  "load_priority": 123,
  "created_at": "<string>",
  "updated_at": "<string>"
}

Authorizations

Authorization
string
header
required

Basic Authentication with API Keys

The Quickbutik API uses Basic Authentication where you use your API key as both the username and password.

How it works:

  1. Format your credentials as api_key:api_key (using the SAME API key for both username and password)
  2. Base64 encode the formatted string
  3. Include in the Authorization header as: Authorization: Basic ENCODED_STRING

Example:

  • API Key: sk_live_abc123
  • Formatted: sk_live_abc123:sk_live_abc123
  • Base64 Encoded: c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=
  • Header: Authorization: Basic c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=

cURL Example:

curl https://api.quickbutik.com/v1/orders -u your_api_key:your_api_key

All API requests must be made over HTTPS. Requests made over HTTP will be rejected.

API keys can be generated in the Quickbutik Control Panel under Settings → API.

Path Parameters

id
string
required

Script ID

Body

application/json
name
string
content
string
placement
enum<string>
Available options:
head,
body_start,
body_end,
other
is_active
enum<integer>
Available options:
0,
1
load_priority
integer

Response

Script updated successfully

id
string

Script ID

name
string

Script name

placement
enum<string>

Where the script should be placed

Available options:
head,
body_start,
body_end
value
string

The script content (JavaScript code)

is_active
enum<integer>

Script active status

Available options:
0,
1
load_priority
integer

Loading priority order

created_at
string

Creation timestamp

updated_at
string

Last update timestamp