5 min read
Automate archiving with the API
Everything you can do by swapping a domain, you can do programmatically.
Authenticate
Pass your key as a bearer token:
curl https://anypost.md/api/convert \
-H "Authorization: Bearer ak_live_your_key" \
-G --data-urlencode "url=https://x.com/user/status/123"
Schedule a daily backup
A tiny cron job can archive a list of accounts every morning:
0 6 * * * /usr/local/bin/anypost-backup.sh
Handle rate limits gracefully
The API returns standard HTTP status codes. On a 429, back off and retry with
exponential delay. Credit packs never expire, so batch jobs are safe to run on a
schedule.