# \_new

Create a new Contract

### Parameters

* name - the name of the Contract
* notes - (optional) description of the contract
* custom - (optional) array of custom fields

### Example

```
FM_api(
	'Contract_new',
	[
		'name'=>'Monthly Contract',
		'notes'=>'Here are some notes',
		'custom'=>[
			'custom field'=>'1',
			'address thing'=>'2'
		]
	]
);
```

### Result

The result will be the id of the newly-created Contract.

```
{"id":12}
```

If a valid name is not supplied, the following error will be returned:

```
{"error":"no name provided"}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/contract/_new.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
