REST APIEnterpriseGas Tanks

POST

First-time-only enrollment into auto-funding. Creates one enrollment row per coin with status pending; the background FeeWorker then provisions thresholds and transitions each coin to active. Once any enrollment exists for the enterprise this endpoint is closed — subsequent per-coin changes must use PATCH /api/gas-tank/v1/enterprises/:enterpriseId/coin.

Path Params

  • enterpriseId string required
    Enterprise identifier

    at least 1 characters

Body Params

object

Coins to enroll in auto-funding for the enterprise. Each coin must be supported and have a configured enterprise fee address.
  • coins array of strings required

Responses

200
OK

Response Body

object

  • enrollments array of objects required
    enrollments object
    • coin string required
      Coin identifier
    • status string enum required
      Enrollment lifecycle state: pending = opted in, FeeWorker is provisioning thresholds. active = monitored and funded by the auto-funding cron. disabled = funding paused for this coin. error = provisioning failed; see lastError.
      pendingactiveerrordisabled
    • version number required
      Monotonic write counter for optimistic concurrency
    • lastError string nullable required
      Populated only when status is error; null otherwise
    • updatedAt string required
      ISO 8601 timestamp of the last state change
403
Forbidden

Response Body

object

  • error string required
409
Conflict

Response Body

object

  • error string required
422
Unprocessable Entity

Response Body

object

  • error string required