Skip to main content
Implementing proper security practices is crucial when working with the Dakota Platform API. Follow these guidelines to keep your integration secure.

API Key Management

Store Keys Securely

Never expose API keys in your code:
Bad Example
Use environment variables instead:
cURL
JavaScript
Python
Go
Rust
Java

Environment Variables Setup

Set up your environment variables properly:
.env file
Shell

Key Rotation

  • Rotate API keys regularly (recommended: every 90 days)
  • Create new keys before deactivating old ones to avoid downtime
  • Have a key rotation process documented and tested

Access Control

  • Limit API key access to only necessary team members
  • Use separate keys for different services or applications
  • Revoke unused or compromised keys immediately

Request Security

Always Use HTTPS

All API requests must use HTTPS. The Dakota Platform API will reject HTTP requests:
JavaScript

Validate SSL Certificates

Ensure your HTTP client validates SSL certificates:
cURL
Node.js
Python
Go
Rust
Java

Request Logging Security

When logging requests for debugging, never log sensitive headers:
cURL
JavaScript
Python
Go
Rust
Java

Production Environment

Base URL

Always use the production base URL (Sandbox coming soon):

Network Security

  • Use private networks or VPNs when possible
  • Monitor network traffic for unusual patterns

Error Handling

Implement secure error handling that doesn’t expose sensitive information:
cURL
JavaScript
Python
Go
Rust
Java

Webhook Security

Verify Webhook Signatures

Webhook signatures use Ed25519 (not HMAC). See Webhooks → Webhook Signature Verification for the canonical algorithm, headers, and code examples in every supported language.

Webhook Endpoint Security

  • Use HTTPS for all webhook endpoints
  • Implement request size limits
  • Add rate limiting to webhook endpoints
  • Validate webhook payload structure

Monitoring and Alerting

Security Monitoring

Set up monitoring for:
  • Unusual API usage patterns
  • Failed authentication attempts
  • Requests from unexpected IP addresses
  • High error rates that might indicate attacks

Logging Security Events

Log security-relevant events:
cURL
JavaScript
Python
Go
Rust
Java

Alert Setup

Configure alerts for:
  • Multiple consecutive API authentication failures
  • Requests from new or suspicious IP addresses
  • Unusual request volume patterns
  • Webhook signature validation failures

Data Protection

Sensitive Data Handling

  • Never log sensitive customer data
  • Use data encryption at rest for stored API responses
  • Implement data retention policies

Security Checklist

Before going to production, verify:
  • API keys stored as environment variables
  • No sensitive data in code or logs
  • HTTPS used for all requests
  • SSL certificate validation enabled
  • Webhook signatures verified
  • Error handling doesn’t expose sensitive info
  • Request/response logging excludes sensitive headers
  • Monitoring and alerting configured
  • Data retention policies implemented
  • Security testing completed

Incident Response

If you suspect a security incident:
  1. Immediately rotate your API keys
  2. Review logs for suspicious activity
  3. Contact Dakota Platform support with incident details
  4. Document the incident and response
  5. Update security measures to prevent recurrence