# Create a community

To create a community through the API you will need to use endpoint&#x20;

`POST https://gate.whapi.cloud/communities`

{% embed url="<https://whapi.readme.io/reference/createcommunity>" %}
This method is responsible for creating a community
{% endembed %}

```json
curl --request POST \
     --url https://gate.whapi.cloud/communities \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {Your_Token}' \
     --header 'content-type: application/json' \
     --data '
{
  "subject": "A new community of scientists",
  "description": "This is where we bring together all our faculties to stay connected and up to date with the latest news"
}
'
```

Response Format:

```json
{
  "id": "120363326859215056@g.us",
  "name": "A new community of scientists",
  "conversationTimestamp": 1727856652,
  "subject": "A new community of scientists",
  "subjectOwner": "919984351847@s.whatsapp.net",
  "subjectTime": 1727856652,
  "size": 1,
  "creation": 1727856652,
  "owner": "919984351847@s.whatsapp.net",
  "desc": "This is where we bring together all our faculties to stay connected and up to date with the latest news",
  "descId": "9A7C840518933B604F7257DB",
  "restrict": false,
  "announce": false,
  "isCommunity": true,
  "isCommunityAnnounce": false,
  "joinApprovalMode": false,
  "memberAddMode": false,
  "participants": [
    {
      "id": "919984351847@s.whatsapp.net",
      "admin": "superadmin"
    }
  ],
  "author": "919984351847@s.whatsapp.net"
}
```

Please note that you will need a different ID to post to the community. Read more about it here: [Introduction](/help-desk/communities/introduction.md#important-aspects-of-the-api-community)&#x20;


---

# 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://support.whapi.cloud/help-desk/communities/create-a-community.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.
