> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

The Contracts endpoints manage the full lifecycle of smart contracts on the Neuron platform — from proposing reusable templates to creating contract instances, sending proposals to counterparties, collecting signatures, and controlling access.

Smart contracts on Neuron are XML documents that conform to the smart contract schema. They can be designed using the LegalLab application. Contracts are federated — you can sign contracts created on other Neurons through your account's local Neuron.

**Signing requires a valid, approved [Legal Identity](/neuron-api/api-reference/legal-identities/overview) and a corresponding cryptographic key.**

## Endpoints

| Endpoint                                                                                         | Description                                                                               |
| ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------- |
| [Propose a contract template](/neuron-api/api-reference/contracts/propose-contract-template)     | Submit a new smart contract template (BASE64-encoded XML) to the broker for registration. |
| [Create contract](/neuron-api/api-reference/contracts/create-contract)                           | Instantiate a contract from an existing template.                                         |
| [Send proposal](/neuron-api/api-reference/contracts/send-proposal)                               | Send a contract proposal to one or more counterparties for review and signing.            |
| [Get contract](/neuron-api/api-reference/contracts/get-contract)                                 | Retrieve a contract by ID, including its current state and signatures.                    |
| [Get created contracts](/neuron-api/api-reference/contracts/get-created-contracts)               | List all contracts created by the authenticated account.                                  |
| [Get signed contracts](/neuron-api/api-reference/contracts/get-signed-contracts)                 | List all contracts signed by the authenticated account.                                   |
| [Sign contract](/neuron-api/api-reference/contracts/sign-contract)                               | Sign a contract using a Legal Identity and cryptographic key, for a specified role.       |
| [Sign data](/neuron-api/api-reference/contracts/sign-data)                                       | Sign arbitrary data using a Legal Identity key (for custom signing workflows).            |
| [Authorize access to contract](/neuron-api/api-reference/contracts/authorize-access-to-contract) | Grant another party permission to access a contract.                                      |

## Typical contract flow

```mermaid theme={null}
sequenceDiagram
  participant Client
  participant Neuron
  Client->>Neuron: POST Legal/ProposeTemplate (BASE64 XML)
  Neuron-->>Client: Template object
  Client->>Neuron: POST Legal/CreateContract (from template)
  Neuron-->>Client: Contract object
  Client->>Neuron: POST Legal/SendProposal (to counterparty)
  Neuron-->>Client: Proposal sent
  Client->>Neuron: POST Legal/SignContract (keyId + legalId + role)
  Neuron-->>Client: Updated contract with signature
```

## Prerequisites

* An approved **Legal Identity** is required to sign contracts — see [Legal identities](/neuron-api/api-reference/legal-identities/overview).
* A **cryptographic key** must exist on the account — see [Cryptography → Create key](/neuron-api/api-reference/cryptography/create-key).
* All signing calls require a `keyId`, `legalId`, `nonce`, `keySignature`, and `requestSignature`.

## Related

* [Contracts flow guide](/neuron-api/guides/contracts-flow) — end-to-end walkthrough of creating and signing a contract.
* [Legal identities](/neuron-api/api-reference/legal-identities/overview) — apply for and manage the identities used to sign contracts.
* [Cryptography](/neuron-api/api-reference/cryptography/overview) — create and retrieve the keys required for signing.
