The current endpoint of https://api.bitbucket.org/2.0/repositories/<username>/<repository>/branch-restrictions does not allow for users to be posted by "account_id". Currently, only "username" and "uuid" is supported.
I would expect the following post body to be supported
{
"type": "branchrestriction",
"kind": "restrict_merges",
"value": null,
"branch_match_kind": "branching_model",
"branch_type": "development",
"users": [{
"account_id": "<account_id>"
}]
}This currently results in a successful post, but without a user actually being posted. This is especially relevant now that Account ID is used in more and more places as the preferred identification field.
Related:
https://community.atlassian.com/t5/Bitbucket-questions/Feat-Swagger-V3-Update-account-schema/qaq-p/2694518