For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Upsert opportunities

This endpoint creates and updates opportunities in one call. An entry with no id is created. An entry with an id is updated.

An id that does not match an opportunity in your organization is reported as an error rather than created, so that a stale ID cannot quietly produce a duplicate.

Endpoint

POST api/opportunities/bulk-upsert/

Example Request Payload

{
    "allow_partial": true,
    "opportunities": [
        {
            "id": "2f56f3ef-08f5-4e5a-bf5b-76ca8fc4d5f1",
            "title": "Weekend Mentor"
        },
        {
            "category_id": "d610ab31-e480-4ef1-9e35-94f94ebacde9",
            "title": "Evening Mentor",
            "coordinator_ids": ["8f1c2d3e-4a5b-6c7d-8e9f-0a1b2c3d4e5f"]
        }
    ]
}

Behavior

  • Entries without an id follow the same rules as Create opportunities, including the required category, title and coordinator.

  • Entries with an id follow the same rules as Update opportunities, changing only the fields you send.