# Export the benefit audience

> Source: /api-reference/partner/explorer/loyalty/benefits/export-audience
> Downloads the audience. Defaults to a CSV file attachment; pass `format=json` for a structured JSON body instead.
> Full spec: https://docs.journey.com/openapi/partner.v1.json

## `GET /v1/partner/loyalty/programs/{programExternalId}/benefits/{externalId}/audience/export`

```json
{
  "description": "Downloads the audience. Defaults to a CSV file attachment; pass `format=json` for a structured JSON body instead.",
  "operationId": "loyaltyBenefitsPartner_exportAudience",
  "parameters": [
    {
      "description": "External benefit id.",
      "in": "path",
      "name": "externalId",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "External id of the loyalty program that owns the benefit.",
      "in": "path",
      "name": "programExternalId",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Response format. `json` returns a structured body; anything else, including omitting the parameter, returns a CSV attachment.",
      "in": "query",
      "name": "format",
      "required": false,
      "schema": {
        "enum": [
          "csv",
          "json"
        ],
        "type": "string"
      }
    },
    {
      "description": "External organization id (HXP UUID or WorkOS organization id). Only Journey superadmin callers may set it; for a partner credential the organization is taken from the credential and this parameter is ignored.",
      "in": "query",
      "name": "organizationId",
      "required": false,
      "schema": {
        "type": "string",
        "examples": [
          "org_01HZY3Q8K9W2V4X6B8N0M2P4R6"
        ]
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "type": "object"
          }
        },
        "text/csv": {
          "schema": {}
        }
      },
      "description": "The audience, as a CSV file attachment or — with `format=json` — a JSON body."
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerErrorResponse"
          }
        }
      },
      "description": "Request validation failed. `errors` lists the offending fields."
    },
    "401": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerErrorResponse"
          }
        }
      },
      "description": "No usable credential. Send `Authorization: Bearer <jwt>` or `X-API-Key: jny_...`."
    },
    "403": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerErrorResponse"
          }
        }
      },
      "description": "The credential authenticated but lacks the scopes in `x-required-scopes`, or the resource belongs to another organization."
    },
    "404": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PartnerErrorResponse"
          }
        }
      },
      "description": "No such resource, or it is outside the organization the credential resolves to."
    }
  },
  "security": [
    {
      "partnerBearer": []
    },
    {
      "partnerApiKey": []
    }
  ],
  "summary": "Export the benefit audience",
  "tags": [
    "partner/loyalty/benefits"
  ],
  "x-required-scopes": [
    [
      "partner:loyalty:benefits:read"
    ]
  ]
}
```