> For the complete documentation index, see [llms.txt](https://docs.clusters.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clusters.xyz/getting-started/javascript/registration/communities.md).

# Communities

## Check name availability

Check the availability of a community cluster name

```javascript
const isAvailable = await clusters.getCommunityNameAvailability("pengu/myname");
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "name": "pengu/myname",
  "isAvailable": false
}
```

{% endtab %}
{% endtabs %}

## Register a community name

Check the availability of one or more clusters

| Name                         | Description                                                                                                                                               |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `communityName`              | The name of the community you are registering under                                                                                                       |
| `name`                       | The name you want to register                                                                                                                             |
| `autheToken`                 | Authentication key                                                                                                                                        |
| `walletAddress` *(optional)* | If you are the admin of the community, you can register on behalf of someone. If this is left out the name will be registered to the authenticated wallet |

**Example**

```javascript
const name = await clusters.registerCommunityCluster(
   "pengu", 
   "myname",
   AUTH_TOKEN
);
```

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "clusterName": "pengu/myname",
  "owner": "0x123"
}
```

{% endtab %}
{% endtabs %}
