Skip to content

Create a short link

Create a trackable link and QR target using a local path or HTTP(S) address.

POST/api/v1/links

Authentication

Send your workspace key as xi-api-key or Authorization: Bearer.

links:writewrite

Parameters

Named placeholders belong in the path. Other arguments use a JSON body.

targetRequired
string
placementOptional
string

Response

JSON response with status 200.

Requests and errors →
Illustrative arguments
{
  "target": "YOUR_VALUE",
  "placement": ""
}
Input schema
{
  "type": "object",
  "properties": {
    "target": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "placement": {
      "default": "",
      "type": "string",
      "maxLength": 80
    }
  },
  "required": [
    "target"
  ],
  "additionalProperties": false
}
Response schema
{
  "type": "object",
  "properties": {
    "link": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "target": {
          "type": "string"
        },
        "placement": {
          "type": "string"
        },
        "hits": {
          "type": "number"
        }
      },
      "required": [
        "slug",
        "target",
        "placement",
        "hits"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "link"
  ],
  "additionalProperties": false
}