Who this key is

THE CALL, PART BY PART

method

GET

host

strait.link

version

/v1

resource

/workspace

GET /v1/workspace

Auth: secret key as Authorization: Bearer. Server-side only.

Request

The workspace this secret key belongs to: its name, the link domain every shortUrl uses (linkBase, its custom domain when one is verified, else <handle>.strait.link), verified custom domains, the plan, and the key's own access (full, links or read) and prefix. Any secret key; 30 calls a minute per workspace.

No parameters.

Response

  • 200 The workspace and the key
  • 401 Missing or invalid secret key, or a publishable key
  • 429 Over 30 calls a minute for this workspace
Request · curl
curl -X GET https://strait.link/v1/workspace \
  -H "Authorization: Bearer $SECRET_KEY"

The response, printed

Response 200
{
  "name": "Hilltop Shoes",
  "handle": "hilltop",
  "linkBase": "https://hilltop.strait.link",
  "linkDomain": "hilltop.strait.link",
  "customDomains": [],
  "plan": "starter",
  "key": {
    "scope": "read",
    "prefix": "st_live_ab12"
  }
}