Skip to content

Create a share link

POST
/v1/share-links
curl --request POST \
--url https://api.pixonaut.app/v1/share-links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "kind": "proof-page", "locale": "sv", "mayDecide": true, "subjectId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c" }'

Operation ID: shareLinks.create

Opens one hosted page about one template, design or order to whoever holds the link. Answers with the token, which is never shown again. A member may hand out only what they hold themselves; a printshop page takes printshops:update, an address capture page orders:create. A connected store’s integration key hands out what its grants hold, such as a deciding proof page it emails its customer, who approves or rejects there; the page is drawn in the brand named by brandId, or the workspace’s default.

Media typeapplication/json
object
brandId

The brand the link’s page is drawn in: its name, logo and accent colour (GET /v1/brands). Refused brand_not_found unless it is one of the workspace’s. Absent, a link a connected store’s key hands out keeps the store’s brand, and any other is drawn in whichever brand is the workspace’s default when it opens. A brand a link that still opens names cannot be deleted.

string
>= 1 characters
designLimit

A designer only: how many designs its page may make, in total or per rolling hour, day or week. Each side approved counts one. At the limit the page, and an approval, answer 429 link_design_limit. Refused design_limit_not_allowed for any other kind. Absent, no limit.

object
count
required

How many designs the link may make in its period.

integer
>= 1 <= 10000
period
required

total counts every design the link made; hour, day and week the last 60 minutes, 24 hours or 7 days, rolling.

string
Allowed values: total hour day week
expiresInDays

How long the link works, in days. Absent, the kind’s default; a designer then never expires. Each kind has a cap, named in the refusal when exceeded.

integer
> 0 <= 365
kind
required

The page the link opens. A correction link is minted for its design by POST /v1/designs/{id}/correction-links.

string
Allowed values: designer proof-page order-status printshop address-capture
locale

A proof page only: the language it is shown in, one of en, sv, de, fr, es, nl, da, nb, fi. Absent, the page is shown in the workspace’s default language. The link’s url carries ?lang=<locale> when it names one. Refused locale_not_allowed for any other kind.

string
Allowed values: en sv de fr es nl da nb fi
mayDecide

A proof page only: whether its holder may approve or reject the design. Handing that out takes designs:update as well as designs:read.

boolean
name

The workspace’s own name for the link (Spring market stand), at most 80 characters, never shown on its page. Trimmed, inner spaces made one; empty is no name. Unique among the workspace’s working links, case aside: one another holds is refused share_link_name_taken naming the holder, a longer one share_link_name_too_long. A withdrawn or expired link frees its name.

string
orderId

An address capture page only: the one order of the design its answer reads and changes, whatever orders of the design are placed later. Refused order_not_found unless it holds a print of the design (and, for a connected store, the store placed it), order_closed once it has shipped, will not be made or its personal data was erased, and order_not_allowed for any other kind. Absent, the page reads and changes the design’s newest open order.

string
>= 1 characters <= 255 characters
placementFrame

A designer only: whether its page draws the placement frame, the ring and corner handles around the shopper’s picture, at rest, as the SDK’s showPlacementFrame does. Refused placement_frame_not_allowed for any other kind. Absent, the frame shows only while the picture is dragged or sized on the preview.

boolean
printAreaFrame

A designer only: whether its page draws a thin frame around the print area on the product photo, as the SDK’s showPrintAreaFrame does. Refused print_area_frame_not_allowed for any other kind. Absent, no frame.

boolean
returnUrl

A proof page only: where it sends the customer once they have asked for changes, with state, so the store can open the design for editing. Refused return_url_not_allowed for any other kind: a designer that returns to a store is minted by POST /v1/templates/{id}/designer-links, a correction page by POST /v1/designs/{id}/correction-links. On one of the origins the tenant’s publishable keys are allowed on.

string
<= 2048 characters
state

Carried back to returnUrl untouched, for the store to match the customer to its own session. Only with returnUrl.

string
>= 1 characters <= 512 characters
subjectId
required

What the page is about: a template’s base id for a designer, a design’s id for a proof page or address capture, an order’s id for an order status or printshop page.

string
>= 1 characters <= 255 characters

Examples

A connected store, from connect to delivery: 5. Or let the customer decide on a proof page

{
"kind": "proof-page",
"locale": "sv",
"mayDecide": true,
"subjectId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c"
}

The new link

Media typeapplication/json
object
brandId
required

The brand the link’s page is drawn in; null for the workspace’s default, whichever that is when it opens.

string | null
createdAt
required
number
designLimit
required

How many designs a designer link may make; null for none.

object
count
required

How many designs the link may make in its period.

integer
>= 1 <= 10000
period
required

