Skip to main content
POST
/
api
/
v1
/
policies
Purchase a policy via the relayer
curl --request POST \
  --url https://lumina-api-production-ac85.up.railway.app/api/v1/policies \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "productId": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coverageAmount": "1000000",
  "asset": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "buyer": "0x0000000000000000000000000000000000000000"
}
'
{
  "ok": true,
  "txHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "policyId": "1000000",
  "buyer": "0x0000000000000000000000000000000000000000",
  "productId": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "coverageAmount": "1000000",
  "premiumPaid": "1000000",
  "blockNumber": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.lumina-org.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Issued via POST /api/v1/agent/onboard or POST /api/v1/keys/generate. Format: lk_<64-hex>.

Headers

Idempotency-Key
string

Optional per-agent idempotency key. Repeating a request with the same key returns the cached response.

Maximum string length: 128

Body

application/json
productId
string
required

32-byte 0x-prefixed hex string (e.g. a productId or txHash).

Pattern: ^0x[0-9a-fA-F]{64}$
Example:

"0x0000000000000000000000000000000000000000000000000000000000000000"

coverageAmount
string
required

USDC base units (6 decimals).

Pattern: ^\d+$
Example:

"1000000"

asset
string
required

32-byte 0x-prefixed hex string (e.g. a productId or txHash).

Pattern: ^0x[0-9a-fA-F]{64}$
Example:

"0x0000000000000000000000000000000000000000000000000000000000000000"

buyer
string
required

Ethereum 0x-prefixed checksummed or lowercase address.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x0000000000000000000000000000000000000000"

Response

Idempotent replay (same Idempotency-Key already processed).

ok
boolean
required
Example:

true

txHash
string
required

32-byte 0x-prefixed hex string (e.g. a productId or txHash).

Pattern: ^0x[0-9a-fA-F]{64}$
Example:

"0x0000000000000000000000000000000000000000000000000000000000000000"

policyId
string
required

A non-negative integer encoded as a decimal string (used for token amounts, prices, and other on-chain bigint values).

Pattern: ^\d+$
Example:

"1000000"

buyer
string
required

Ethereum 0x-prefixed checksummed or lowercase address.

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x0000000000000000000000000000000000000000"

productId
string
required

32-byte 0x-prefixed hex string (e.g. a productId or txHash).

Pattern: ^0x[0-9a-fA-F]{64}$
Example:

"0x0000000000000000000000000000000000000000000000000000000000000000"

coverageAmount
string
required

A non-negative integer encoded as a decimal string (used for token amounts, prices, and other on-chain bigint values).

Pattern: ^\d+$
Example:

"1000000"

premiumPaid
string
required

A non-negative integer encoded as a decimal string (used for token amounts, prices, and other on-chain bigint values).

Pattern: ^\d+$
Example:

"1000000"

blockNumber
integer | null