Third-party API pack template
Base URL, key and docs for an API an app calls.
Open in playground
Adds #api to the browser demo. No account.
Keys
- base_url:url
- https://api.example.com/v1
- api_key:secret
- (encrypted secret, masked)
- docs:url
- https://docs.example.com
- key_expires:date
- 2027-04-01
Example values. Rename, add or remove keys after you create the pack.
In a task
rotate #api.api_key before it expires @2027-03-15 !1
In the terminal
tsk env api
BASE_URL=https://api.example.com/v1
API_KEY='********'
DOCS=https://docs.example.com
KEY_EXPIRES=2027-04-01The real tsk decrypts secrets on your machine and prints them.
Every integration has a base URL, a key and a docs page you need again the day it breaks. This template keeps them together, with the key’s expiry date so rotation is a task, not an outage.
tsk exec api -- sh -c 'curl -H "Authorization: Bearer $API_KEY" "$BASE_URL/status"'
tsk open api.docs
The key is a secret field: encrypted on your device before it syncs, and only tsk on your machine decrypts it.