Skip to main content
Learn how to get your API keys and make authenticated requests to the Dakota Platform API.

Getting Your API Keys

Step 1: Access the Dakota Dashboard

To get an API key, you first need access to the Dakota Platform dashboard:
EnvironmentDashboard URL
Productionplatform.dakota.xyz
Sandboxplatform.sandbox.dakota.xyz
New to Dakota? If you don’t have a Dakota account yet, contact our sales team to get started. Once your account is set up, you’ll receive credentials to access the dashboard.

Step 2: Create an API Key

  1. Log into your Dakota Platform dashboard
  2. Navigate to the API Keys section in the sidebar
  3. Click Create New API Key
  4. Give your key a descriptive name (e.g., “Production Server”, “Development Testing”)
  5. Copy and store the key securely — it will only be shown once
API keys are only displayed once when created. Store them securely in your environment variables or secrets management system. If you lose your key, you’ll need to create a new one.

API Key Format

API keys are base64-encoded strings with exactly 60 characters, for example:
  • AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=

API Base URLs

Once you have your API key, use it with the corresponding API base URL:
EnvironmentAPI Base URLUse Case
Sandboxhttps://api.platform.sandbox.dakota.xyzDevelopment and testing
Productionhttps://api.platform.dakota.xyzLive transactions
Start with Sandbox — We recommend building and testing your integration in the sandbox environment first. Sandbox uses simulated data and won’t process real transactions.

Required Headers

All API requests require the X-API-Key header for authentication:
X-API-Key: AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=

POST Requests Only: X-Idempotency-Key

The X-Idempotency-Key header is required for POST requests only to ensure request idempotency:
X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000
  • Use a unique UUID for each POST request
  • Do not include this header for GET, PUT, PATCH, or DELETE requests
  • Helps prevent duplicate operations if a request is retried

Content-Type Header

For requests with a body (POST, PUT, PATCH), include:
Content-Type: application/json

Making Authenticated Requests

GET Request Example

GET requests only need the API key header:
cURL
curl -X GET https://api.platform.dakota.xyz/customers \
  -H "X-API-Key: AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=" \
  -H "Content-Type: application/json"
JavaScript
const response = await fetch('https://api.platform.dakota.xyz/customers', {
  headers: {
    'X-API-Key': 'AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=',
    'Content-Type': 'application/json'
  }
});
Python
import requests

response = requests.get(
    'https://api.platform.dakota.xyz/customers',
    headers={
        'X-API-Key': 'AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=',
        'Content-Type': 'application/json'
    }
)
Go
package main

import (
    "net/http"
)

func main() {
    client := &http.Client{}
    req, _ := http.NewRequest("GET", "https://api.platform.dakota.xyz/customers", nil)
    
    req.Header.Add("X-API-Key", "AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=")
    req.Header.Add("Content-Type", "application/json")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}
Rust
use reqwest::header::{HeaderMap, HeaderValue};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::new();
    
    let mut headers = HeaderMap::new();
    headers.insert("X-API-Key", HeaderValue::from_static("AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc="));
    headers.insert("Content-Type", HeaderValue::from_static("application/json"));
    
    let response = client
        .get("https://api.platform.dakota.xyz/customers")
        .headers(headers)
        .send()
        .await?;
    
    Ok(())
}
Java
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;

public class DakotaGetExample {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.platform.dakota.xyz/customers"))
            .header("X-API-Key", "AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=")
            .header("Content-Type", "application/json")
            .GET()
            .build();
            
        HttpResponse<String> response = client.send(request, 
            HttpResponse.BodyHandlers.ofString());
    }
}

POST Request Example

POST requests require both the API key and idempotency key headers:
cURL
curl -X POST https://api.platform.dakota.xyz/customers \
  -H "X-API-Key: AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=" \
  -H "X-Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Corp", "customer_type": "business"}'
JavaScript
const response = await fetch('https://api.platform.dakota.xyz/customers', {
  method: 'POST',
  headers: {
    'X-API-Key': 'AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=',
    'X-Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Acme Corp',
    customer_type: 'business'
  })
});
Python
import requests
import uuid

response = requests.post(
    'https://api.platform.dakota.xyz/customers',
    headers={
        'X-API-Key': 'AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=',
        'X-Idempotency-Key': str(uuid.uuid4()),
        'Content-Type': 'application/json'
    },
    json={
        'name': 'Acme Corp',
        'customer_type': 'business'
    }
)
Go
package main

import (
    "bytes"
    "net/http"
    "github.com/google/uuid"
)

func main() {
    client := &http.Client{}
    body := bytes.NewBufferString(`{"name": "Acme Corp", "customer_type": "business"}`)
    req, _ := http.NewRequest("POST", "https://api.platform.dakota.xyz/customers", body)
    
    req.Header.Add("X-API-Key", "AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=")
    req.Header.Add("X-Idempotency-Key", uuid.New().String())
    req.Header.Add("Content-Type", "application/json")
    
    resp, _ := client.Do(req)
    defer resp.Body.Close()
}
Rust
use reqwest::header::{HeaderMap, HeaderValue};
use uuid::Uuid;
use serde_json::json;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::new();
    
    let mut headers = HeaderMap::new();
    headers.insert("X-API-Key", HeaderValue::from_static("AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc="));
    headers.insert("X-Idempotency-Key", HeaderValue::from_str(&Uuid::new_v4().to_string())?);
    headers.insert("Content-Type", HeaderValue::from_static("application/json"));
    
    let body = json!({
        "name": "Acme Corp",
        "customer_type": "business"
    });
    
    let response = client
        .post("https://api.platform.dakota.xyz/customers")
        .headers(headers)
        .json(&body)
        .send()
        .await?;
    
    Ok(())
}
Java
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.util.UUID;

public class DakotaApiExample {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        
        String body = """
            {
              "name": "Acme Corp",
              "customer_type": "business"
            }
            """;
        
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.platform.dakota.xyz/customers"))
            .header("X-API-Key", "AHGlPZaxDSMz8Wf1l8VRH4ObdbHiKsWFWnmRyHtiwAc=")
            .header("X-Idempotency-Key", UUID.randomUUID().toString())
            .header("Content-Type", "application/json")
            .POST(HttpRequest.BodyPublishers.ofString(body))
            .build();
            
        HttpResponse<String> response = client.send(request, 
            HttpResponse.BodyHandlers.ofString());
    }
}

Header Summary

HeaderRequired ForPurpose
X-API-KeyAll requestsAuthentication
X-Idempotency-KeyPOST requests onlyPrevent duplicate operations
Content-TypeRequests with bodySpecify JSON content type
Remember: Only include X-Idempotency-Key for POST requests. GET, PUT, PATCH, and DELETE requests should not include this header.