> ## 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.

# Get contract

> Allows the client to get a Smart Contract.

## Overview

Allows the client to get a Smart Contract. If the Contract belongs to someone else, and the client is not authorized access to the Contract, an error will be returned.

Note: Neurons are federated. You can get contracts created on other neurons through this API on the neuron you have your account on. Federated means that the neurons interconnect to share authorized information, when requested, and permitted.

## HTTP request

`POST /Agent/Legal/GetContract`

## Authentication

Requires a valid JWT bearer token.

## Request (JSON)

```json theme={null}
{
	"contractId": Required(Str(PContractId)),
	"format": Optional(Str(PFormat))
}
```

## Input parameters

| Parameter   | Description                                                                                                                                                                                |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| PContractId | Identity of the Smart Contract to get.                                                                                                                                                     |
| PFormat     | Optional format for human-readable texts. If not provided, the object model for the text is returned. If provided, can be any of Markdown, Html, Text, Xaml, XamarinXaml or SmartContract. |

## Response (JSON)

```json theme={null}
{
	"Contract": Required(PContract)
}
```

## Response parameters

| Parameter | Description            |
| --------- | ---------------------- |
| PContract | Smart Contract object. |

## Notes

This endpoint uses the request schema notation described in [Pattern matching](/guides/pattern-matching).
