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:- the Neuron host;
- an Agent API account and JWT from the Agent API quickstart;
- a current approved Legal Identity for operations that require one;
- valid template XML from the authoring guide or the example library.
Path A: propose your template
Base64-encode the complete UTF-8 XML file as one string: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: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/SignContractonly 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.SendProposalis a JavaScript helper, not an HTTP endpoint.