प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग members.role.assign अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।

तपाईंको संस्थाको आइडी राख्ने ठाउँ

यो इन्डपोटले URL मा नै तपाईंको संस्थाको id लाई orgId को रूपमा लिन्छ। यसलाई पथ (path) मा राख्नुहोस् — यसको सट्टामा काम गर्ने कुनै हेडर वा क्वेरी प्यारामिटर छैन।

तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।

प्रयास गर्नुहोस्

कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।

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 कन्सोलले तपाईंको वास्तविक संस्थाको आईडी र आफ्नै कुञ्जी भरिदिन्छ, र लाइभ API विरुद्ध अनुरोध चलाउँछ ताकि तपाईंले वास्तविक प्रतिक्रिया हेर्न सक्नुहोस्। यो एन्डपोइन्टलाई 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