Create Link
Creates a new link in the current workspace. The API enforces plan limits and feature availability for the authenticated organization.
Request body
Need to attach a stored social preview image that already lives on ShortPen? Setsocial_share_image_datato the base64 payload provided by previous uploads or send the legacysocial_share_image_sessionvalue.
Response highlights
data.link— fully qualified link combining the selected domain and slug.data.short_url— same value aslink. Deprecated — will be removed in a future version; migrate todata.link.data.qr— base64-encoded PNG whengenerate_qrevaluates to true; otherwisenull.data.created—truefor newly created links.
message so you can trigger a plan upgrade workflow or notify an operator.
PUT or PATCH /v1/links.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Common fields shared between link creation and editing.
Destination URL the link redirects to.
"https://example.com/launch"
ID of the domain that hosts the link.
Workspace ID. Defaults to the first workspace associated with the organization when omitted.
Optional human-friendly title for the link.
Custom slug appended to the domain instead of an auto-generated code.
Folder to assign the link to.
Query parameters appended to the destination URL.
Whether to create a QR code for the link.
Set to true to associate the link with the specified pixel for event tracking.
Pixel ID used when tracking is enabled.
HTTP redirect status applied when visitors follow the link.
301, 302 If true, cloaks the destination URL.
If true, removes the referrer header for visitors.
Protects the link behind a password.
Password required when with_password is true.
Red channel used when generating QR codes.
0 <= x <= 25545
Green channel used when generating QR codes.
0 <= x <= 255151
Blue channel used when generating QR codes.
0 <= x <= 255123
Controls which logo is embedded inside generated QR codes.
none, custom, uploaded Base64-encoded file used when uploaded_logo_type is uploaded.
Overrides the title shown in social previews.
Overrides the description shown in social previews.
Base64-encoded image used for the social preview.
IDs of the tags to associate with the link. On creation the listed tags are attached. On edit, sending this field replaces the link's tags with the supplied set — an empty array clears every tag, while omitting the field entirely leaves existing tags untouched. Tags must belong to the same workspace and organization; unknown IDs are ignored. A JSON-encoded string of IDs (e.g. "[12,18]") is also accepted for backwards compatibility.
Overrides the private notes shown in ShortPen Links/QRs list.