---
title: "Caller's role in an organization (for scope-edit UX)"
method: POST
path: "/apikeys/getMyRole"
tags: ["API Keys"]
---

# Caller's role in an organization (for scope-edit UX)

`POST /apikeys/getMyRole`

## Request

- Base URL: `https://api.databuddy.cc`
- URL: `https://api.databuddy.cc/apikeys/getMyRole`
- Auth: API key in header `x-api-key`

Returns the session user's membership role in the given organization so clients can disable scope editing for non-admins.

## Request body

- object
  - `organizationId` string, required

## Response `200`

OK

- object
  - `role` 'owner' | 'admin' | 'member', nullable, required
  - `canEditScopes` boolean, required

## Other responses

- `400`: 400
- `401`: 401
- `402`: 402
- `403`: 403
- `404`: 404
- `409`: 409
- `429`: 429
- `500`: 500
- `503`: 503

---

[API](https://skmtc.dev/databuddy/apis/databuddy-api.md) - [All operations](https://skmtc.dev/databuddy/apis/databuddy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/databuddy/apis/databuddy-api/revisions/ddfbba648d52?raw)
