PATCH
Enable or disable coin auto-funding
Toggles auto-funding for a single coin in an opted-in enterprise.
enable upserts the enrollment with status pending (the FeeWorker
re-provisions thresholds and transitions it to active); disable
sets status disabled and the auto-funding cron skips the coin.
Requires an existing opt-in — call
POST /api/gas-tank/v1/enterprises/{enterpriseId} first.
Path Params
-
enterpriseIdstring requiredEnterprise identifier
Body Params
object
Coin and action to enable or disable enterprise auto-funding. The action determines whether funding is enabled or disabled for the coin.
-
coinstring requiredCoin to enable or disable -
actionstring enum requiredUser intent.enablesets statuspending(FeeWorker provisions thresholds and transitions toactive).disablesets statusdisabled; the threshold is preserved but the funding cron skips the coin.enabledisable
Responses
200
OK
Response Body
object
-
enrollmentobject requiredAuto-funding enrollment state for one coin in an enterpriseenrollment object
-
coinstring requiredCoin identifier -
statusstring enum requiredEnrollment 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 -
versionnumber requiredMonotonic write counter for optimistic concurrency -
lastErrorstring nullable requiredPopulated only when status is error; null otherwise -
updatedAtstring requiredISO 8601 timestamp of the last state change
-
404
Not Found
Response Body
object
-
errorstring required
409
Conflict
Response Body
object
-
errorstring required
422
Unprocessable Entity
Response Body
object
-
errorstring required