# Memberships

## Membership Info

<mark style="color:blue;">`GET`</mark> `https://identity.vulos.io/api/v1/organization/:organizationId/:membershipId`

Get information about a specific membership.

#### Path Parameters

| Name                                             | Type   | Description                |
| ------------------------------------------------ | ------ | -------------------------- |
| organizationId<mark style="color:red;">\*</mark> | String | The ID of the organization |
| membershipId<mark style="color:red;">\*</mark>   | String | The ID of the membership   |

#### Headers

| Name                                            | Type   | Description                                                               |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer authentication with the access token obtained using OpenID Connect |

{% tabs %}
{% tab title="200: OK Information about the member" %}

```javascript
{
    "roles": [
        { "name": "SuperAdmin", "id": "<guid>" }
    ],
    "firstName": "John",
    "lastName": "Doe",
    "email": "john.doe@example.com",
    "organizationId": 2,
    "membershipId": "<guid>"
    "userId": "<guid>"
}
```

{% endtab %}

{% tab title="400: Bad Request Error response" %}

```javascript
{
    "error": "Something went wrong",
    "code": "<errror code>",
    "request": "<request id>"
}
```

{% endtab %}

{% tab title="401: Unauthorized Empty body" %}

```javascript
```

{% endtab %}
{% endtabs %}

## Invite Member

<mark style="color:orange;">`PUT`</mark> `https://identity.vulos.io/api/v1/organization/:organizationId/invite/:email`

Invite a new member to an organization using their email address.

#### Path Parameters

| Name                                             | Type   | Description                                   |
| ------------------------------------------------ | ------ | --------------------------------------------- |
| organizationId<mark style="color:red;">\*</mark> | String | The ID of the organization                    |
| email<mark style="color:red;">\*</mark>          | String | The email of the member that will get invited |

#### Headers

| Name                                            | Type   | Description                                                               |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer authentication with the access token obtained using OpenID Connect |

{% tabs %}
{% tab title="200: OK Success message" %}

```javascript
{
     "success": true,
     "message": "A message describing the successful response"
}
```

{% endtab %}

{% tab title="400: Bad Request Error response" %}

```javascript
{
    "error": "Something went wrong",
    "code": "<errror code>",
    "request": "<request id>"
}
```

{% endtab %}

{% tab title="401: Unauthorized Empty body" %}

```javascript
```

{% endtab %}
{% endtabs %}

## Delete Membership

<mark style="color:red;">`DELETE`</mark> `https://identity.vulos.io/api/v1/organization/:organizationId/:membershipId/delete`

Delete a membership from an organization.

#### Path Parameters

| Name                                             | Type   | Description                |
| ------------------------------------------------ | ------ | -------------------------- |
| organizationId<mark style="color:red;">\*</mark> | String | The ID of the organization |
| membershipId<mark style="color:red;">\*</mark>   | String | The ID of the membership   |

#### Headers

| Name                                            | Type   | Description                                                               |
| ----------------------------------------------- | ------ | ------------------------------------------------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer authentication with the access token obtained using OpenID Connect |

{% tabs %}
{% tab title="200: OK Success message" %}

```javascript
{
     "success": true,
     "message": "A message describing the successful response"
}
```

{% endtab %}

{% tab title="400: Bad Request Error response" %}

```javascript
{
    "error": "Something went wrong",
    "code": "<errror code>",
    "request": "<request id>"
}
```

{% endtab %}

{% tab title="401: Unauthorized Empty body" %}

```javascript
```

{% endtab %}
{% endtabs %}

### Roles

If you want to update, delete and see the roles in a membership, you can use the following endpoints:

{% content-ref url="/pages/3GdY1lC1fanVmSKu1hEa" %}
[Roles](/reference/organization-api/memberships/roles.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.vulos.io/reference/organization-api/memberships.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
