Contractors

contractors.create

Add a contractor with displayName, legalName, email (unique in the organization), an optional two-letter country, an optional jobRoleId (an active role from contractorOps.roles.list; add one with contractorOps.roles.save) and idempotencyKey. No invitation is sent: invite them with contractors.invite, or share the link from contractors.invitations.link.

POST/api/v1/accounting/contractors.create

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required

MCP

accounting_contractors_create

Fields

  • displayNamestringRequired

    1–200 characters

  • legalNamestringRequired

    1–300 characters

  • emailstring (email)Required

    An email address.

    at most 320 characters

  • countrystring

    Two-letter country or province code

  • jobRoleIdstring (ID) or null
  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–150 characters

Example

curl https://app.getoatmilk.com/api/v1/accounting/contractors.create \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "displayName": "Synthetic Ventures Inc.",
  "legalName": "Synthetic Ventures Inc.",
  "email": "finance@example.com"
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/contractors.create
curl https://app.getoatmilk.com/api/v1/accounting/contractors.create \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "displayName": "Synthetic Ventures Inc.",
  "legalName": "Synthetic Ventures Inc.",
  "email": "finance@example.com"
}'

More in Contractors.