# Create a job in Fieldproxy from your own system

> Send a job from your CRM, website, ERP or a script into Fieldproxy with one HTTPS call. The new job fires the workspace's automations, so assignment, notifications and SLA timers start as if it was created in the app.

Source: https://www.fieldproxy.ai/developers/guides/create-a-job

## 1. Get a key with Insert

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 Insert operation; add Read if you want to read the job back.

## 2. Find the jobs table and its columns

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.

MCP: list the columns:

```text
describe_schema({ "tables": ["jobs"] })
```

## 3. Insert the job

`data` is always an array of rows, even for one job. Columns you leave out take their database defaults, such as the id and timestamps. Put your own reference on the row (here `external_ref`, if your table has such a column) so you can find the job again: the response tells you how many rows went in, not their ids.

```bash
curl -X POST https://api-india-1.fieldproxy.ai/api/insert \
  -H "x-api-key: $FIELDPROXY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"tableName":"jobs","data":[{"title":"No cooling, unit 4B","status":"new","priority":"urgent","customer_id":1187,"external_ref":"CRM-55120"}]}'
```

```javascript
// Node.js 18+ (built-in fetch)
const res = await fetch("https://api-india-1.fieldproxy.ai/api/insert", {
  method: "POST",
  headers: { "x-api-key": process.env.FIELDPROXY_API_KEY, "content-type": "application/json" },
  body: JSON.stringify({
    "tableName": "jobs",
    "data": [
      {
        "title": "No cooling, unit 4B",
        "status": "new",
        "priority": "urgent",
        "customer_id": 1187,
        "external_ref": "CRM-55120"
      }
    ]
  }),
})
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/insert",
    headers={"x-api-key": os.environ["FIELDPROXY_API_KEY"]},
    json={
      "tableName": "jobs",
      "data": [
        {
          "title": "No cooling, unit 4B",
          "status": "new",
          "priority": "urgent",
          "customer_id": 1187,
          "external_ref": "CRM-55120"
        }
      ]
    },
    timeout=30,
)
out = res.json()
res.raise_for_status()
print(out["rowCount"])
```

200 response:

```json
{
  "message": "Successfully inserted 1 rows into jobs",
  "rowCount": 1,
  "table": "jobs",
  "tenant": "<workspace-id>"
}
```

## 4. Read it back

```bash
curl -X POST https://api-india-1.fieldproxy.ai/api/read \
  -H "x-api-key: $FIELDPROXY_API_KEY" \
  -H "content-type: application/json" \
  -d '{"tableName":"jobs","condition":{"external_ref":"CRM-55120"}}'
```

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

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

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

## What happens next

- The insert fires the workspace's automations (entity_event triggers on the jobs table), so a rule can assign a technician, text the customer or start an SLA timer.
- Several jobs in one call are all or nothing: if one row fails, none are inserted, and the error names the table and the Postgres error code.
- If the table is not on the key's allowlist you get 403 `API key is not authorized for table 'jobs'`.

## Questions

### Can I create a job in Fieldproxy through an API?

Yes. Send POST /api/insert with an x-api-key and the job as a row in data, with tableName set to your jobs table. The new job fires the workspace's automations just like one created in the app.

### Does the Fieldproxy API return the new job's id?

No, the insert response gives the row count. Put your own reference on the row, such as a CRM id, and read the job back with POST /api/read on that value.

### Can I create several jobs in one call?

Yes. Send several rows in data. They go in together in one atomic insert, so either all are created or none are.

## 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)