fields.define
Add a custom field to customers, properties, jobs, quotes or invoices for a shop.
| Who | Agents can call this |
| REST | POST /v1/fields |
| MCP tool | fields_define |
| Writes | yes, send an Idempotency-Key |
| Area | Imports, custom fields, tags and search |
When to use it
Add a custom field to customers, properties, jobs, quotes or invoices for a shop.
What to tell the owner
Say what you did in plain words and what happens next.
Input
| Field | Type | Required |
|---|---|---|
shop_id | string (uuid) | yes |
key | string | yes |
label | string | no |
target | string (one of customer, property, job, quote, invoice) | yes |
type | string (one of text, number, money, date, boolean, enum, json) | yes |
options | array | no |
required | boolean | no |
pii | boolean | no |
shared_with_homeowner | boolean | no |
Example
POST https://doingwork.work/v1/fields
content-type: application/json
Idempotency-Key: 3f1c...
{
"shop_id": "00000000-0000-4000-8000-000000000000",
"key": "...",
"target": "customer",
"type": "text"
}Output
JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are {code, message, status}.
Errors
| Code | Status | What to do |
|---|---|---|
invalid_input, invalid_token, rate_limited | Can happen on any call. See errors. |