Snag Docs logo

Create a contract

POSThttps://admin.snagsolutions.io/api/contracts

Create a contract

Loading code example
Loading code example

Authorizations

apiKeyAuthstringheaderrequired

API key passed in the header.

Body

Body

namestringrequired
Length: <= 40
addressstringrequired

The address of the contract

chainIdnumberrequired
abiany
type"erc20" | "erc721" | "erc1155" | "custom"required
Allowed values: "erc20" | "erc721" | "erc1155" | "custom"
organizationIdstring<uuid>required
websiteIdstring<uuid>required
iconUrlstring<uri>

Response

application/json

201

idstring<uuid>required

Unique identifier for the contract

namestringrequired

Name of the contract

Length: <= 40
addressstringrequired

Contract address matching the required format

Pattern: ^0x[a-fA-F0-9]{40}$
chainIdinteger<int64>required

ID of the blockchain chain

abiany

Application Binary Interface of the contract

type"erc20" | "erc721" | "erc1155" | "custom"required

Type of the contract

Allowed values: "erc20" | "erc721" | "erc1155" | "custom"
organizationIdstring<uuid>required

Unique identifier for the organization

iconUrlstring<uri>

Optional icon image for the contract; used as the reward token icon

Create a contract — Snag Docs