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>",
  "abi": [
    {}
  ],
  "bytecode": "<string>",
  "longDescription": "<string>",
  "sourceCode": "<string>",
  "type": "<string>",
  "docs": {
    "details": "<string>",
    "events": "<string>",
    "kind": "dev",
    "methods": [
      {
        "name": "<string>",
        "description": "<string>",
        "params": {},
        "returns": {}
      }
    ],
    "version": "<string>"
  },
  "attributes": {
    "useCases": [
      "<string>"
    ],
    "standards": [
      "<string>"
    ],
    "auditor": {
      "name": "<string>",
      "imageURL": "<string>",
      "link": "<string>"
    }
  }
}'
{
  "message": "<string>",
  "data": {},
  "success": true,
  "status": 123
}

Authorizations

x-api-key
string
header
required

API key for authentication

Headers

x-sdk-version
string
default:1.0.0

SDK version for tracking and compatibility

Body

application/json
name
string
required

Contract template name

description
string
required

Contract template description

abi
object[]
required

Contract ABI

bytecode
string
required

Contract bytecode

longDescription
string

Long description of the contract

sourceCode
string

Contract source code

type
string

Contract type

docs
object

Contract documentation

attributes
object

Contract attributes

Response

201 - application/json

Contract template created successfully

message
string
required

Response message

success
boolean
required

Indicates successful response

status
integer
required

HTTP status code

data
object

Response data