total counts every design the link made; hour, day and week the last 60 minutes, 24 hours or 7 days, rolling.

string
expiresAt
required

When the link stops working; null for one that never does.

number | null
id
required
string
kind
required
string
locale
required

The language the link’s page is shown in, which its url names as ?lang=<locale>; null when it names none, and the page is shown in the workspace’s default language.

string | null
mayDecide
required
boolean
name
required

The workspace’s name for the link.

string | null
placementFrame
required

Whether a designer link’s page draws the placement frame around the shopper’s picture at rest; false for every other link.

boolean
printAreaFrame
required

Whether a designer link’s page draws the print area’s frame; false for every other link.

boolean
returnUrl
required
string | null
subjectId
required
string
token
required

The link’s token. Shown in this response only.

string
url
required

The hosted page the link opens, with ?lang=<locale> when the link names a locale.

string

Examples

A connected store, from connect to delivery: 5. Or let the customer decide on a proof page

{
"brandId": null,
"createdAt": 1790000050000,
"designLimit": null,
"expiresAt": 1792592050000,
"id": "0b1c2d3e-4f50-4a6b-8c7d-000000000010",
"kind": "proof-page",
"locale": "sv",
"mayDecide": true,
"name": null,
"placementFrame": false,
"printAreaFrame": false,
"returnUrl": null,
"subjectId": "6f1c8a2b-3d4e-4f5a-8b6c-7d8e9f0a1b2c",
"token": "EXAMPLE_share_link_token_not_a_real_one_000",
"url": "https://app.pixonaut.example/h/proof/EXAMPLE_share_link_token_not_a_real_one_000?lang=sv"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: decide_not_allowed, return_url_not_allowed, return_url_not_https, return_url_off_store, locale_not_allowed, design_limit_not_allowed, print_area_frame_not_allowed, placement_frame_not_allowed, order_not_allowed, expiry_too_long, invalid_input

Media typeapplication/json
object
error
required
string
kind

Always sent with expiry_too_long.

string
maxDays

Always sent with expiry_too_long.

number
reason

Always sent with invalid_input.

string

Examples

decide_not_allowed

{
"error": "decide_not_allowed"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: unauthorized

Media typeapplication/json
object
error
required
string

Examples

Exampleunauthorized

unauthorized

{
"error": "unauthorized"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: plan_limit_reached, origin_forbidden, feature_disabled

Media typeapplication/json
object
error
required
string
feature

The feature the tenant does not have. Always sent with feature_disabled.

string
limit

The limit the tenant is at: templates, connectedStores, apiKeys, shareLinks, customDomains, printsMadePerMonth (prints made without an order this month), members, orders (this month’s orders, which getting a print’s files without an order counts as), or a sandbox’s own caps: sandboxPrintsPerDay, sandboxPrintsPerMonth, sandboxOrdersPerMonth. A sandbox shares every other limit with its live workspace. Always sent with plan_limit_reached.

string
max

How many the plan allows. Always sent with plan_limit_reached.

number
plan

The plan whose limit it is. Always sent with plan_limit_reached.

string

Examples

feature_disabled

{
"error": "feature_disabled",
"feature": "api"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: subject_not_found, order_not_found, brand_not_found, not_found

Media typeapplication/json
object
error
required
string

Examples

brand_not_found

{
"error": "brand_not_found"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: share_link_name_taken, order_closed

Media typeapplication/json
object
closed

Always sent with order_closed.

string
error
required
string
holderId

The link holding the name. Always sent with share_link_name_taken.

string | null

Examples

order_closed

{
"closed": "shipped",
"error": "order_closed"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: share_link_name_too_long, payload_too_large

Media typeapplication/json
object
bytes

Sent with payload_too_large.

number
error
required
string
maxBytes

Always sent with payload_too_large.

number
maxLength

The longest name a link may have. Always sent with share_link_name_too_long.

integer

Examples

payload_too_large

{
"error": "payload_too_large",
"maxBytes": 0
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: rate_limited

Media typeapplication/json
object
error
required
string

Examples

Examplerate_limited

rate_limited

{
"error": "rate_limited"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: db_error. A request that failed unexpectedly answers as text instead.

object
error
required
string

Examples

Exampledb_error

db_error

{
"error": "db_error"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Refused: lock_timeout

Media typeapplication/json
object
error
required
string

Examples

Examplelock_timeout

lock_timeout

{
"error": "lock_timeout"
}
X-Request-Id
required
string

Every response names the request it answers in X-Request-Id: the id the request was sent with in that header, when it is well formed, else one the API gave it. Quote it when reporting a refusal or a failure: the API’s log lines for that request carry it.

Questions? Write to [email protected].

Status · Terms of service · Privacy policy · Subprocessors