# Organization

## Members

### `memberships :` [`OrganizationMembership`](/reference/identity-javascript-sdk/the-base-package/organizations/organizationmembership.md)`[]`

All the memberships that this organization has.

### `api :` [`OrganizationApi`](/reference/identity-javascript-sdk/the-base-package/organizations/organizationapi.md)

The `OrganizationAPI` that this object was created with.

### `created : Date`

The date that the organization was created at.

### `id : number`

The ID of this organization.

### `name : string`

The name of this organization.

### `website : string`

The website URL of this organization.

### `address : string`

The address of this organization.

### `uniqueId : string`

The unique ID of this organization.

### `taxNumber : string`

The tax number of this organization.

### `city : string`

The city where this organization is based.

### `state : string`

The state where this organization is based.

### `verified : boolean`

The verification status of this organization.

### `zipCode : string`

The zip code where this organization is located.

### `counry : string`

The country where this organization is based.

## Methods

### `constructor(api, organization)`

Create a new Organization object using the [Organization API](/reference/organization-api.md).

* `api` must be an instance of [`OrganizationApi`](/reference/identity-javascript-sdk/the-base-package/organizations/organizationapi.md);
* `organization` must implement the [`OrganizationInfo`](/reference/identity-javascript-sdk/the-base-package/organizations/organizationapi.md#organizationinfo) interface.

```javascript
const details = await organizationApi.organizationInfo(organizationId)
const organization = new Organization(organizationApi, details)
```

### `async update(details)`

Update this organization's details.

The `details` object must implement the interface [`OrganizationUpdateDetails`](/reference/identity-javascript-sdk/the-base-package/organizations/organizationapi.md#organizationupdatedetails).

The result is a boolean that indicates success.

```javascript
if (await organization.update({name: 'New Name'})) {
    // the organization's name was updated successfully 
}
```

### `async invite(email)`

Invite a user to this organization by email.

The result is a boolean that indicates success.

```javascript
if (await organization.invite(email)) {
    // the user was invited successfully
}
```

### `async remove()`

Delete this organization.

The result is a boolean that indicates success.

```javascript
if (await organization.remove()) {
    // the organization was deleted successfully
}
```


---

# 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/identity-javascript-sdk/the-base-package/organizations/organization.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.
