---
title: "Create a Membership"
method: POST
path: "/v1/memberships"
tags: ["Users"]
---

# Create a Membership

`POST /v1/memberships`

This endpoint allows you to invite a user to join your organization or
account.  A user will often be a person you wish to grant access to,
but it could also represent a team, an automated system, or any other
type of actor.

If an organization ID is provided, the user will be invited to that
organization. If not, they will be invited to the account associated
with this API credential. Note that while the sample return value
includes both an organization and an account for completeness, in
practice, only one or the other will be included.

Note that this is technically creating a Membership Invitation - the
actual membership won't be created until the user accepts the
invitation.

## Request body

- MembershipCreationParameters — Create a Membership
  - `email` string, required — The email address of the user you are inviting.
  - `first_name` string, required — The first name of the user you are inviting.
  - `last_name` string, required — The last name of the user you are inviting.
  - `permissions` 'Admin' | 'Security Engineer' | 'User' | 'Read-only' | 'Finance' | 'Marketing' | 'Provisioner', required — The specific permissions this membership will grant to the user.
  - `organization_id` integer — Include this parameter to invite a user to an organization instead of your account.

## Response `201`

Create a Membership

- object
  - `member_invitation` MemberInvitation — MemberInvitation model
    - `permissions` string — The specific level of permissions that have been granted to this user in the context of this membership.
    - `account` unknown
    - `organization` unknown
    - `user` unknown

## Other responses

- `400` — Something about the request is malformed.
- `403` — There was an issue with your API credential or permissions.
- `404` — Organization not found.
- `422` — Invalid creation parameters.

---

[API](https://skmtc.net/huntress/apis/huntress-api-reference.md) · [All operations](https://skmtc.net/huntress/apis/huntress-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huntress/huntress-api-reference/revisions/94acb422c07d/schema)
