Coinbax API

Authentication

API key management and verification

View as Markdown

Create new API key

POST/api/v1/auth/api-keyX-API-Key

Generate a new API key for a platform. Requires an existing admin-scoped API key. The new API key is only shown once.

Request body

  • namestringrequired

    Platform name (3-100 characters)

  • webhookUrlstring

    Webhook URL for receiving event notifications (must be HTTPS in production)

  • settingsobject

    Additional platform settings

    object

    Additional platform settings

  • scopesarray of enum

    API scopes to grant to this key. If not provided, defaults to read-only scopes.

    array of enum
    enum"read:transactions" · "write:transactions" · "cancel:transactions" · "rescind:transactions" · "read:customers" · "write:customers" · "read:templates" · "write:templates" · "read:disputes" · "write:disputes" · "submit:evidence" · "read:webhooks" · "write:webhooks" · "read:compliance" · "write:compliance" · "read:platform" · "write:platform" · "manage:api-keys" · "admin:platform"

Responses

201API key created successfully
  • apiKeystringrequired

    The generated API key (only shown once)

  • platformIdstringrequired

    Platform ID

  • platformNamestringrequired

    Platform name

  • scopesarray of enumrequired

    API scopes granted to this key

    array of enum
    enum"read:transactions" · "write:transactions" · "cancel:transactions" · "rescind:transactions" · "read:customers" · "write:customers" · "read:templates" · "write:templates" · "read:disputes" · "write:disputes" · "submit:evidence" · "read:webhooks" · "write:webhooks" · "read:compliance" · "write:compliance" · "read:platform" · "write:platform" · "manage:api-keys" · "admin:platform"
  • createdAtstring (date-time)required

    Creation timestamp

  • warningstringrequired

    Important security warning

{
  "apiKey": "cbx_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "platformId": "string",
  "platformName": "string",
  "scopes": [
    "read:transactions",
    "write:transactions",
    "read:customers"
  ],
  "createdAt": "2026-01-15T12:00:00.000Z",
  "warning": "Store this API key securely. It will not be shown again."
}
400Bad request

Response follows the unified success / data / meta / error envelope.

401Missing or invalid API key

Response follows the unified success / data / meta / error envelope.

403Caller lacks admin:platform scope

Response follows the unified success / data / meta / error envelope.

curl -X POST https://api-staging.coinbax.com/api/v1/auth/api-key \
  -H "X-API-Key: $COINBAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My Marketplace",
  "webhookUrl": "https://myapp.com/webhooks/coinbax",
  "settings": {
    "theme": "dark",
    "notifications": true
  },
  "scopes": [
    "read:transactions",
    "write:transactions",
    "read:customers"
  ]
}'
const response = await fetch('https://api-staging.coinbax.com/api/v1/auth/api-key', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.COINBAX_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "My Marketplace",
    "webhookUrl": "https://myapp.com/webhooks/coinbax",
    "settings": {
      "theme": "dark",
      "notifications": true
    },
    "scopes": [
      "read:transactions",
      "write:transactions",
      "read:customers"
    ]
  }),
});
const result = await response.json();

Regenerate API key

POST/api/v1/auth/api-key/regenerateX-API-Key

Generate a new API key for an existing platform. The old key will be invalidated.

Request body

  • platformIdstringrequired

    Platform ID

Responses

200API key regenerated successfully
  • apiKeystringrequired

    The generated API key (only shown once)

  • platformIdstringrequired

    Platform ID

  • platformNamestringrequired

    Platform name

  • scopesarray of enumrequired

    API scopes granted to this key

    array of enum
    enum"read:transactions" · "write:transactions" · "cancel:transactions" · "rescind:transactions" · "read:customers" · "write:customers" · "read:templates" · "write:templates" · "read:disputes" · "write:disputes" · "submit:evidence" · "read:webhooks" · "write:webhooks" · "read:compliance" · "write:compliance" · "read:platform" · "write:platform" · "manage:api-keys" · "admin:platform"
  • createdAtstring (date-time)required

    Creation timestamp

  • warningstringrequired

    Important security warning

{
  "apiKey": "cbx_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
  "platformId": "string",
  "platformName": "string",
  "scopes": [
    "read:transactions",
    "write:transactions",
    "read:customers"
  ],
  "createdAt": "2026-01-15T12:00:00.000Z",
  "warning": "Store this API key securely. It will not be shown again."
}
404Platform not found

Response follows the unified success / data / meta / error envelope.

curl -X POST https://api-staging.coinbax.com/api/v1/auth/api-key/regenerate \
  -H "X-API-Key: $COINBAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "platformId": "123e4567-e89b-12d3-a456-426614174000"
}'
const response = await fetch('https://api-staging.coinbax.com/api/v1/auth/api-key/regenerate', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.COINBAX_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "platformId": "123e4567-e89b-12d3-a456-426614174000"
  }),
});
const result = await response.json();

Get current platform

