access
PATCH /v1/orgs/{orgId}/members/{userId}
Change a member's role.
প্রমাণীকরণ
একটি বিয়ারার টোকেন হিসেবে একটি এপিআই কি পাঠান। কি-টির অবশ্যই members.role.assign অনুমতি থাকতে হবে; এটি ছাড়া কোনো কি ৪০৪ নয়, বরং ৪০৩ ত্রুটি দিয়ে প্রত্যাখ্যাত হবে।
যেখানে আপনার অর্গানাইজেশন আইডি দেওয়া হবে
এই এন্ডপয়েন্টটি URL-এর মধ্যেই আপনার অর্গানাইজেশন আইডি নেয়, orgId হিসেবে। এটিকে পাথ-এ প্রতিস্থাপন করুন — এর পরিবর্তে কাজ করবে এমন কোনো হেডার বা কোয়েরি প্যারামিটার নেই।
আপনার ড্যাশবোর্ডের API কি স্ক্রিনে, কি-এর ঠিক পাশেই আপনার অর্গানাইজেশন আইডি রয়েছে। আপনি যে কলই করুন না কেন, সবগুলিতেই এই আইডি একই থাকে।
চেষ্টা করুন
কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।
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> }'লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন
বিবরণ
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. |
অনুরোধের বডি
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
role | string | হ্যাঁ | A role key from GET /v1/orgs/{orgId}/roles. |
প্রতিক্রিয়া
| নাম | ধরন | আবশ্যক | এটি কী |
|---|---|---|---|
user_id | Uuid | হ্যাঁ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
email | string | হ্যাঁ | — |
name | string | হ্যাঁ | Display name; may be empty for an account that never set one. |
roles | string[] | হ্যাঁ | Every role this person holds in this org, sorted. |
joined_at | string | হ্যাঁ | When their EARLIEST membership of this org was created. |
is_self | boolean | হ্যাঁ | Whether this row is the calling user. |
removable | boolean | হ্যাঁ | — |
not_removable_reason | OrgMemberRemovalBlock | 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_assignable | boolean | হ্যাঁ | 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