Capsulink API 1.0
Request and Response data format is JSON.
- Capsulink API is a Premium feature. Check your limits at our pricing page
- Use with any programming language and environment: PHP, Python, Node.js, JavaScript, TypeScript, C/C++, C#, Java, Go, R, Swift, Ruby, Perl, Kotlin, Rust, Scala, Erlang, Haskell, Objective C and more.
- If you're looking for some help contact our support
- For more information about Capsulink, you can visit our features page.
Get an API Key
Create a new API key (or get one from your Settings).
Request
curl https://www.capsulink.com/api/login \
-d '{"username":"<Username or email>","password":"<Password>"}'
Response
{
"status":"success",
"data":{
"api_key":"<Some API key>"
}
}
Change capsule branded domain
Pass empty domain to reset default.
Request
curl https://www.capsulink.com/api/set_domain \
-H 'Api-Key: <Some API key>' \
-d '{"id":"<Capsule ID>","domain":"<Your domain>"}'
Response
{
"status":"success",
"data":{
"id":"<Capsule ID>",
"short_url":"<Short URL>",
"redirect_url":"http:\/\/<Your domain>\/<Short URL>",
"stats_url":"http:\/\/<Your domain>\/<Short URL>+",
"url":"<Some URL>",
"folder":"<Folder Name>|None",
"private":0|1,
"password_protected":0|1,
"title":"<Title>"
}
}
Change capsule short URL
Pass empty short URL to reset default.
Request
curl https://www.capsulink.com/api/set_short_url \
-H 'Api-Key: <Some API key>' \
-d '{"id":"<Capsule ID>","short_url":"<Your short URL>"}'
Response
{
"status":"success",
"data":{
"id":"<Capsule ID>",
"short_url":"<Your short URL>",
"redirect_url":"https:\/\/cli.re\/<Your short URL>",
"stats_url":"https:\/\/cli.re\/<Your short URL>+",
"url":"<Some URL>",
"folder":"<Folder Name>|None",
"private":0|1,
"password_protected":0|1,
"title":"<Title>"
}
}
Change capsule password
Pass empty string to remove password.
Request
curl https://www.capsulink.com/api/set_password \
-H 'Api-Key: <Some API key>' \
-d '{"id":"<Capsule ID>","password":"<Password>"}'
Response
{
"status":"success",
"data":{
"id":"<Capsule ID>",
"short_url":"<Your short URL>",
"redirect_url":"https:\/\/cli.re\/<Your short URL>",
"stats_url":"https:\/\/cli.re\/<Your short URL>+",
"url":"<Some URL>",
"folder":"<Folder Name>|None",
"private":0|1,
"password_protected":0|1,
"title":"<Title>"
}
}
Change capsule title
Pass empty string to reset to auto mode.
Request
curl https://www.capsulink.com/api/set_title \
-H 'Api-Key: <Some API key>' \
-d '{"id":"<Capsule ID>","title":"<Title>"}'
Response
{
"status":"success",
"data":{
"id":"<Capsule ID>",
"short_url":"<Your short URL>",
"redirect_url":"https:\/\/cli.re\/<Your short URL>",
"stats_url":"https:\/\/cli.re\/<Your short URL>+",
"url":"<Some URL>",
"folder":"<Folder Name>|None",
"private":0|1,
"password_protected":0|1,
"title":"<Title>"
}
}
Change capsule folder
Pass empty folder name to reset default.
Request
curl https://www.capsulink.com/api/set_folder \
-H 'Api-Key: <Some API key>' \
-d '{"id":"<Capsule ID>","folder":"<Folder Name>"}'
Response
{
"status":"success",
"data":{
"id":"<Capsule ID>",
"short_url":"<Your short URL>",
"redirect_url":"https:\/\/cli.re\/<Your short URL>",
"stats_url":"https:\/\/cli.re\/<Your short URL>+",
"url":"<Some URL>",
"folder":"<Folder Name>|None",
"private":0|1,
"password_protected":0|1,
"title":"<Title>"
}
}