ავტორიზაცია

API გასაღები გაგზავნეთ როგორც მატარებელი ტოკენი (bearer token). გასაღებს უნდა ჰქონდეს members.role.assign ნებართვა; ამის გარეშე გასაღები უარყოფილი იქნება 403 და არა 404 სტატუსით.

სwhere your organisation id goes-ის ადგილი

ეს ენდპოინტი იღებს თქვენი ორგანიზაციის ID-ს თავად URL-ში, როგორც orgId. ჩაანაცვლეთ ის მისამართში — არ არსებობს ჰედერი ან ქუერის პარამეტრი, რომელიც ამას შეცვლის.

თქვენი ორგანიზაციის ID მითითებულია თქვენი სამართავი პანელის API გასაღებების ეკრანზე, თავად გასაღებთან ახლოს. ის ერთნაირია თქვენ მიერ განხორციელებულ ყველა გამოძახებაში.

სცადეთ

შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.

curl -X PATCH https://api.zinndigital.com/v1/orgs/{orgId}/members/{userId} \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "role": <string> }'

შესული ხართ? თქვენი სამართავ პანელში არსებული API კონსოლი ავტომატურად ამატებს თქვენი რეალური ორგანიზაციის ID-სა და საკუთარ გასაღებს და ატარებს მოთხოვნას ცოცხალ API-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი API კონსოლში

დეტალები

Sets this member's role in the organization. Requires members.role.assign on that org. ⛔ Replaces the member's roles with the one given rather than adding to them — a person may hold several Membership rows, and collapsing them can only ever reduce what they hold, so no path through this endpoint escalates by accident. Three refusals, and they are the same rules an invitation is held to: 403 if the member holds a permission the caller does not (more_privileged), 403 if the role being granted holds one (role_not_grantable — this is what stops any holder of the key promoting themselves to owner), and 409 for the org's last owner (last_owner). An unknown role is a 422, never a 403, so a typo is distinguishable from a permission you lack.

პარამეტრები

სახელიტიპისავალდებულორა არის ეს
orgId (path)UuidდიახOrganization ID (UUIDv7).
userId (path)UuidდიახThe user to remove from the organization.

მოთხოვნის სხეული

სახელიტიპისავალდებულორა არის ეს
rolestringდიახA role key from GET /v1/orgs/{orgId}/roles.

პასუხი

სახელიტიპისავალდებულორა არის ეს
user_idUuidდიახUUIDv7 identifier — sortable by creation time (docs/02 §8).
emailstringდიახ
namestringდიახDisplay name; may be empty for an account that never set one.
rolesstring[]დიახEvery role this person holds in this org, sorted.
joined_atstringდიახWhen their EARLIEST membership of this org was created.
is_selfbooleanდიახWhether this row is the calling user.
removablebooleanდიახ
not_removable_reasonOrgMemberRemovalBlock | nullდიახWhy not, when removable is false. Null when removable — and also null for a caller lacking members.remove, because "you cannot remove anyone here" is a fact about the caller,…
role_assignablebooleanდიახWhether PATCH on this member would be accepted — the caller holds members.role.assign here, does not outrank themselves, and this is not the last owner. ⛔ Which role may…

შეცდომები, რომლებიც ამ ენდპოინტს შეუძლია დააბრუნოს

401 · 403 · 404 · 409 · 422 · 429