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

# Create Audience

> Create an audience from filters and/or segment IDs.

Segment IDs must be passed as the **full exact ID with prefix** in the current
taxonomy nomenclature (`b2c_<number>` or `b2b_<number>`, e.g. `b2c_1253`).
The legacy Delivr format (`al_XXXXXX`) and bare numbers are no longer supported.




## OpenAPI

````yaml /openapi.yaml post /audiences
openapi: 3.0.0
info:
  title: AudienceLab API
  version: 1.0.0
  description: API endpoints for AudienceLab
servers:
  - url: https://api.audiencelab.io
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Audience
  - name: Pixel
  - name: Enrichment
paths:
  /audiences:
    post:
      tags:
        - Audience
      summary: Create Audience
      description: >
        Create an audience from filters and/or segment IDs.


        Segment IDs must be passed as the **full exact ID with prefix** in the
        current

        taxonomy nomenclature (`b2c_<number>` or `b2b_<number>`, e.g.
        `b2c_1253`).

        The legacy Delivr format (`al_XXXXXX`) and bare numbers are no longer
        supported.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AudienceCreateRequest'
      responses:
        '200':
          description: Audience created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudienceCreateResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AudienceCreateRequest:
      type: object
      properties:
        name:
          type: string
        filters:
          $ref: '#/components/schemas/AudienceFilters'
        segment:
          type: array
          description: >
            Optional list of audience segment IDs. Use the **full exact ID
            including its prefix**

            in the current taxonomy nomenclature:

            - `b2c_<number>` — consumer (B2C) segments, e.g. `b2c_1254`

            - `b2b_<number>` — business (B2B) segments, e.g. `b2b_1042`


            Pass the complete ID with its prefix. Bare numbers (`1253`) and the
            legacy

            Delivr format (`al_XXXXXX`) are **not** supported.
          items:
            type: string
          example:
            - b2c_1253
        days_back:
          type: integer
      required:
        - name
        - filters
    AudienceCreateResponse:
      type: object
      properties:
        audienceId:
          type: string
          example: 812b78c3-83e6-4d6a-8245-def0dde26223
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          example: error message
    AudienceFilters:
      type: object
      description: >-
        Filter criteria for audience selection. All array fields must be passed
        as arrays even for single values.
      properties:
        age:
          type: object
          description: Age range filter
          properties:
            minAge:
              type: integer
              description: Minimum age
              example: 25
            maxAge:
              type: integer
              description: Maximum age
              example: 45
        city:
          type: array
          description: List of cities to filter by
          items:
            type: string
        state:
          type: array
          description: >-
            List of states to filter by, skiptrace history (use abbreviations
            like CA, NY)
          items:
            type: string
        personalState:
          type: array
          description: >-
            List of states to filter by, current residence (use abbreviations
            like CA, NY)
          items:
            type: string
        zip:
          type: array
          description: List of ZIP codes to filter by
          items:
            type: string
        gender:
          type: array
          description: List of genders to filter by (M=Male, F=Female, U=Unknown)
          items:
            type: string
            enum:
              - M
              - F
              - U
        businessProfile:
          type: object
          description: Business profile filters
          properties:
            industry:
              type: array
              description: List of industries
              items:
                type: string
            seniority:
              type: array
              description: List of seniority levels
              items:
                type: string
            companyName:
              type: array
              description: List of company names
              items:
                type: string
            jobTitle:
              type: array
              description: List of job titles to include
              items:
                type: string
            excludeJobTitle:
              type: array
              description: >-
                List of job titles to exclude. Records with these job titles
                will be removed from results, but records with no job title
                value will still be included.
              items:
                type: string
        attributes:
          type: object
          description: Personal attributes filters
          properties:
            education:
              type: array
              description: >
                List of education levels to include.

                Accepted values: "high school", "bachelor's", "master's",
                "doctorate"
              items:
                type: string
                enum:
                  - high school
                  - bachelor's
                  - master's
                  - doctorate
              example:
                - bachelor's
                - master's
            excludeEducation:
              type: array
              description: >
                List of education levels to exclude. Records with these
                education levels will be removed from results, but records with
                no education value will still be included.

                Accepted values: "high school", "bachelor's", "master's",
                "doctorate"
              items:
                type: string
                enum:
                  - high school
                  - bachelor's
                  - master's
                  - doctorate
              example:
                - high school
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````