---
title: "Set a user's current org"
method: PATCH
path: "/org/users/{userId}/current"
tags: ["Users"]
---

# Set a user's current org

`PATCH /org/users/{userId}/current`

## Request

- Base URL: `https://apiv2.senso.ai/api/v1`
- URL: `https://apiv2.senso.ai/api/v1/org/users/{userId}/current`
- Auth: API key in header `X-API-Key`

Marks your organization as the given user's currently selected org. Only `is_current: true` is accepted — this endpoint cannot un-set a current org.

## Path parameters

- `userId` string, uuid, required

## Request body

- SetCurrentOrgRequest
  - `is_current` true, required: Must be `true` — this endpoint only sets the current org, it cannot clear it (`false` is rejected with 400).

## Response `200`

The updated membership.

- OrgUserResponse: A user's membership in your organization.
  - `org_user_id` string, uuid, required
  - `org_id` string, uuid, required
  - `user_id` string, uuid, required
  - `role_id` string, uuid, required: The role assigned to the user in this org.
  - `is_current` boolean, required: Whether this org is the user's currently selected org.
  - `name` string: Org name — populated only by org-switcher list endpoints, absent here.
  - `slug` string: Org slug — populated only by org-switcher list endpoints, absent here.
  - `logo_url` string: Org logo URL — populated only by org-switcher list endpoints, absent here.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `deleted_at` string, date-time: When the membership was deleted; absent while it is active.

## Other responses

- `400`: The request body was invalid — either it failed field validation (`ValidationErrorResponse`) or was otherwise malformed (`ErrorResponse`).
- `401`: Missing or invalid credentials — supply a valid org API key in the `X-API-Key` header.
- `404`: The requested resource does not exist or is not visible to this key.

---

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