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

# AI+API (deprecated)

> Deprecated, replaced by the Sendforsign MCP server and agent skill. AI+API: generate contracts in plain language, from scratch or from a template, and send them for signing with one unified request.

> [!WARNING]
>
> **Deprecated: AI+API is replaced by the Sendforsign MCP server and agent skill.** New integrations should connect
> an agent to the [MCP server](https://sendforsign.com/docs/ai-agents/mcp-quickstart.md) (`https://api.sendforsign.com/mcp`) and install the
> [agent skill](https://sendforsign.com/docs/ai-agents/skills.md). See [Sendforsign for AI agents](https://sendforsign.com/docs/ai-agents/overview.md). This page stays for
> existing integrations that still call `aiapi.sendforsign.com`.

### Concept

We provide our users with the ability to simplify the API request structure, sending unified requests
to Sendforsign's infrastructure and receiving unified responses.

Supported use cases:

* `Create a contract in free format`: Ask the system to generate a contract using your context and best practices. Optionally, specify the recipients' names and email addresses.
* `Create a contract from a template`: Ask the system to generate a contract using a template. Specify the name of the template.
* `Create and fill in a contract from a template`: Provide the template name, the recipients' names and email addresses, and the data to populate the placeholders.
* `See the list of templates`: Retrieve a list of templates created in your account.
* `See the list of template placeholders`: Retrieve a list of placeholders of a template. Specify the name of the template.

### Headers

**clientKey** `string` *required*

Your clientKey.

**secretKey** `string` *required*

Your secretKey.

### Body parameters

**message** `string` *required*

Your message.

### Response

**output** `string`

The response message.

**contractKey** `string`

If the system creates a contract, the contractKey will be returned.

**previewURL** `string`

If the system creates a contract, a previewURL will be returned. This URL is valid for 30 minutes and is intended for preview purposes only.

```bash cURL theme={null}
curl -X POST 'https://aiapi.sendforsign.com/webhook/aiapi' \
     -H 'X-Sendforsign-Key: YOUR_API_KEY' \
     -H 'clientKey: YOUR_CLIENT_KEY' \
     -H 'secretKey: YOUR_SECRET_KEY' \
     -H 'Content-Type: application/json' \
     -d '{
    "message": "hello world"
}'
```

```json Response theme={null}
{
    "output": "Hey how are you?",
    "contract": {
      "contractKey": "CONTRACT_KEY",
      "previewURL": "URL",
    }
    "code": "201",
    "message": "Contract created"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.