# Organizations (/sdk/reference/organizations)



{/* Generated by docs-site/scripts/generate-sdk-docs.ts — do not edit. */}

### `acceptInvite` [#acceptinvite]

`POST /api/v0/invites/accept`

Accept an invite

```ts
import { acceptInvite } from "@harmont/cloud";
```

```ts
acceptInvite(options): RequestResult<AcceptInviteResponse>
```

**Body** `AcceptInviteRequest` (optional)

**Returns** `AcceptInviteResponse`

See [`POST /api/v0/invites/accept`](/api/reference/organizations) for the full request and response schema.

### `createInvite` [#createinvite]

`POST /api/v0/organizations/{org}/invites`

Invite an email to the organization

```ts
import { createInvite } from "@harmont/cloud";
```

```ts
createInvite(options): RequestResult<CreateInviteResponse>
```

| Parameter | In   | Type     | Description |
| --------- | ---- | -------- | ----------- |
| `org`     | path | `string` | —           |

**Body** `CreateInviteRequest` (optional)

**Returns** `CreateInviteResponse`

See [`POST /api/v0/organizations/{org}/invites`](/api/reference/organizations) for the full request and response schema.

### `createOrganization` [#createorganization]

`POST /api/v0/organizations`

Create an organization

Creates a new organization with the authenticated user as its owner.

```ts
import { createOrganization } from "@harmont/cloud";
```

```ts
createOrganization(options): RequestResult<CreateOrganizationResponse>
```

**Body** `CreateOrganizationRequest` (optional)

**Returns** `CreateOrganizationResponse`

See [`POST /api/v0/organizations`](/api/reference/organizations) for the full request and response schema.

### `listInvites` [#listinvites]

`GET /api/v0/organizations/{org}/invites`

List pending invites

```ts
import { listInvites } from "@harmont/cloud";
```

```ts
listInvites(options): RequestResult<ListInvitesResponse>
```

| Parameter | In   | Type     | Description |
| --------- | ---- | -------- | ----------- |
| `org`     | path | `string` | —           |

**Returns** `ListInvitesResponse`

See [`GET /api/v0/organizations/{org}/invites`](/api/reference/organizations) for the full request and response schema.

### `listOrganizations` [#listorganizations]

`GET /api/v0/organizations`

List the current user's organizations

Returns the organizations the authenticated user is a member of, paginated.

```ts
import { listOrganizations } from "@harmont/cloud";
```

```ts
listOrganizations(options): RequestResult<ListOrganizationsResponse>
```

| Parameter | In    | Type     | Description                                         |
| --------- | ----- | -------- | --------------------------------------------------- |
| `limit`   | query | `number` | Page size (1–100, default 50).                      |
| `cursor`  | query | `string` | Opaque cursor from a previous page's `next_cursor`. |

**Returns** `ListOrganizationsResponse`

See [`GET /api/v0/organizations`](/api/reference/organizations) for the full request and response schema.

### `listOrgMembers` [#listorgmembers]

`GET /api/v0/organizations/{org}/members`

List organization members

```ts
import { listOrgMembers } from "@harmont/cloud";
```

```ts
listOrgMembers(options): RequestResult<ListOrgMembersResponse>
```

| Parameter | In   | Type     | Description |
| --------- | ---- | -------- | ----------- |
| `org`     | path | `string` | —           |

**Returns** `ListOrgMembersResponse`

See [`GET /api/v0/organizations/{org}/members`](/api/reference/organizations) for the full request and response schema.

### `removeOrgMember` [#removeorgmember]

`DELETE /api/v0/organizations/{org}/members/{user_id}`

Remove a member

```ts
import { removeOrgMember } from "@harmont/cloud";
```

```ts
removeOrgMember(options): RequestResult<RemoveOrgMemberResponse>
```

| Parameter | In   | Type     | Description |
| --------- | ---- | -------- | ----------- |
| `org`     | path | `string` | —           |
| `user_id` | path | `string` | —           |

**Returns** `RemoveOrgMemberResponse`

See [`DELETE /api/v0/organizations/{org}/members/{user_id}`](/api/reference/organizations) for the full request and response schema.

### `revokeInvite` [#revokeinvite]

`DELETE /api/v0/organizations/{org}/invites/{id}`

Revoke a pending invite

```ts
import { revokeInvite } from "@harmont/cloud";
```

```ts
revokeInvite(options): RequestResult<RevokeInviteResponse>
```

| Parameter | In   | Type     | Description |
| --------- | ---- | -------- | ----------- |
| `org`     | path | `string` | —           |
| `id`      | path | `string` | —           |

**Returns** `RevokeInviteResponse`

See [`DELETE /api/v0/organizations/{org}/invites/{id}`](/api/reference/organizations) for the full request and response schema.

### `updateOrgMember` [#updateorgmember]

`PATCH /api/v0/organizations/{org}/members/{user_id}`

Change a member's role

```ts
import { updateOrgMember } from "@harmont/cloud";
```

```ts
updateOrgMember(options): RequestResult<UpdateOrgMemberResponse>
```

| Parameter | In   | Type     | Description |
| --------- | ---- | -------- | ----------- |
| `org`     | path | `string` | —           |
| `user_id` | path | `string` | —           |

**Body** `UpdateMemberRoleRequest` (optional)

**Returns** `UpdateOrgMemberResponse`

See [`PATCH /api/v0/organizations/{org}/members/{user_id}`](/api/reference/organizations) for the full request and response schema.
