Getting started

Everything you need for your first successful API call.

1. Get an API key

API keys are issued by the platform administrator when your access request is approved. Keys look like sk_live_… (production) or sk_test_… (testing) and are shown exactly once — store them in a secret manager, never in source control.

2. Send authenticated requests

Pass your key in the X-API-Key header (or as a Bearer token) on every request:

curl https://storage.devd.org/api/v1/containers \
  -H "X-API-Key: sk_live_YOUR_KEY"

# Equivalent:
curl https://storage.devd.org/api/v1/containers \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

3. Understand the response envelope

Every JSON response uses the same structure:

// Success
{
  "success": true,
  "data": { ... },
  "requestId": "req_a1b2c3d4"
}

// Error
{
  "success": false,
  "error": {
    "code": "FILE_NOT_FOUND",
    "message": "The requested file was not found.",
    "details": {}
  },
  "requestId": "req_a1b2c3d4"
}

Keep the requestId from any failed call — it lets support trace the exact request in the audit log.

4. Upload, list, download

# Upload (multipart)
curl -X POST "https://storage.devd.org/api/v1/containers/contracts/files" \
  -H "X-API-Key: sk_live_YOUR_KEY" \
  -F "file=@agreement.pdf"

# List container root
curl "https://storage.devd.org/api/v1/containers/contracts/items" \
  -H "X-API-Key: sk_live_YOUR_KEY"

# Download (use the file id from the upload/list response)
curl -L "https://storage.devd.org/api/v1/containers/contracts/files/file_XXXX/content" \
  -H "X-API-Key: sk_live_YOUR_KEY" -o agreement.pdf

Identifiers

The API only ever exposes opaque public identifiers such as file_…, folder_…, container_… and job_…. Internal storage identifiers are never visible and cannot be passed in.