GET/api/v1/auth/platform/meX-API-Key

Get platform details for the authenticated API key

Headers

  • x-api-keystringrequired
  • X-API-Keystringrequired

    API key

Responses

200Current platform details
object
{}
401Invalid or missing API key

Response follows the unified success / data / meta / error envelope.

curl https://api-staging.coinbax.com/api/v1/auth/platform/me \
  -H "X-API-Key: $COINBAX_API_KEY"
const response = await fetch('https://api-staging.coinbax.com/api/v1/auth/platform/me', {
  headers: {
    'X-API-Key': process.env.COINBAX_API_KEY,
  },
});
const result = await response.json();

Get platform details

GET/api/v1/auth/platform/{id}X-API-Key

Retrieve platform information by ID

Path parameters

  • idstringrequired

Responses

200Platform found
object
{}
404Platform not found

Response follows the unified success / data / meta / error envelope.

curl https://api-staging.coinbax.com/api/v1/auth/platform/<id> \
  -H "X-API-Key: $COINBAX_API_KEY"
const response = await fetch('https://api-staging.coinbax.com/api/v1/auth/platform/<id>', {
  headers: {
    'X-API-Key': process.env.COINBAX_API_KEY,
  },
});
const result = await response.json();

Update platform

PUT/api/v1/auth/platform/{id}X-API-Key

Update platform settings

Path parameters

  • idstringrequired

Request body

  • namestring

    Platform name

  • webhookUrlstring

    Webhook URL

  • isActiveboolean

    Platform active status

  • settingsobject

    Platform settings

    object

    Platform settings

  • scopesarray of enum

    API scopes granted to this platform

    array of enum
    enum"read:transactions" · "write:transactions" · "cancel:transactions" · "rescind:transactions" · "read:customers" · "write:customers" · "read:templates" · "write:templates" · "read:disputes" · "write:disputes" · "submit:evidence" · "read:webhooks" · "write:webhooks" · "read:compliance" · "write:compliance" · "read:platform" · "write:platform" · "manage:api-keys" · "admin:platform"

Responses

200Platform updated successfully
object
{}
404Platform not found

Response follows the unified success / data / meta / error envelope.

curl -X PUT https://api-staging.coinbax.com/api/v1/auth/platform/<id> \
  -H "X-API-Key: $COINBAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "webhookUrl": "string",
  "isActive": true,
  "settings": {},
  "scopes": [
    "read:transactions",
    "write:transactions",
    "read:customers"
  ]
}'
const response = await fetch('https://api-staging.coinbax.com/api/v1/auth/platform/<id>', {
  method: 'PUT',
  headers: {
    'X-API-Key': process.env.COINBAX_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "string",
    "webhookUrl": "string",
    "isActive": true,
    "settings": {},
    "scopes": [
      "read:transactions",
      "write:transactions",
      "read:customers"
    ]
  }),
});
const result = await response.json();

Deactivate platform

DELETE/api/v1/auth/platform/{id}X-API-Key

Deactivate a platform (soft delete)

Path parameters

  • idstringrequired

Responses

204Platform deactivated successfully

Response follows the unified success / data / meta / error envelope.

404Platform not found

Response follows the unified success / data / meta / error envelope.

curl -X DELETE https://api-staging.coinbax.com/api/v1/auth/platform/<id> \
  -H "X-API-Key: $COINBAX_API_KEY"
const response = await fetch('https://api-staging.coinbax.com/api/v1/auth/platform/<id>', {
  method: 'DELETE',
  headers: {
    'X-API-Key': process.env.COINBAX_API_KEY,
  },
});
const result = await response.json();

List all platforms

GET/api/v1/auth/platformsX-API-Key

Get all platforms (admin only)

Responses

200Platforms retrieved successfully
array of Platform
object
[
  {}
]
curl https://api-staging.coinbax.com/api/v1/auth/platforms \
  -H "X-API-Key: $COINBAX_API_KEY"
const response = await fetch('https://api-staging.coinbax.com/api/v1/auth/platforms', {
  headers: {
    'X-API-Key': process.env.COINBAX_API_KEY,
  },
});
const result = await response.json();

Verify API key

POST/api/v1/auth/verifyX-API-Key

Check if an API key is valid and active

Headers

  • x-api-keystringrequired
  • X-API-Keystringrequired

    API key to verify

Responses

200Verification result
  • validbooleanrequired
  • platformIdobjectrequired
    object
  • platformNameobjectrequired
    object
  • isActivebooleanrequired
{
  "valid": true,
  "platformId": {},
  "platformName": {},
  "isActive": true
}
curl -X POST https://api-staging.coinbax.com/api/v1/auth/verify \
  -H "X-API-Key: $COINBAX_API_KEY"
const response = await fetch('https://api-staging.coinbax.com/api/v1/auth/verify', {
  method: 'POST',
  headers: {
    'X-API-Key': process.env.COINBAX_API_KEY,
  },
});
const result = await response.json();