# sponsorships.save

Save proposed sponsorship context linked to an existing project and customer, keeping a payer distinct. Record package, promised benefits, performance dates, cited country/residency facts and proposed accounting/tax treatment. No customer is silently created and no financial record or classification changes. Editing invalidates the previous review.

`POST /api/v1/accounting/sponsorships.save`

Permissions: `accounting:read`, `accounting:write` · Roles: admin, finance · Idempotency key required · Send `expectedRevision`

MCP tool: `accounting_sponsorships_save`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `id` | string (ID) |  | The record's ID. |
| `expectedRevision` | integer | Yes | The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again. 0 to 9007199254740991. |
| `projectId` | string (ID) | Yes | The ID of the related record. |
| `partyId` | string (ID) or null | Yes | The ID of a customer or vendor account, from parties.list. |
| `packageId` | string (ID) or null | Yes |  |
| `title` | string | Yes | A short title. 1–200 characters. |
| `payerName` | string or null | Yes |  |
| `currency` | string | Yes | Three-letter currency code, such as CAD or USD. |
| `agreedMinor` | string or null | Yes | An amount in cents (the currency's smallest unit), written as a whole-number string such as "1250" for $12.50. |
| `closedOn` | string or null | Yes |  |
| `performanceFrom` | string or null | Yes |  |
| `performanceTo` | string or null | Yes |  |
| `benefits` | array of objects | Yes | at most 50 items. |
| `benefits[].id` | string (ID) | Yes | The record's ID. |
| `benefits[].description` | string | Yes | A short description. 1–500 characters. |
| `benefits[].performanceFrom` | string or null | Yes |  |
| `benefits[].performanceTo` | string or null | Yes |  |
| `benefits[].state` | enum | Yes | One of: `unknown`, `promised`, `delivered`, `cancelled`. |
| `benefits[].sources` | array of objects | Yes | at most 10 items. |
| `benefits[].sources[].kind` | enum | Yes | Which kind of record or job this is. One of: `receipt_original`, `mail_original`, `company_original`, `entry_note`. |
| `benefits[].sources[].id` | string (ID) | Yes | The record's ID. |
| `benefits[].sources[].sha256` | string | Yes | The SHA-256 hash of the file's exact bytes, as 64 lowercase hex characters. SHA-256 hash as 64 lowercase hex characters. |
| `benefits[].sources[].quote` | string | Yes | 1–1000 characters. |
| `benefits[].sources[].page` | integer or null |  | Default `null`. |
| `facts` | array of objects | Yes | at most 30 items. |
| `facts[].key` | enum | Yes | One of: `customer`, `payer`, `purpose`, `country`, `residency`, `package`, `benefits`, `agreement_date`, `performance_dates`, `location`, `recognition_date`, `tax_point_date`, `tax_treatment`. |
| `facts[].value` | string or null | Yes |  |
| `facts[].confidence` | enum | Yes | One of: `unknown`, `low`, `medium`, `high`. |
| `facts[].sources` | array of objects | Yes | at most 10 items. |
| `facts[].sources[].kind` | enum | Yes | Which kind of record or job this is. One of: `receipt_original`, `mail_original`, `company_original`, `entry_note`. |
| `facts[].sources[].id` | string (ID) | Yes | The record's ID. |
| `facts[].sources[].sha256` | string | Yes | The SHA-256 hash of the file's exact bytes, as 64 lowercase hex characters. SHA-256 hash as 64 lowercase hex characters. |
| `facts[].sources[].quote` | string | Yes | 1–1000 characters. |
| `facts[].sources[].page` | integer or null |  | Default `null`. |
| `treatment` | object | Yes | No other fields. |
| `treatment.tax` | string or null | Yes |  |
| `treatment.recognitionDate` | string or null | Yes |  |
| `treatment.taxPointDate` | string or null | Yes |  |
| `treatment.reason` | string or null | Yes | A short note saying why, kept in the record's history. |
| `archived` | boolean |  | Whether the record is archived. Default `false`. |
| `idempotencyKey` | string | Yes | 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–200 characters. |

## Example request

```bash
curl https://app.getoatmilk.com/api/v1/accounting/sponsorships.save \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "expectedRevision": 3,
  "projectId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "partyId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
  "packageId": "7f0f6c1e-1c1f-4b5e-9c8d-2f5e8e3c1a10",
  "title": "Synthetic services agreement",
  "payerName": "Synthetic Ventures Inc.",
  "currency": "CAD",
  "agreedMinor": "1",
  "closedOn": "2026-09-30",
  "performanceFrom": "2026-09-30",
  "performanceTo": "2026-09-30",
  "benefits": [
    {
      "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
      "description": "Synthetic example from the docs",
      "performanceFrom": "2026-09-30",
      "performanceTo": "2026-09-30",
      "state": "unknown",
      "sources": [
        {
          "kind": "receipt_original",
          "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
          "sha256": "9f2b5c1d7e3a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c",
          "quote": "USD"
        }
      ]
    }
  ],
  "facts": [
    {
      "key": "customer",
      "value": "example",
      "confidence": "unknown",
      "sources": [
        {
          "kind": "receipt_original",
          "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
          "sha256": "9f2b5c1d7e3a4b6c8d0e2f4a6b8c0d2e4f6a8b0c2d4e6f8a0b2c4d6e8f0a2b4c",
          "quote": "USD"
        }
      ]
    }
  ],
  "treatment": {
    "tax": "example",
    "recognitionDate": "2026-09-30",
    "taxPointDate": "2026-09-30",
    "reason": "Synthetic example from the docs"
  }
}'
```

Reference page: https://app.getoatmilk.com/docs/api/sponsorships.save
