---
title: "Create Membership"
method: POST
path: "/api/v2/organization_memberships"
tags: ["Organization Memberships"]
---

# Create Membership

`POST /api/v2/organization_memberships`

Assigns a user to a given organization. Returns an error with status 422 if the user is already assigned to the organization.

#### Allowed For

* Admins
* Agents when creating a new organization membership for an end user

## Response `201`

Created response

- OrganizationMembershipResponse
  - `organization_membership` OrganizationMembershipObject
    - `created_at` string, date-time — When this record was created
    - `default` boolean, nullable, required — Denotes whether this is the default organization membership for the user. If false, returns `null`
    - `id` integer — Automatically assigned when the membership is created
    - `organization_id` integer, required — The ID of the organization associated with this user, in this membership
    - `organization_name` string — The name of the organization associated with this user, in this membership
    - `updated_at` string, date-time — When this record last got updated
    - `url` string — The API url of this membership
    - `user_id` integer, required — The ID of the user for whom this memberships belongs
    - `view_tickets` boolean — Denotes whether the user can or cannot have access to all organization's tickets.

---

[API](https://skmtc.dev/botbrains-io/apis/support-api.md) · [All operations](https://skmtc.dev/botbrains-io/apis/support-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/botbrains-io/support-api/revisions/d53eac07ba68/schema)
