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

# Audience Details

> Retrieve a single audience's metadata, including its input variables with data types resolved from the input-variable registry.

Use this endpoint to **retrieve a single audience's metadata**.

## Endpoint

**GET** `/audience/details`

**Authentication:** Required (workspace auth)

## Query Parameters

| Parameter     | Type   | Required | Description         |
| ------------- | ------ | -------- | ------------------- |
| `audience_id` | number | Yes      | Audience identifier |

## Response

```json theme={null}
{
  "id": 55,
  "audience_name": "VIP Customers",
  "description": "High value customers",
  "source": 1,
  "source_file": null,
  "input_variables": [
    { "key": "mobile_no", "type": "phone" },
    { "key": "name", "type": "name" }
  ],
  "tags": ["vip", "renewal"],
  "total_contacts": 320,
  "status": 1,
  "created_date": "10 Dec, 2025 14:30",
  "updated_date": "2 hours ago"
}
```

| Field             | Type   | Description                                                                                                                                  |
| ----------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| `source`          | number | `1` = CSV/Bulk Upload, `2` = Manual                                                                                                          |
| `input_variables` | array  | Each of the audience's saved variable keys with its data type resolved from the input-variable registry (defaults to `string` if not found). |
| `status`          | number | See [Audience Status Codes](#audience-status-codes)                                                                                          |
| `updated_date`    | string | Relative time (e.g. `2 hours ago`)                                                                                                           |

## Audience Status Codes

| Code | Status   |
| ---- | -------- |
| `0`  | Inactive |
| `1`  | Active   |
| `2`  | Deleted  |

## Error Cases

| Error                     | Cause                                                                         |
| ------------------------- | ----------------------------------------------------------------------------- |
| `Audience Id is missing.` | `audience_id` not provided                                                    |
| `Audience not found`      | `audience_id` doesn't belong to the caller's company/workspace, or is deleted |

## Example cURL

```bash theme={null}
curl -X GET "https://www.tryunleashx.com/api/v1/global/audience/details?audience_id=55" \
  -H "token: <api_key>"
```


## OpenAPI

````yaml api-reference/openapi.json GET /audience/details
openapi: 3.1.0
info:
  title: >-
    UnleashX - Build human like conversations | Voice Agents | Automations | AI
    Workforce
  version: 1.0.0
  description: UnleashX - Your home for human like conversations
servers:
  - url: https://www.tryunleashx.com/api/v1/global/
security:
  - bearerAuth: []
paths:
  /audience/details:
    get:
      tags:
        - Audience
      summary: Audience details
      description: >-
        Retrieve a single audience's metadata, including its input variables
        with data types resolved from the input-variable registry.
      parameters:
        - name: token
          in: header
          required: true
          description: API token for authentication
          schema:
            type: string
        - name: audience_id
          in: query
          required: true
          schema:
            type: integer
          description: Audience identifier
      responses:
        '200':
          description: Audience details retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  audience_name:
                    type: string
                  description:
                    type: string
                  source:
                    type: integer
                    enum:
                      - 1
                      - 2
                  source_file:
                    type: string
                    nullable: true
                  input_variables:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          type: string
                        type:
                          type: string
                  tags:
                    type: array
                    items:
                      type: string
                  total_contacts:
                    type: integer
                  status:
                    type: integer
                    enum:
                      - 0
                      - 1
                      - 2
                  created_date:
                    type: string
                  updated_date:
                    type: string
        '400':
          description: Audience Id is missing.
        '401':
          description: Unauthorized
        '404':
          description: Audience not found
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````