> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/setting/_set.md).

# \_set

Set a Setting's value.

### Parameters

#### name

The Setting you want to set.

**Default valid values:**

* 'appointment-statuses',
* 'customer-results-long',
* 'restrict-appointment-selection',
* 'disable-appointment-time-in-progress-update',
* 'timeline-template'.

**If Mantis integration is enabled:**

* 'issuetracker-mantis\_wsdl',
* 'issuetracker-mantis\_username',
* 'issuetracker-mantis\_password'.

**If Xero integration is enabled:**

* 'xero\_consumer\_key',
* 'xero\_consumer\_password',
* 'xero\_api\_endpoint\_url',
* 'xero\_rsa\_public\_key'.

**If Quickbooks integration is enabled:**

* 'quickbooks\_consumer\_key',
* 'quickbooks\_consume\_password',
* 'quickbooks\_app\_token'.

**If SMS integration is enabled:**

* 'sms-appointment\_create',
* 'sms-appointment\_create\_text',
* 'sms-appointment\_hours\_before',
* 'sms-appointment\_hours\_before\_num',
* 'sms-appointment\_hours\_before\_text',
* 'sms-appointment\_on\_route',
* 'sms-appointment\_on\_route\_text'.

#### value

The value that you want to set the Setting to.

### Example

```
FM_api('Setting_set', ['name' => 'appointment-statuses', 'value' => 'This would be the value.']);
```

### Result

#### On Success

```
{'ok':1}
```

#### On Failure

```
{'error':'refused'}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/setting/_set.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.
