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

# Sign data

> Allows the client to sign binary data.

## Overview

Allows the client to sign binary data.

## HTTP request

`POST /Agent/Legal/SignData`

## Authentication

Requires a valid JWT bearer token.

## Request (JSON)

```json theme={null}
{
	"keyId": Required(Str(PKeyId)),
	"legalId": Required(Str(PLegalId)),
	"dataBase64": Required(Str(PDataBase64)),
	"keySignature": Required(Str(PKeySignature)),
	"requestSignature": Required(Str(PRequestSignature))
}
```

## Input parameters

| Parameter         | Description                                                                                                                                                             |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PKeyId            | Identity of key to use for signing the contract. It must correspond to the key used when signing the Legal Identity application that will be used to sign the contract. |
| PLegalId          | Identity of the Legal Identity that will be used to sign the smart contract.                                                                                            |
| PDataBase64       | Binary data, base64-encoded, that will be signed.                                                                                                                       |
| PKeySignature     | Cryptographic signature of the key ID, using the key password.                                                                                                          |
| PRequestSignature | Cryptographic signature of the requesut, using the account password.                                                                                                    |

## Response (JSON)

```json theme={null}
{
	"Signature": Required(Str(PSignature))
}
```

## Response parameters

| Parameter  | Description               |
| ---------- | ------------------------- |
| PSignature | Base64-encoded signature. |

## Notes

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