Documentation
Developer API
Integrate secure, ephemeral sharing directly into your applications. Our simple REST API allows you to programmatically generate self-destructing secrets with custom aliases.
Fast Integration
Standard REST API that works with any language or framework.
Secure by Default
All data is encrypted and immediately purged after being read.
Bearer Auth
Simple token-based authentication via your Developer Dashboard.
Base URL
https://www.ilusion.io/api
Authentication
All API requests require an API Key passed in the Authorization header as a Bearer token. You can generate your keys in the Developer Dashboard.
Authorization: Bearer {YOUR_API_KEY}
Create Secret
POST/secrets/create
curl -X POST https://www.ilusion.io/api/secrets/create \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"encryptedContent": "This is a secret message",
"expiresInHours": 24,
"alias": "my-custom-link"
}'Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| encryptedContent | string | Yes | The text content to store. |
| expiresInHours | number | No | Expiration time (1-168). Defaults to 24. |
| alias | string | No | Custom URL slug (letters, numbers, hyphens). |
| passwordHash | string | No | SHA-256 hash if password protection is needed. |
Response Format
200 OK
{
"id": "Xk9mZ7pQ",
"expiresAt": "2024-05-15T14:30:00.000Z",
"link": "https://www.ilusion.io/secret/my-custom-link"
}Start Automating Today
Ready to get your API keys? Create an account or sign in to your dashboard.