Endpoint reference

POST /api/v1/user-operations

Parameters

NameLocationDetails
X-Juicebox-Accountheader / requiredEnrolled account identity, including authority chain and lowercase owner address. Enrollment derives this identity before the account exists.
X-Juicebox-Signerheader / requiredOwner wallet or authorized bot address that signed this request.
X-Juicebox-Issued-Atheader / requiredUnix seconds, sent as 1–13 decimal digits without leading zeros; at most 30 seconds ahead of server time.
X-Juicebox-Expires-Atheader / requiredUnix seconds, sent as 1–13 decimal digits without leading zeros; in the future and within 300 seconds of issuedAt.
X-Juicebox-Nonceheader / requiredFresh random 32-byte lowercase nonce. A consumed nonce cannot be retried.
X-Juicebox-Signatureheader / requiredEIP-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-Grantheader / optionalAuthorized bot grant ID. Required for a bot; omit for the owner, signing grantId as the empty string.
Idempotency-Keyheader / requiredSigned 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

Option 1
FieldTypeDetails
planIdstring (uuid)
required
stepIndexesarray
required
sessionIdstring (uuid)
optional
sponsorAuthorizationstring
optional
Short-lived server-issued application sponsorship voucher bound to this principal and idempotency key, and to the plan by id and steps or by its exact calls and manifest. Not accepted with sessionId.
Option 2
FieldTypeDetails
planobject
required
A smart-account plan created here, idempotent on its own key, exactly as POST /smart-accounts/bindings/{id}/plans would.
Fields
FieldTypeDetails
bindingIdstring
required
operationstring
required
inputvalue
required
idempotencyKeystring
required
sponsorAuthorizationstring
required
A voucher bound to the plan's exact calls and manifest.
JSON schema
{
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "planId": {
          "$ref": "#/components/schemas/ResourceId"
        },
        "stepIndexes": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 31
          },
          "minItems": 1,
          "maxItems": 16,
          "uniqueItems": true
        },
        "sessionId": {
          "$ref": "#/components/schemas/ResourceId"
        },
        "sponsorAuthorization": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "description": "Short-lived server-issued application sponsorship voucher bound to this principal and idempotency key, and to the plan by id and steps or by its exact calls and manifest. Not accepted with sessionId."
        }
      },
      "required": [
        "planId",
        "stepIndexes"
      ],
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "required": [
              "sessionId"
            ]
          },
          "then": {
            "properties": {
              "stepIndexes": {
                "maxItems": 1
              }
            }
          }
        }
      ],
      "description": "Use the creating principal of a durable smart-account plan. Indices must increase in original order. Omit `sessionId` for current Safe-owner threshold signing; a bound bot supplies `sessionId` for one approved action."
    },
    {
      "type": "object",
      "properties": {
        "plan": {
          "type": "object",
          "properties": {
            "bindingId": {
              "$ref": "#/components/schemas/Hash"
            },
            "operation": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "input": {},
            "idempotencyKey": {
              "type": "string",
              "pattern": "^[A-Za-z0-9:_-]{1,128}$"
            }
          },
          "required": [
            "bindingId",
            "operation",
            "input",
            "idempotencyKey"
          ],
          "additionalProperties": false,
          "description": "A smart-account plan created here, idempotent on its own key, exactly as POST /smart-accounts/bindings/{id}/plans would."
        },
        "sponsorAuthorization": {
          "type": "string",
          "minLength": 1,
          "maxLength": 4096,
          "description": "A voucher bound to the plan's exact calls and manifest."
        }
      },
      "required": [
        "plan",
        "sponsorAuthorization"
      ],
      "additionalProperties": false,
      "description": "One call for a sponsored payment: the plan and the operation over every one of its steps. When the voucher does not cover the plan built, the answer carries the plan alone with `sponsorship: refused`."
    }
  ]
}

Response 201

