Coinbax API

Platform

View as Markdown

Get platform configuration

GET/api/v2/platform/configOAuth 2.0 client credentials

Returns contract deployments, templates, and settings for the authenticated platform

Query parameters

  • networkstring

    Filter by specific network (e.g., base, base-sepolia)

  • includeTemplateboolean

    Include full template details (default: true)

Responses

200Platform configuration returned successfully
  • platformobject
    • idstring
    • namestring
  • contractsarray of object
    array of object
    • networkstring
    • addressstring
    • isSharedboolean
    • templateIdstring
    • templateobject
      object
{
  "platform": {
    "id": "string",
    "name": "string"
  },
  "contracts": [
    {
      "network": "string",
      "address": "string",
      "isShared": true,
      "templateId": "string",
      "template": {}
    }
  ]
}
401Invalid or missing OAuth token
  • successbooleanrequired

    Always `false` on an error response.

  • dataenumrequired

    Always `null` on an error response. Present so success and error bodies share a shape.

    enumnull

    Always `null` on an error response. Present so success and error bodies share a shape.

  • metaErrorResponseMetaDtorequired
    • timestampstringrequired

      ISO 8601 timestamp of the response.

    • requestIdstringrequired

      Request id for this response. Echoes the `X-Request-ID` or `X-Correlation-ID` you sent, whatever its format; when you send neither, the server generates a UUID v4. Quote it when reporting a problem — it is how the request is found in our logs.

    • pathstringrequired

      Request path that produced the error.

    • methodstringrequired

      HTTP method of the request that produced the error.

  • errorApiErrorDtorequired
    • codestringrequired

      Machine-readable error code. Branch on this rather than on `message`, which is free text and may change. Deliberately an open string, NOT a closed enum. Two families of code reach this field: - the status-derived codes in `ErrorCode` (VALIDATION_ERROR, NOT_FOUND, RATE_LIMIT_EXCEEDED, and so on), which `AllExceptionsFilter` assigns from the HTTP status; - domain-specific codes a service sets on the exception it throws, such as `ESCROW_ALREADY_CREATED`, `PRE_ESCROW_PENDING` or `RELEASE_WINDOW_NOT_ELAPSED`. The second family is the larger one, so publishing `ErrorCode` as an enum would make a strict client reject most real error responses. Treat an unrecognised code as its HTTP status.

    • messagestringrequired

      Human-readable description of what went wrong.

    • statusCodenumberrequired

      HTTP status code, repeated here so the body is self-contained.

    • detailsone of

      Structured context for the error, such as per-field validation messages. Shape varies by `code`; treat it as opaque unless you recognise the code.

      • object
        object
      • array of object
        array of object
        object
      • string
        string
    • suggestionstring

      Actionable guidance for fixing the request, intended to be shown to a person. Advice, not data.

{
  "success": false,
  "data": null,
  "meta": {
    "timestamp": "2026-11-06T12:34:56.789Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "path": "/api/v1/transactions",
    "method": "POST"
  },
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "statusCode": 400,
    "details": {
      "amount": "must be a positive number"
    },
    "suggestion": "Use one of: base, ethereum"
  }
}
403Insufficient scopes
  • successbooleanrequired

    Always `false` on an error response.

  • dataenumrequired

    Always `null` on an error response. Present so success and error bodies share a shape.

    enumnull

    Always `null` on an error response. Present so success and error bodies share a shape.

  • metaErrorResponseMetaDtorequired
    • timestampstringrequired

      ISO 8601 timestamp of the response.

    • requestIdstringrequired

      Request id for this response. Echoes the `X-Request-ID` or `X-Correlation-ID` you sent, whatever its format; when you send neither, the server generates a UUID v4. Quote it when reporting a problem — it is how the request is found in our logs.

    • pathstringrequired

      Request path that produced the error.

    • methodstringrequired

      HTTP method of the request that produced the error.

  • errorApiErrorDtorequired
    • codestringrequired

      Machine-readable error code. Branch on this rather than on `message`, which is free text and may change. Deliberately an open string, NOT a closed enum. Two families of code reach this field: - the status-derived codes in `ErrorCode` (VALIDATION_ERROR, NOT_FOUND, RATE_LIMIT_EXCEEDED, and so on), which `AllExceptionsFilter` assigns from the HTTP status; - domain-specific codes a service sets on the exception it throws, such as `ESCROW_ALREADY_CREATED`, `PRE_ESCROW_PENDING` or `RELEASE_WINDOW_NOT_ELAPSED`. The second family is the larger one, so publishing `ErrorCode` as an enum would make a strict client reject most real error responses. Treat an unrecognised code as its HTTP status.

    • messagestringrequired

      Human-readable description of what went wrong.

    • statusCodenumberrequired

      HTTP status code, repeated here so the body is self-contained.

    • detailsone of

      Structured context for the error, such as per-field validation messages. Shape varies by `code`; treat it as opaque unless you recognise the code.

      • object
        object
      • array of object
        array of object
        object
      • string
        string
    • suggestionstring

      Actionable guidance for fixing the request, intended to be shown to a person. Advice, not data.

{
  "success": false,
  "data": null,
  "meta": {
    "timestamp": "2026-11-06T12:34:56.789Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "path": "/api/v1/transactions",
    "method": "POST"
  },
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "statusCode": 400,
    "details": {
      "amount": "must be a positive number"
    },
    "suggestion": "Use one of: base, ethereum"
  }
}
# Exchange the client ID and secret for an access token (requires jq)
ACCESS_TOKEN=$(jq -n '{grant_type: "client_credentials", client_id: env.COINBAX_CLIENT_ID, client_secret: env.COINBAX_CLIENT_SECRET, scope: "read:platform"}' |
  curl -sS -X POST https://api-staging.coinbax.com/api/v2/oauth/token \
    -H "Content-Type: application/json" \
    -d @- |
  jq -r .data.access_token)

# Call the endpoint with the token
curl 'https://api-staging.coinbax.com/api/v2/platform/config' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
// getPaymentsToken() is the cached client_credentials helper in /docs/api/authentication
const response = await fetch('https://api-staging.coinbax.com/api/v2/platform/config', {
  headers: {
    Authorization: `Bearer ${await getPaymentsToken()}`,
  },
});
const result = await response.json();