{"openapi":"3.1.0","info":{"title":"LinkOpen API","version":"1.0.0","summary":"Turn app links such as obsidian://, slack:// and vscode:// into https links that stay clickable.","description":"LinkOpen turns an app link into an https link that Notion, Slack, GitHub, Gmail and other apps keep clickable. Opening it shows a page on linkopen.app that hands the original link to the app. The API makes the same link as the converter on linkopen.app, and reads the app link back out of a LinkOpen link. It is free, needs no key, and stores nothing: the app link is compressed into the https link itself.","termsOfService":"https://linkopen.app/terms","contact":{"name":"LinkOpen","url":"https://linkopen.app/contact"},"license":{"name":"MIT","identifier":"MIT"}},"externalDocs":{"description":"The API page, with examples in curl and JavaScript","url":"https://linkopen.app/integrations/api"},"servers":[{"url":"https://linkopen.app"}],"paths":{"/api/link":{"get":{"operationId":"makeLink","summary":"Make a LinkOpen link from an app link, or read one back","description":"With url, returns the https link for an app link. With link, returns the app link inside a LinkOpen link. Send one or the other. Answers are plain text or, with format=json, JSON. Auto links open the app when clicked; manual links show an Open link button first. Website links are always manual.","parameters":[{"name":"url","in":"query","required":false,"description":"The app link to make a LinkOpen link for, such as obsidian://open?vault=Notes&file=Inbox. It must start with a scheme; javascript:, data: and vbscript: links are refused. At most 2048 characters after spaces at either end are trimmed. Send url or link, not both.","schema":{"type":"string","minLength":1,"maxLength":2048},"example":"obsidian://open?vault=Notes&file=Projects%2FRoadmap"},{"name":"link","in":"query","required":false,"description":"A LinkOpen link to read the app link out of: https://linkopen.app/ followed by s/, 0/ or 1/. Links on www.linkopen.app and the old shortlink.studio address work too. At most 2048 characters after spaces at either end are trimmed. Send url or link, not both.","schema":{"type":"string","minLength":1,"maxLength":2048},"example":"https://linkopen.app/s/1kAHDkPYC4KYM6PAHAFATmAVlAxhGBSATAGIBKYAhgCYC2pADkA"},{"name":"mode","in":"query","required":false,"description":"auto opens the app as soon as the link is clicked; manual shows a page with an Open link button first. Links to websites (http, https) always come back as manual. Ignored with link.","schema":{"type":"string","enum":["auto","manual"],"default":"auto"}},{"name":"format","in":"query","required":false,"description":"text returns just the LinkOpen link, or with link just the app link. json returns the LinkOpen link, the app link and the mode, and errors as {\"error\": \"…\"}.","schema":{"type":"string","enum":["text","json"],"default":"text"}}],"responses":{"200":{"description":"The LinkOpen link, or with link the app link. Plain text by default; JSON with format=json.","headers":{"Access-Control-Allow-Origin":{"description":"Always `*`: any web page may call the API.","schema":{"type":"string","const":"*"}},"Cache-Control":{"description":"Successful answers may be cached for a day.","schema":{"type":"string"}}},"content":{"text/plain":{"schema":{"type":"string","format":"uri"},"examples":{"auto":{"summary":"An app link, as plain text","value":"https://linkopen.app/s/1kAHDkPYC4KYM6PAHAFATmAVlAxhGBSATAGIBKYAhgCYC2pADkA"},"readText":{"summary":"A LinkOpen link read back, as plain text","value":"slack://open"}}},"application/json":{"schema":{"$ref":"#/components/schemas/Link"},"examples":{"manualJson":{"summary":"A manual link, as JSON","value":{"link":"https://linkopen.app/0/slack%3A%2F%2Fchannel%3Fteam%3DT0001%26id%3DC0001","url":"slack://channel?team=T0001&id=C0001","mode":"manual"}},"website":{"summary":"A website link always comes back as manual","value":{"link":"https://linkopen.app/0/https%3A%2F%2Fexample.com%2Flogin","url":"https://example.com/login","mode":"manual"}},"read":{"summary":"A LinkOpen link read back, as JSON","value":{"link":"https://linkopen.app/s/1kAHDkPYC4KYM6PAHAFATmAVlAxhGBSATAGIBKYAhgCYC2pADkA","url":"obsidian://open?vault=Notes&file=Projects%2FRoadmap","mode":"auto"}}}}}},"400":{"description":"No link could be made or read. The message is plain text, or {\"error\": \"…\"} with format=json. An invalid format value always gets plain text.","headers":{"Access-Control-Allow-Origin":{"description":"Always `*`: any web page may call the API.","schema":{"type":"string","const":"*"}}},"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/ErrorMessage"},"examples":{"blocked":{"summary":"A refused scheme, as plain text","value":"javascript: links are not allowed"}}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"noScheme":{"summary":"Text without a scheme, as JSON","value":{"error":"url must start with a scheme, like obsidian:"}},"notLinkOpen":{"summary":"A link that isn’t a LinkOpen link, as JSON","value":{"error":"link is not a LinkOpen link"}}}}}}}}},"/schemes.json":{"get":{"operationId":"listAppLinkFormats","summary":"List the link formats of common apps","description":"The deep link formats of Slack, Obsidian, Zoom, VS Code and other apps, each with an example link and, where there is one, the app’s own documentation. The same list as the URL scheme list on linkopen.app.","responses":{"200":{"description":"The list of app link formats.","headers":{"Access-Control-Allow-Origin":{"description":"Always `*`: any web page may call the API.","schema":{"type":"string","const":"*"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemeList"}}}}}}}},"components":{"schemas":{"Link":{"type":"object","required":["link","url","mode"],"properties":{"link":{"type":"string","format":"uri","description":"The LinkOpen link: the one made, or the one sent, with spaces at either end trimmed."},"url":{"type":"string","description":"The app link it opens, with spaces at either end trimmed."},"mode":{"type":"string","enum":["auto","manual"],"description":"What the link does when clicked: auto opens the app right away, manual shows an Open link button first. Always manual for website links, whatever was asked."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"$ref":"#/components/schemas/ErrorMessage"}}},"ErrorMessage":{"type":"string","description":"What was wrong with the request.","examples":["url is missing","url is longer than 2048 characters","url must start with a scheme, like obsidian:","javascript: links are not allowed","mode must be auto or manual","format must be text or json","send url or link, not both","link is longer than 2048 characters","link is not a LinkOpen link"]},"SchemeList":{"type":"object","required":["schemes"],"properties":{"schemes":{"type":"array","items":{"$ref":"#/components/schemas/Scheme"}}}},"Scheme":{"type":"object","required":["app","scheme","example"],"properties":{"app":{"type":"string","description":"The app’s name.","examples":["Obsidian"]},"scheme":{"type":"string","description":"The prefix, exactly as the app expects it.","examples":["obsidian://"]},"example":{"type":"string","description":"A working example link; IDs in it are placeholders.","examples":["obsidian://open?vault=Notes&file=Inbox"]},"note":{"type":"string","description":"Anything that trips people up."},"docs":{"type":"string","format":"uri","description":"The app’s own documentation of its links."}}}}}}