> ## Documentation Index
> Fetch the complete documentation index at: https://docs.photon.codes/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# Change an organization member's role across all projects

> Change an organization member's role across all projects: updateOrganizationMemberRole in the TypeScript, Python, Rust and Go clients.

`PATCH /v1/organizations/{organizationId}/members/{memberAccountId}`

**TypeScript**

```typescript TypeScript theme={null}
photon.organizations.updateOrganizationMemberRole(input: UpdateOrganizationMemberRoleInput, options?: RequestOptions): Promise<UpdateOrganizationMemberRoleOutput>
```

**Python**

```python Python theme={null}
photon.organizations.update_organization_member_role(input: UpdateOrganizationMemberRoleInput) -> models.UpdateOrganizationMemberRoleResponse
```

**Rust**

```rust Rust theme={null}
client.update_organization_member_role(idempotency_key: String, organization_id: String, member_account_id: String, body: &types::UpdateOrganizationMemberRoleRequest).await -> Result<ResponseValue<types::UpdateOrganizationMemberRoleResponse>, Error<UpdateOrganizationMemberRoleError>>
```

**Go**

```go Go theme={null}
client.Organizations.UpdateOrganizationMemberRole(ctx context.Context, params *UpdateOrganizationMemberRoleParams, opts ...RequestOption) (*UpdateOrganizationMemberRoleResponse, error)
```

```typescript TypeScript theme={null}
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.organizations.updateOrganizationMemberRole({
  path: {
    organizationId: "organizationId",
    memberAccountId: "memberAccountId",
  },
  headers: {
    idempotencyKey: "idempotencyKey",
  },
  body: {
    expectedVersion: "expectedVersion",
    role: "admin",
  },
});
```

```python Python theme={null}
import os

from photon_api import Photon
from photon_api.rpc_generated import UpdateOrganizationMemberRoleInput

photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.organizations.update_organization_member_role(
    UpdateOrganizationMemberRoleInput.model_validate({
        "path": {
            "organizationId": "organizationId",
            "memberAccountId": "memberAccountId",
        },
        "headers": {
            "Idempotency-Key": "idempotencyKey",
        },
        "body": {
            "expectedVersion": "expectedVersion",
            "role": "admin",
        },
    })
)
```

```rust Rust theme={null}
use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};

let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
    .credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
    .build()?;
let result = client
    .update_organization_member_role(
        "idempotencyKey".to_owned(),
        "organizationId".to_owned(),
        "memberAccountId".to_owned(),
        &serde_json::from_value(serde_json::json!({
            "expectedVersion": "expectedVersion",
            "role": "admin",
        }))?,
    )
    .await
    .map_err(|error| format!("{error:?}"))?
    .into_inner();
```

```go Go theme={null}
import (
	"context"
	"encoding/json"
	"os"

	photonapi "github.com/photon-hq/api/packages/go"
)

ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
var body photonapi.UpdateOrganizationMemberRoleRequest
if err := json.Unmarshal([]byte(`{
	"expectedVersion": "expectedVersion",
	"role": "admin"
}`), &body); err != nil {
	return err
}
result, err := client.Organizations.UpdateOrganizationMemberRole(ctx, &photonapi.UpdateOrganizationMemberRoleParams{
	IdempotencyKey: "idempotencyKey",
	OrganizationID: "organizationId",
	MemberAccountID: "memberAccountId",
	Body: body,
})
if err != nil {
	return err
}
_ = result
```

```json 200 theme={null}
{
  "accountId": "string",
  "createdAt": "2026-01-01T00:00:00Z",
  "joinedVia": "creation",
  "organizationId": "string",
  "removedAt": null,
  "role": "owner",
  "roleManagedAt": null,
  "status": "active",
  "updatedAt": "2026-01-01T00:00:00Z",
  "version": "string"
}
```

## Parameters

**Idempotency-Key** `string` *required*

Identifies one logical mutation across retries.

**organizationId** `string` *required*

**memberAccountId** `string` *required*

## Body

**expectedVersion** `string` *required*

**role** `UpdateOrganizationMemberRoleRequestRole` *required*

## Returns

**`200`** Committed membership result; refresh the member list for current state. UpdateOrganizationMemberRoleResponse

**accountId** `string` *required*

**createdAt** `string (date-time)` *required*

**joinedVia** `OrganizationMemberJoinedVia` *required*

**organizationId** `string` *required*

**removedAt** `string (date-time) | null` *required*

**role** `OrganizationMemberRole` *required*

**roleManagedAt** `string (date-time) | null` *required*

**status** `OrganizationMemberStatus` *required*

**updatedAt** `string (date-time)` *required*

**version** `string` *required*


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.