Integration API

Integrate secure messages into any application

Quick Start

curl
curl -X POST https://cryptnote.pro/api/v1/create.php \
  -H 'Content-Type: application/json' \
  -d '{"content":"Hello API","max_views":1}'
JavaScript
const res = await fetch('/api/v1/create.php', {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({content: 'Hello', max_views: 1})
});

API Base

https://cryptnote.pro/api/v1

Rate Limiting

The API has request limits to ensure availability for all users.

Limits:

  • 60 requests per minute per IP

Response Headers:

Header Description
X-RateLimit-LimitMaximum limit (60)
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp of reset

429 Response (Limit Exceeded):

{
  "success": false,
  "error": "rate_limit_exceeded",
  "message": "Too many requests. Please try again later.",
  "retry_after": 45
}

Recommended Retry Strategy

  • • Check X-RateLimit-Remaining header before making requests
  • • If you receive 429, wait for the time indicated in retry_after
  • • Implement exponential backoff for retries

POST /api/v1/create.php

Create encrypted content

Parameters:

Field Type Description
contentstring*Content (max. 50000)
max_viewsintViews (1-20, default: 1)
passwordstringPassword (4-100 chars)
expire_minutesintExpiration (1-10080 min)
is_markdownboolMarkdown format
is_htmlboolHTML format

Response:

{
  "success": true,
  "share_url": "https://cryptnote.pro/view.php?token=...",
  "token": "abc123..."
}

POST /api/v1/view.php

Read/Decrypt content

This endpoint consumes one view when successful.

Parameters:

tokenstring*Content token
passwordstringPassword (if protected)

Response:

{
  "success": true,
  "content": "... plaintext ...",
  "is_markdown": false,
  "remaining_views": 0
}

POST /api/v1/status.php

Check token status (does not consume view)

Parameters:

tokenstring*Content token

Response:

{
  "success": true,
  "status": "active|expired|not_found",
  "requires_password": false,
  "max_views": 1,
  "remaining_views": 1
}

Common Errors

  • rate_limit_exceeded — Request limit exceeded (wait retry_after seconds)
  • content_required — Empty content
  • invalid_max_views — Out of 1-20 range
  • invalid_expire_minutes — Out of 1-10080 range
  • password_required — Password required
  • not_found_or_expired — Token not found or expired
Back to Home