# Update a job's status in Fieldproxy and trigger automations

> POST /api/update sets columns on every row that matches a condition. A status change made this way runs the same automations as one made in the app.

Source: https://www.fieldproxy.ai/developers/guides/update-job-status

## Update one job

An administrator creates a key in the web app under Settings, Security, API keys: give it a name, an expiry, only the operations this guide needs, and optionally only the tables it touches. Keep it in an environment variable, `FIELDPROXY_API_KEY`. Your API base is your workspace's regional host, for example `https://api-india-1.fieldproxy.ai` (India) or `https://api-us-east-1.fieldproxy.ai` (US East). This guide needs the Update operation.

`condition` picks the rows, `data` is one object of the columns to set. Match on the id (or your own reference) to change exactly one job.

```bash
curl -X POST https://api-india-1.fieldproxy.ai/api/update \
  -H "x-api-key: $FIELDPROXY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"tableName":"jobs","condition":{"id":1042},"data":{"status":"completed"}}'
```

```javascript
// Node.js 18+ (built-in fetch)
const res = await fetch("https://api-india-1.fieldproxy.ai/api/update", {
  method: "POST",
  headers: { "x-api-key": process.env.FIELDPROXY_API_KEY, "content-type": "application/json" },
  body: JSON.stringify({
    "tableName": "jobs",
    "condition": {
      "id": 1042
    },
    "data": {
      "status": "completed"
    }
  }),
})
const out = await res.json()
if (!res.ok) throw new Error(out.message)
console.log(out.rowCount)
```

```python
# Python 3 (pip install requests)
import os, requests

res = requests.post(
    "https://api-india-1.fieldproxy.ai/api/update",
    headers={"x-api-key": os.environ["FIELDPROXY_API_KEY"]},
    json={
      "tableName": "jobs",
      "condition": {
        "id": 1042
      },
      "data": {
        "status": "completed"
      }
    },
    timeout=30,
)
out = res.json()
res.raise_for_status()
print(out["rowCount"])
```

200 response:

```json
{
  "message": "Update successful",
  "rowCount": 1,
  "table": "jobs",
  "tenant": "<workspace-id>"
}
```

## Automations fire on the change

Each changed row fires the workspace's automations: `entity_event` rules, and for /api/update also `status_transition` and `field_threshold` rules. So moving a job to completed can raise the invoice, ask for a review or tell another system, with no extra call from you.

a rule that reacts to the change:

```json
{
  "name": "Tell our ERP when a job is completed",
  "enabled": true,
  "trigger_type": "status_transition",
  "trigger_config": { "table": "jobs", "field": "status", "to": "completed" },
  "action_spec": {
    "steps": [
      { "type": "send_webhook",
        "url": "https://erp.example.com/hooks/fieldproxy",
        "secret": "{{secrets.ERP_WEBHOOK_KEY}}",
        "body": { "event": "job.completed", "job_id": "{{trigger.row.id}}" } }
    ]
  }
}
```

## Good to know

- One call can change many rows: `{"status": "open"}` as the condition updates every open row (a test call updated 1,000). Match on an id when you mean one.
- A condition that matches nothing returns 200 with `rowCount` 0, not an error. Check `rowCount`.
- An unknown column or a constraint violation returns 500 with `Update failed` and the database error.

Table and column names differ per workspace, because each one is set up around its own business. The names below (`jobs`, `customers`, `invoices`) are typical, not guaranteed. To see the real ones, connect any MCP client and call `describe_schema`, or ask your Fieldproxy administrator.

## Questions

### Can I update a job's status in Fieldproxy from another system?

Yes. POST /api/update with the job's id as the condition and the new status in data changes the job.

### Do API updates trigger Fieldproxy automations?

Yes. Each changed row fires entity_event rules, and updates also fire status_transition and field_threshold rules, the same as a change made in the app.

## This is one way, not the only way

This guide shows one common way to do it. A Fieldproxy workspace can be reached from every side, and anything in it can be read, changed or automated:

- REST API: read, insert, update and delete on any table the key allows ([REST API reference](https://www.fieldproxy.ai/developers/docs/rest-api)).
- MCP server: 170+ tools for Claude, ChatGPT, Copilot, Cursor and your own agents, including read-only SQL, proposed writes, automations and app building ([MCP tools](https://www.fieldproxy.ai/developers/docs/mcp-tools)).
- Automations: 15 trigger types and about 50 step types, with webhooks in and signed webhooks and HTTP calls out ([Webhooks and automations](https://www.fieldproxy.ai/developers/docs/webhooks-automations)).
- Public forms, record links and customer portals for people outside the company ([Public forms and links](https://www.fieldproxy.ai/developers/docs/public-forms)).
- Apps as JSON: new screens, fields, tables and workflows ([Apps as JSON](https://www.fieldproxy.ai/developers/docs/apps-as-json)).
- Voice and text agents that work from the same data ([Voice and text agents](https://www.fieldproxy.ai/developers/docs/agents)).
- Not listed here? Fieldproxy's team builds integrations with the other systems you use as part of setting up your workspace. [Tell us what you need](https://www.fieldproxy.ai/book-demo?source=dev-guides).

More: [REST API reference](https://www.fieldproxy.ai/developers/docs/rest-api) · [OpenAPI](https://www.fieldproxy.ai/developers/openapi.json) · [All guides](https://www.fieldproxy.ai/developers/guides)