Construct a POST request to https://{org}.crm.dynamics.com/api/data/vX.X/$batch with Content-Type multipart/mixed; boundary={batchBoundary}
Each operation in the batch is separated by the boundary string and contains its own HTTP method, relative URL, headers, and optional body
Group mutually dependent operations (e.g., create then relate) inside a change set, which is a nested multipart block that enforces atomicity within that group
Parse the multipart response body — each part contains the HTTP status and response body for the corresponding request
Operations outside a change set execute independently and are not rolled back if others fail
Known gotchas
GET requests cannot be included inside a change set — only data modification operations (POST, PATCH, DELETE) are allowed within change sets
A single batch request is limited in the number of operations and change sets — consult the current Microsoft documentation for exact limits as they may change with API versions
Content-ID headers within a change set can reference earlier responses in the same change set using $1, $2 notation — but only within that change set, not across the whole batch
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp