---
title: "Organizations"
description: "Create, list, read and rename organizations; members and invitations."
image: "https://talkto.sh/docs/opengraph.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://talkto.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Organizations

Create, list, read and rename organizations; members and invitations. Every route takes `Authorization: Bearer $TALKTO_API_KEY`. See [the overview](https://talkto.sh/docs/api/) for keys, request keys, replies and errors. Generated from [`/openapi.json`](https://talkto.sh/openapi.json).

## List accounts

```http
GET /v1/accounts
```

**Parameters**

| Parameter | In | Type | Required |
| --- | --- | --- | --- |
| `after` | query | string | No |
| `query` | query | string | No |
| `limit` | query | string | No |

**Returns** `data`: `items` (array of object), `nextCursor` (string or null).

**Example**

```sh
curl "https://talkto.sh/v1/accounts" \
  -H "Authorization: Bearer $TALKTO_API_KEY"
```

## Create account

```http
POST /v1/accounts
```

**Body**

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `name` | string | Yes |  |
| `requestKey` | string | Yes |  |

**Returns** `data`: `id` (ID), `organizationId` (string), `name` (string), `createdBy` (string), `createdAt` (string), `permissions` (object).

**Example**

```sh
curl -X POST "https://talkto.sh/v1/accounts" \
  -H "Authorization: Bearer $TALKTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"builds","requestKey":"a-unique-key-1"}'
```

## Get account

```http
GET /v1/accounts/{accountId}
```

**Parameters**

| Parameter | In | Type | Required |
| --- | --- | --- | --- |
| `accountId` | path | ID | Yes |

**Returns** `data`: `id` (ID), `organizationId` (string), `name` (string), `createdBy` (string), `createdAt` (string), `permissions` (object).

**Example**

```sh
curl "https://talkto.sh/v1/accounts/$ACCOUNT_ID" \
  -H "Authorization: Bearer $TALKTO_API_KEY"
```

## Rename account

```http
POST /v1/accounts/{accountId}/rename
```

**Parameters**

| Parameter | In | Type | Required |
| --- | --- | --- | --- |
| `accountId` | path | ID | Yes |

**Body**

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `name` | string | Yes |  |
| `requestKey` | string | Yes |  |

**Returns** `data`: `account` (object), `changed` (boolean).

**Example**

```sh
curl -X POST "https://talkto.sh/v1/accounts/$ACCOUNT_ID/rename" \
  -H "Authorization: Bearer $TALKTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"builds","requestKey":"a-unique-key-1"}'
```

## List members

```http
GET /v1/accounts/{accountId}/members
```

**Parameters**

| Parameter | In | Type | Required |
| --- | --- | --- | --- |
| `accountId` | path | ID | Yes |
| `after` | query | string | No |
| `query` | query | string | No |
| `limit` | query | string | No |

**Returns** `data`: `items` (array of object), `nextCursor` (string or null).

**Example**

```sh
curl "https://talkto.sh/v1/accounts/$ACCOUNT_ID/members" \
  -H "Authorization: Bearer $TALKTO_API_KEY"
```

## List invitations

```http
GET /v1/accounts/{accountId}/invitations
```

**Parameters**

| Parameter | In | Type | Required |
| --- | --- | --- | --- |
| `accountId` | path | ID | Yes |
| `after` | query | string | No |

**Returns** `data`: `items` (array of object), `nextCursor` (string or null).

**Example**

```sh
curl "https://talkto.sh/v1/accounts/$ACCOUNT_ID/invitations" \
  -H "Authorization: Bearer $TALKTO_API_KEY"
```

## Send invitation

```http
POST /v1/accounts/{accountId}/invitations
```

**Parameters**

| Parameter | In | Type | Required |
| --- | --- | --- | --- |
| `accountId` | path | ID | Yes |

**Body**

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `email` | string | Yes |  |

**Returns** `data`: `id` (string), `organizationId` (string), `email` (string), `state` (`"pending"` or `"accepted"` or `"expired"` or `"revoked"`), `createdAt` (string), `expiresAt` (string).

**Example**

```sh
curl -X POST "https://talkto.sh/v1/accounts/$ACCOUNT_ID/invitations" \
  -H "Authorization: Bearer $TALKTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"someone@example.com"}'
```

## Resend invitation

```http
POST /v1/accounts/{accountId}/invitations/{invitationId}/resend
```

**Parameters**

| Parameter | In | Type | Required |
| --- | --- | --- | --- |
| `accountId` | path | ID | Yes |
| `invitationId` | path | string | Yes |

**Returns** `data`: `id` (string), `organizationId` (string), `email` (string), `state` (`"pending"` or `"accepted"` or `"expired"` or `"revoked"`), `createdAt` (string), `expiresAt` (string).

**Example**

```sh
curl -X POST "https://talkto.sh/v1/accounts/$ACCOUNT_ID/invitations/$INVITATION_ID/resend" \
  -H "Authorization: Bearer $TALKTO_API_KEY"
```

## Cancel invitation

```http
DELETE /v1/accounts/{accountId}/invitations/{invitationId}
```

**Parameters**

| Parameter | In | Type | Required |
| --- | --- | --- | --- |
| `accountId` | path | ID | Yes |
| `invitationId` | path | string | Yes |

**Returns** `data`: `id` (string), `organizationId` (string), `email` (string), `state` (`"pending"` or `"accepted"` or `"expired"` or `"revoked"`), `createdAt` (string), `expiresAt` (string).

**Example**

```sh
curl -X DELETE "https://talkto.sh/v1/accounts/$ACCOUNT_ID/invitations/$INVITATION_ID" \
  -H "Authorization: Bearer $TALKTO_API_KEY"
```

Source: https://talkto.sh/docs/api/organizations/index.mdx
