Bulk merge-patch API mappings.
RFC 7386 JSON Merge Patch on the api_mappings map. RFC 7386 applies recursively at every nesting level — the same null-to-delete, absent-key-untouched rules hold inside scope_to_policy as they do at the api_id level. The whole merge is one atomic document write, emitting exactly one NoticeClientIdPChanged notification regardless of how many keys are touched.
Remove an entire API mapping (null at the api_id level):
json { "8ddd91f3cda9453442c477b06c4e2da4": null }
Remove a single scope while leaving the rest of the mapping intact (null at the scope_to_policy level):
json { "b84fe1a04e5648927971c0557971565c": { "scope_to_policy": { "read": null } } }
Upsert a mapping and delete another in one call:
"4c1c0d8fc885401053ddac4e39ef676b": { "scope_to_policy": { "read": "665d51505715ec2d76022c87" } },
"8ddd91f3cda9453442c477b06c4e2da4": null
} ```
**Important:** to remove a scope key you must send it explicitly as `null`. Omitting a key from the patch body leaves it untouched at every level — there is no way to remove a scope by simply not including it.
Authorizations
The Tyk Dashboard API Access Credentials
Path Parameters
Internal record ID hex or custom client_idp_id.
Body
RFC 7386 JSON Merge Patch body for PATCH /api/clientidps/{id}/mappings. Each key is an api_id. A ScopeMappingPatch value upserts that mapping; a null value deletes the entire mapping for that api_id. Keys absent from the body are left untouched at every nesting level — this includes individual scope keys inside scope_to_policy. To remove a single scope, set it to null inside scope_to_policy; omitting it has no effect.
Patch shape for a single API's scope mapping. scope_to_policy is a free-form JSON object so that individual scope keys can be set to null (to remove them) as per RFC 7386 merge-patch semantics.
Response
Mappings merged. Returns the full updated client IdP document.
A client Identity Provider stored beside API definitions.
Internal record ID hex. Set server-side on creation.
Stable user-facing identifier. Defaults to _id hex when not supplied on create.
Organisation ID. Set server-side from the session; cannot be overridden.
JWT claim holding the OAuth scopes (e.g. scope, scp, roles). Empty falls back to scope gateway-side.
Map of api_id → ScopeMapping.