POST /api/v1/operations/prepare_adjust_tiers/plans
Parameters
| Name | Location | Details |
|---|---|---|
X-Juicebox-Account | header / required | Enrolled account identity, including authority chain and lowercase owner address. Enrollment derives this identity before the account exists. |
X-Juicebox-Signer | header / required | Owner wallet or authorized bot address that signed this request. |
X-Juicebox-Issued-At | header / required | Unix seconds, sent as 1–13 decimal digits without leading zeros; at most 30 seconds ahead of server time. |
X-Juicebox-Expires-At | header / required | Unix seconds, sent as 1–13 decimal digits without leading zeros; in the future and within 300 seconds of issuedAt. |
X-Juicebox-Nonce | header / required | Fresh random 32-byte lowercase nonce. A consumed nonce cannot be retried. |
X-Juicebox-Signature | header / required | EIP-712 CenterRequest signature over every signed field. Contract-owner signatures may vary in length. This is a computed request proof, not a reusable API key. |
X-Juicebox-Grant | header / optional | Authorized bot grant ID. Required for a bot; omit for the owner, signing grantId as the empty string. |
Idempotency-Key | header / required | Signed retry identity. Required on plan creation and transaction submission. Preserve exact method, target, Content-Type, and body bytes; use a fresh request nonce and signature. |
Request body
| Field | Type | Details | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
project | object required | Fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account | string required | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tiersToAdd | array required | Fields
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tierIdsToRemove | array required |
JSON schema
{
"type": "object",
"properties": {
"project": {
"type": "object",
"properties": {
"chainId": {
"anyOf": [
{
"type": "number",
"const": 1
},
{
"type": "number",
"const": 10
},
{
"type": "number",
"const": 8453
},
{
"type": "number",
"const": 42161
},
{
"type": "number",
"const": 11155111
},
{
"type": "number",
"const": 11155420
},
{
"type": "number",
"const": 84532
},
{
"type": "number",
"const": 421614
}
]
},
"projectId": {
"type": "string",
"maxLength": 78,
"pattern": "^(0|[1-9][0-9]*)$"
},
"version": {
"default": 6,
"type": "number",
"const": 6
}
},
"required": [
"chainId",
"projectId"
],
"additionalProperties": false
},
"account": {
"type": "string"
},
"tiersToAdd": {
"maxItems": 32,
"type": "array",
"items": {
"type": "object",
"properties": {
"price": {
"description": "Tier price in the tiers currency, with the tiers decimals.",
"type": "string",
"maxLength": 78,
"pattern": "^(0|[1-9][0-9]*)$"
},
"initialSupply": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
},
"votingUnits": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
},
"reserveFrequency": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
},
"reserveBeneficiary": {
"type": "string"
},
"encodedIpfsUri": {
"type": "string",
"pattern": "^0x[a-fA-F0-9]{64}$"
},
"category": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
},
"discountPercent": {
"description": "Tier price discount, out of 200. 200 = free.",
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
},
"flags": {
"type": "object",
"properties": {
"allowOwnerMint": {
"type": "boolean"
},
"useReserveBeneficiaryAsDefault": {
"type": "boolean"
},
"transfersPausable": {
"type": "boolean"
},
"useVotingUnits": {
"type": "boolean"
},
"cantBeRemoved": {
"type": "boolean"
},
"cantIncreaseDiscountPercent": {
"type": "boolean"
},
"cantBuyWithCredits": {
"type": "boolean"
}
},
"required": [
"allowOwnerMint",
"useReserveBeneficiaryAsDefault",
"transfersPausable",
"useVotingUnits",
"cantBeRemoved",
"cantIncreaseDiscountPercent",
"cantBuyWithCredits"
],
"additionalProperties": false
},
"splitPercent": {
"description": "Share of the tier price sent to the tier's splits, out of 1,000,000,000.",
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
},
"splits": {
"maxItems": 32,
"type": "array",
"items": {
"type": "object",
"properties": {
"percent": {
"description": "Share of the split group, out of 1,000,000,000. 500,000,000 = 50%.",
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
},
"projectId": {
"type": "string",
"maxLength": 78,
"pattern": "^(0|[1-9][0-9]*)$"
},
"beneficiary": {
"type": "string"
},
"preferAddToBalance": {
"type": "boolean"
},
"lockedUntil": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
},
"hook": {
"type": "string"
}
},
"required": [
"percent",
"projectId",
"beneficiary",
"preferAddToBalance",
"lockedUntil",
"hook"
],
"additionalProperties": false
}
}
},
"required": [
"price",
"initialSupply",
"votingUnits",
"reserveFrequency",
"reserveBeneficiary",
"encodedIpfsUri",
"category",
"discountPercent",
"flags",
"splitPercent",
"splits"
],
"additionalProperties": false
}
},
"tierIdsToRemove": {
"maxItems": 32,
"type": "array",
"items": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"pattern": "^(0|[1-9][0-9]*)$",
"maxLength": 78
}
]
}
}
},
"required": [
"project",
"account",
"tiersToAdd",
"tierIdsToRemove"
],
"additionalProperties": false
}Response 201
| Field | Type | Details | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id | string (uuid) required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
account | string required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
operation | string required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
draft | object required | Fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commitment | string required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
createdAt | integer required | Unix timestamp in milliseconds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
expiresAt | integer required | Unix timestamp in milliseconds. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
revision | integer required | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
smartAccount | object optional | Fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
status | string required | Values: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
steps | array required | Fields
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
confirmationScope | string required |
JSON schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"account": {
"$ref": "#/components/schemas/Address"
},
"operation": {
"type": "string"
},
"draft": {
"$ref": "#/components/schemas/PlanDraft"
},
"commitment": {
"$ref": "#/components/schemas/Hash"
},
"createdAt": {
"$ref": "#/components/schemas/UnixMilliseconds"
},
"expiresAt": {
"$ref": "#/components/schemas/UnixMilliseconds"
},
"revision": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"smartAccount": {
"type": "object",
"properties": {
"bindingId": {
"$ref": "#/components/schemas/Hash"
},
"stateHash": {
"$ref": "#/components/schemas/Hash"
},
"chainId": {
"$ref": "#/components/schemas/ChainId"
},
"address": {
"$ref": "#/components/schemas/Address"
},
"manifestRevision": {
"$ref": "#/components/schemas/Hash"
}
},
"required": [
"bindingId",
"stateHash",
"chainId",
"address",
"manifestRevision"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"prepared",
"pending",
"partial",
"blocked",
"reorged",
"expired",
"transactions_confirmed"
]
},
"steps": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PlanStep"
},
"minItems": 1,
"maxItems": 32
},
"confirmationScope": {
"type": "string"
}
},
"required": [
"id",
"account",
"operation",
"draft",
"commitment",
"createdAt",
"expiresAt",
"revision",
"status",
"steps",
"confirmationScope"
],
"additionalProperties": false
}