Skip to main content
PUT
Node.js

Authorizations

Authorization
string
header
required

A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...

Headers

Idempotency-Key
string

A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.

Path Parameters

storeId
string
required

The store's ID. A key reaches the store it was made in: GET /key answers which.

Body

application/json
enabled
boolean
default:false

Whether the storefront shows it.

couponId
string

The coupon it hands out.

title
string

Its heading, up to 80 characters.

message
string

The line under the heading, up to 240 characters.

buttonText
string

What its button says, up to 30 characters.

opens
enum<string>
default:delay

After a wait, or when the visitor looks like leaving.

Available options:
delay,
leave
delaySeconds
integer
default:5

How long the wait is when opens is delay: 0 to 120 seconds.

frequency
enum<string>
default:visit

How often one visitor sees it: on every page, once a visit, or once in that browser.

Available options:
page,
visit,
browser

Response

It worked.

success
boolean
message
unknown
code
unknown
data
object