API Documentation
REST endpoints and cURL examples for CLI tools and automation scripts.
Base URL:
https://x.devh.inGET/api/me
Authenticate requests using either the X-API-Key header or a Bearer token.
curl https://x.devh.in/api/me \ -H "X-API-Key: xdv_your_token_here"
POST/api/tools/short-link
Generate a short link with an optional custom slug and PIN protection.
curl -X POST https://x.devh.in/api/tools/short-link \
-H "X-API-Key: xdv_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/long-url",
"slug": "custom-alias",
"pin": "1234"
}'POST/api/tools/paste
Create a text or code paste with language syntax and burn-after-read support.
curl -X POST https://x.devh.in/api/tools/paste \
-H "X-API-Key: xdv_your_token_here" \
-H "Content-Type: application/json" \
-d '{
"content": "console.log(\"Hello world\");",
"lang": "typescript",
"burn_after_read": false
}'POST/api/tools/file
Stream a binary file up to 10 MB directly to edge storage.
curl -X POST https://x.devh.in/api/tools/file \ -H "X-API-Key: xdv_your_token_here" \ -H "x-filename: archive.tar.gz" \ -H "Content-Type: application/gzip" \ --data-binary @archive.tar.gz
GET/api/logs
Query structured audit logs for your account with pagination.
curl "https://x.devh.in/api/logs?limit=50&offset=0" \ -H "X-API-Key: xdv_your_token_here"