Skip to main content
POST
/
api
/
v1
/
contract-templates
Create Contract Template
curl --request POST \
  --url https://sandbox.oumla.com/api/v1/contract-templates \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "bytecode": "<string>",
  "abi": [
    {}
  ],
  "longDescription": "<string>",
  "sourceCode": "<string>",
  "type": "<string>",
  "docs": {},
  "attributes": {}
}
'
{
  "contract": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "ERC721 Token",
    "description": "Standard ERC721 token contract",
    "longDescription": "<string>",
    "bytecode": "0x608060405234801561001057600080fd5b50...",
    "sourceCode": "<string>",
    "type": "<string>",
    "docs": {}
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication. Obtain your API key from the dashboard.

Headers

x-sdk-version
string
default:1.0.0

SDK version header

Body

application/json

Request body for create contract template

Create contract request object

name
string
required
description
string
required
bytecode
string
required
abi
object[]
required
longDescription
string
sourceCode
string
type
string
docs
object
attributes
object

Response

Contract template successfully created

Contract template response object

contract
object