Skip to main content
POST
Create contract

Authorizations

Authorization
string
header
required

Workspace API key (e.g. formo_xxx). Create one in the Formo dashboard under Team Settings > API.

Headers

Idempotency-Key
string

Optional unique value (e.g. a UUID v4) that lets you safely retry POST/PUT/PATCH/DELETE requests. The first request runs normally; subsequent requests with the same key replay the stored response (status + body) for 24 hours, so retries can never double-create or double-charge. Two concurrent requests with the same key return 409 IDEMPOTENCY_IN_PROGRESS. Generate a fresh key per logical operation.

Maximum string length: 255

Body

application/json
address
string
required

EVM contract address

chain
integer
required

Chain ID

name
string
required
abi
string
required

JSON-stringified ABI

events
object[]
required
Maximum array length: 10
start_block
integer
default:0

Block height recorded on the contract. Note: the events pipeline currently opens every source at the chain head, so this does not backfill historical events. Defaults to 0.

Required range: 0 <= x <= 9007199254740991
include_in_pipeline
boolean
default:false

Whether to include this contract in the project contract-events pipeline. When false the ABI is still cached for transaction decoding, but no events are indexed. Defaults to false (decode-only).

Response

Contract created

name
string
required
chain
integer
required
address
string
required
abi
string
required
events
object[]
required
include_in_pipeline
boolean
required

Whether the contract is configured for the project contract-events pipeline. This is the desired membership, not live deployment state: use the deploy sidecar on the contract list to see what is currently deployed.

start_block
integer