Skip to main content
Set NEURON_REFERER to your application’s HTTPS URL. Include this header on every request, including backend calls. See required request headers. Use the Agent API when a web or backend application needs to work with contracts. The API does not require access to the Neuron source code. This page covers template proposal and contract creation. Continue with the contract lifecycle for proposal delivery and both signatures.

Before you start

You need: Set the examples’ placeholders without committing credentials:

Path A: propose your template

Base64-encode the complete UTF-8 XML file as one string:
Submit it:
The response contains Template; record its id. A proposed template must be approved before it can create instances. The sandbox reviews proposals automatically; other Neurons require operator approval. Retrieve the template and confirm Approved before continuing.

Path B: create from an approved template

If the provider has already supplied an approved template ID, you can begin here:
Replace Parts and Parameters with the names and value types defined by that template. The response contains the created Contract.
An empty Parts or Parameters array works only when the selected template does not require those values. The template—not this endpoint—defines what must be supplied.

Continue after creation

  • Retrieve the returned contract with POST /Agent/Legal/GetContract.
  • Present the exact returned human-readable text before signing.
  • Use POST /Agent/Legal/SignContract only after the signer has reviewed the exact contract and role. The lifecycle guide defines the signature messages.
  • Send proposals through POST /Agent/Xmpp/SendXmlMessage; AgentAPI.Legal.SendProposal is a JavaScript helper, not an HTTP endpoint.
See the contract API reference for request fields and responses.