API Documentation

Complete reference for the DivinityCoin API

Authentication

The DivinityCoin API uses API keys or OAuth 2.0 tokens for authentication. Include your credentials in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Public Keys (pk_...)

Read-only access. Safe to use in client-side code.

Private Keys (sk_...)

Full access. Keep secure on your server only.

Authentication

All API requests require authentication via API key or OAuth token.

POST/api/v1/auth/token

Exchange OAuth credentials for an access token

Authentication:OAuth Client ID & Secret

Request Body

{
  "grant_type": "client_credentials",
  "client_id": "oauth_yourcompany_xxx",
  "client_secret": "your_client_secret"
}

Response

{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "Bearer",
  "expires_in": 3600
}

Rate Limits

API requests are rate limited based on your plan tier:

TierRequests/MinuteBurst
Standard100150
Professional500750
Enterprise20003000

Rate limit headers are included in all responses:X-RateLimit-Remaining,X-RateLimit-Reset

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error - Contact support