Option 1
FieldTypeDetails
idstring (uuid)
required
planIdstring (uuid)
required
planCommitmentstring
required
stepIndexesarray
required
chainIdinteger
required
entryPointstring
required
operationobject
required
Unpacked EntryPoint v0.7 operation. RPC integers are hexadecimal quantities; reviewed policy amounts use decimal strings. No v0.8 or EIP-7702 extensions.
Fields
FieldTypeDetails
senderstring
required
noncestring
required
Canonical lowercase hexadecimal RPC quantity, with no leading zeros.
factorystring
optional
factoryDatastring
optional
callDatastring
required
callGasLimitstring
required
Canonical lowercase hexadecimal RPC quantity, with no leading zeros.
verificationGasLimitstring
required
Canonical lowercase hexadecimal RPC quantity, with no leading zeros.
preVerificationGasstring
required
Canonical lowercase hexadecimal RPC quantity, with no leading zeros.
maxFeePerGasstring
required
Canonical lowercase hexadecimal RPC quantity, with no leading zeros.
maxPriorityFeePerGasstring
required
Canonical lowercase hexadecimal RPC quantity, with no leading zeros.
paymasterstring
optional
paymasterVerificationGasLimitstring
optional
Canonical lowercase hexadecimal RPC quantity, with no leading zeros.
paymasterPostOpGasLimitstring
optional
Canonical lowercase hexadecimal RPC quantity, with no leading zeros.
paymasterDatastring
optional
signaturestring
required
Public preparations and reads always omit submitted account signature bytes.

Values: ["0x"]

operationHashstring
required
commitmentstring
required
accountBindingIdstring
required
accountStateHashstring
required
sessionobject
optional
Fields
FieldTypeDetails
idstring (uuid)
required
policyHashstring
required
compiledHashstring
required
generationvalue
required
Positive uint256 as an exact decimal string.
grantIdstring (uuid)
required
permissionIdstring
required
sessionKeystring
required
observationHashstring
required
gasPolicyIdstring
required
providerIdstring
required
createdAtinteger
required
Unix timestamp in milliseconds.
expiresAtinteger
required
Unix timestamp in milliseconds.
revisioninteger
required
statestring
required

Values: ["prepared","submitting","submission_unknown","pending","unknown","confirming","confirmed","reverted","expired"]

signingone of
required
submissionobject
optional
Fields
FieldTypeDetails
commitmentstring
required
startedAtinteger
required
Unix timestamp in milliseconds.
observationobject
optional
Fields
FieldTypeDetails
statestring
required

Values: ["pending","unknown","confirming","confirmed","reverted","expired"]

operationHashstring
required
transactionHashstring
optional
receiptobject
optional
scopedLogsarray
optional
semanticobject
optional
reasonstring
optional
Option 2
FieldTypeDetails
planobject
required
Fields
FieldTypeDetails
idstring (uuid)
required
accountstring
required
operationstring
required
draftobject
required
commitmentstring
required
createdAtinteger
required
Unix timestamp in milliseconds.
expiresAtinteger
required
Unix timestamp in milliseconds.
revisioninteger
required
smartAccountobject
optional
statusstring
required

Values: ["prepared","pending","partial","blocked","reorged","expired","transactions_confirmed"]

stepsarray
required
confirmationScopestring
required
operationobject
optional
Fields
FieldTypeDetails
idstring (uuid)
required
planIdstring (uuid)
required
planCommitmentstring
required
stepIndexesarray
required
chainIdinteger
required
entryPointstring
required
operationobject
required
Unpacked EntryPoint v0.7 operation. RPC integers are hexadecimal quantities; reviewed policy amounts use decimal strings. No v0.8 or EIP-7702 extensions.
operationHashstring
required
commitmentstring
required
accountBindingIdstring
required
accountStateHashstring
required
sessionobject
optional
gasPolicyIdstring
required
providerIdstring
required
createdAtinteger
required
Unix timestamp in milliseconds.
expiresAtinteger
required
Unix timestamp in milliseconds.
revisioninteger
required
statestring
required

Values: ["prepared","submitting","submission_unknown","pending","unknown","confirming","confirmed","reverted","expired"]

signingone of
required
submissionobject
optional
observationobject
optional
sponsorshipstring
required

Values: ["accepted","refused"]

JSON schema
{
  "oneOf": [
    {
      "$ref": "#/components/schemas/UserOperation"
    },
    {
      "$ref": "#/components/schemas/SponsoredPaymentPreparation"
    }
  ]
}