Skip to main content
POST
/
api
/
contracts
/
{id}
Update a contract
curl --request POST \
  --url https://admin.snagsolutions.io/api/contracts/{id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "<string>",
  "abi": null
}
'
{
  "id": "123e4567-e89b-12d3-a456-426614174003",
  "name": "My Contract",
  "address": "0xabc123...",
  "chainId": 1,
  "type": "ERC721",
  "organizationId": "123e4567-e89b-12d3-a456-426614174002",
  "abi": "[{ \"constant\": true, ... }]"
}

Documentation Index

Fetch the complete documentation index at: https://docs.snagsolutions.io/llms.txt

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

Authorizations

X-API-KEY
string
header
required

Path Parameters

id
string<uuid>
required

Body

application/json

Body

name
string
Maximum string length: 40
abi
unknown
type
enum<string>
Available options:
erc20,
erc721,
erc1155,
custom

Response

200

Schema for a contract

id
string<uuid>
required

Unique identifier for the contract

Example:

"123e4567-e89b-12d3-a456-426614174003"

name
string | null
required

Name of the contract

Maximum string length: 40
Example:

"My Contract"

address
string
required

Contract address matching the required format

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

"0xabc123..."

chainId
integer<int64>
required

ID of the blockchain chain

Example:

1

type
enum<string>
required

Type of the contract

Available options:
erc20,
erc721,
erc1155,
custom
Example:

"ERC721"

organizationId
string<uuid>
required

Unique identifier for the organization

Example:

"123e4567-e89b-12d3-a456-426614174002"

abi
any | null

Application Binary Interface of the contract

Example:

"[{ \"constant\": true, ... }]"