# Get a Community

## Get Community

<mark style="color:blue;">`GET`</mark> `https://api.whisk.com/community/v2/{community_id}`

You can append the following path and query parameters to the base URL to pull details of a particular community:

#### Path Parameters

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| community\_id | string | The community identifier. |

#### Query Parameters

| Name   | Type  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| ------ | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| fields | array | <p>Any additional community details to retrieve. You can choose one or more of these supported values:<br>- <code>COMMUNITY\_FIELD\_DESCRIPTION</code><br>- <code>COMMUNITY\_FIELD\_TOPICS</code><br>- <code>COMMUNITY\_FIELD\_SOCIAL\_SETTINGS</code><br>- <code>COMMUNITY\_FIELD\_PERMISSIONS</code><br>- <code>COMMUNITY\_FIELD\_MEMBERS\_COUNT</code><br>- <code>COMMUNITY\_FIELD\_RECIPES\_COUNT</code><br>- <code>COMMUNITY\_FIELD\_SPONSORED</code><br><br><strong>Note</strong>: For performance reasons, we recommend using this parameter only when required.</p> |

#### Headers

| Name           | Type   | Description                                                                      |
| -------------- | ------ | -------------------------------------------------------------------------------- |
| Authentication | string | User token to authorize the API usage. For more information, see Authentication. |

```graphql
{
  "community": {
    "id": "string",
    "name": "string",
    "image": {
      "url": "string",
      "width": 0,
      "height": 0,
      "selection": {
        "x": 0,
        "y": 0,
        "width": 0,
        "height": 0
      }
    },
    "description": "string",
    "topics": [
      {
        "id": "string",
        "display_name": "string"
      }
    ],
    "social_settings": {
      "website_url": "string",
      "instagram_username": "string",
      "youtube_channel_url": "string",
      "tiktok_username": "string"
    },
    "permissions": {
      "role": "COMMUNITY_ROLE_INVALID",
      "mode": "COMMUNITY_CONTRIBUTION_PERMISSION_MODE_INVALID",
      "visibility": "COMMUNITY_VISIBILITY_INVALID"
    },
    "members": {
      "count": 0
    },
    "recipes": {
      "count": 0
    },
    "is_sponsored": true
  }
}
```

```yaml
{
  "error_code": "REAL_CODES_ARE_IN_ENDPOINT_DESCRIPTION",
  "message": "Additional details about error are not static and can be changed"
}
```

{% tab title="401 This failed response appears due to API authentication failure. The possible error codes that may appear are: auth.tokenNotFound , auth.tokenExpired, auth.tokenInvalid, auth.tokenRequired." %}

```yaml
{
  "code": "auth.tokenNotFound"
}
```

```yaml
This is unexpected response, something is wrong on our side, please contact: help@whisk.com
```

### Sample Request and Response

{% tabs %}
{% tab title="Curl Request" %}

```bash
curl -X GET "https://api.whisk.com/community/v2/39d539c738eb47debfb1a6319d34235a?fields=COMMUNITY_FIELD_DESCRIPTION&fields=COMMUNITY_FIELD_TOPICS&fields=COMMUNITY_FIELD_SOCIAL_SETTINGS&fields=COMMUNITY_FIELD_PERMISSIONS&fields=COMMUNITY_FIELD_MEMBERS_COUNT&fields=COMMUNITY_FIELD_RECIPES_COUNT&fields=COMMUNITY_FIELD_SPONSORED"
    -H "Accept: application/json" 
    -H "Authorization: Bearer <YOUR-API-ACCESS-KEY>"
```

{% hint style="info" %}
Whisk allows you to discover and understand its API capabilities on the Swagger interface with the ability to try out the API calls directly in your browser. You can call this endpoint [here](https://api.whisk.com/spec/#/CommunityAPI/CommunityAPI_GetCommunity).
{% endhint %}
{% endtab %}

{% tab title="Response" %}

```graphql
{
  "community": {
    "id": "39d539c738eb47debfb1a6319d34235a",
    "name": "WAPID Community",
    "image": {
        "url": "https://image-cdn.whisk.com/image/upload/v1611066523/v3/user-recipes/nfaul13bavzqyiirk0sl.jpg",
        "width": 1280,
        "height": 854
        "selection": {
          "x": 0,
          "y": 88,
          "width": 422,
          "height": 767
    },
    "description": "Food and fun with WAPID!",
    "topics": [
      {
        "id": "914d167bb1754adbbcd1f085cdcc4f6c",
        "display_name": "Family Friendly"
      }
    ],
    "social_settings": {
      "website_url": "https://wapid.com/",
      "instagram_username": "wapid",
      "youtube_channel_url": "https://www.youtube.com/channel/WAPID",
      "tiktok_username": "wapid"
    },
     "permissions": {
      "role": "COMMUNITY_ROLE_OWNER",
      "mode": "COMMUNITY_CONTRIBUTION_PERMISSION_MODE_ANYONE",
      "visibility": "COMMUNITY_VISIBILITY_PUBLIC"
    },
    "members": {
      "count": 1
    },
    "recipes": {
      "count": 2
    },
    "is_sponsored": true
  }
}
```

{% hint style="info" %}
**Note**: To understand the data structure of a community definition, see [Community Object](/api/community.md#community-object).
{% endhint %}
{% endtab %}
{% endtabs %}


---

# 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://docs.whisk.com/api/community/get-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.
