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

# Create an ad audience

> Creates a provider-backed advertising audience. Requests use internal connected accountId plus platform-native adAccountId where required.



## OpenAPI

````yaml /api/openapi.json post /v1/ads/audiences
openapi: 3.1.0
info:
  title: Kavenio API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://kavenio.com/terms
  description: Generated OpenAPI document for the stable Kavenio public API.
servers:
  - url: https://api.kavenio.com
security:
  - bearerAuth: []
tags:
  - name: API keys
    description: Manage Kavenio API keys for the authenticated user.
  - name: Integrations
    description: Connect automation clients and manage workflow subscriptions.
  - name: Feature requests
    description: Submit feature requests from authenticated users.
  - name: Posts
    description: Create, schedule, update, and manage post lifecycle actions.
  - name: Queue
    description: Manage reusable post queue schedules and preview slots.
  - name: Media
    description: Upload, presign, and validate media assets.
  - name: Validation
    description: Validate post payloads and platform content length limits.
  - name: Connect
    description: Start and complete account connection flows.
  - name: Accounts
    description: Manage connected social accounts and account health.
  - name: Telegram
    description: Manage Telegram-specific connected account settings.
  - name: Discord
    description: Manage Discord messages, roles, pins, events, and settings.
  - name: Google Business
    description: Manage Google Business locations, reviews, and helpers.
  - name: Ads
    description: Create, read, cancel, and inspect advertising resources.
  - name: Ad audiences
    description: Manage advertising audiences and audience members.
  - name: Ad catalogs
    description: Inspect advertising catalogs and product sets.
  - name: Ad targeting
    description: Search targeting entities and estimate audience reach.
  - name: Ad conversions
    description: Manage conversion destinations and send conversion events.
  - name: Ad leads
    description: Manage lead forms and retrieve advertising leads.
  - name: Tracking tags
    description: Manage Meta tracking tags and tag sharing.
  - name: Platform credentials
    description: Manage organization platform app credentials.
  - name: Analytics
    description: Read provider analytics and operational inbox data.
  - name: WhatsApp conversions
    description: Read and send WhatsApp conversion events.
  - name: Activity
    description: Read operational activity events.
  - name: Webhooks
    description: Manage webhook endpoints and delivery logs.
paths:
  /v1/ads/audiences:
    post:
      tags:
        - Ad audiences
      summary: Create an ad audience
      description: >-
        Creates a provider-backed advertising audience. Requests use internal
        connected accountId plus platform-native adAccountId where required.
      operationId: createAdAudience
      requestBody:
        required: true
        content:
          application/json:
            example:
              accountId: bbbbbbbbbbbbbbbb
              adAccountId: act_123
              name: Customers
              type: customer_list
              description: Uploaded customer audience
            schema:
              oneOf:
                - type: object
                  properties:
                    accountId:
                      type: string
                      minLength: 16
                      maxLength: 16
                      pattern: >-
                        ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                    adAccountId:
                      type: string
                      minLength: 1
                    name:
                      type: string
                      minLength: 1
                      maxLength: 255
                    description:
                      type: string
                      minLength: 1
                    type:
                      type: string
                      enum:
                        - customer_list
                        - website
                        - lookalike
                    pixelId:
                      type: string
                      minLength: 1
                    retentionDays:
                      type: integer
                      minimum: 1
                      maximum: 540
                    sourceAudienceId:
                      type: string
                      minLength: 1
                    customerListId:
                      type: string
                      minLength: 1
                    country:
                      type: string
                      minLength: 2
                      maxLength: 2
                    ratio:
                      type: number
                      minimum: 0.01
                      maximum: 0.2
                    rule:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties: {}
                    customerFileSource:
                      type: string
                      minLength: 1
                    filePaths:
                      minItems: 1
                      maxItems: 50
                      type: array
                      items:
                        type: string
                        minLength: 1
                    calculateType:
                      type: string
                      minLength: 1
                    audienceSubType:
                      type: string
                      enum:
                        - NORMAL
                        - REACH_FREQUENCY
                    audienceEnhancement:
                      type: boolean
                    sourcePlatform:
                      type: string
                      minLength: 1
                    sourceSegmentId:
                      type: string
                      minLength: 1
                    dmpSegmentType:
                      type: string
                      enum:
                        - USER
                        - COMPANY
                        - LIST_UPLOAD
                  required:
                    - accountId
                    - adAccountId
                    - name
                    - type
                  additionalProperties: false
                - type: object
                  properties:
                    type:
                      type: string
                      const: saved_targeting
                    accountId:
                      type: string
                      minLength: 16
                      maxLength: 16
                      pattern: >-
                        ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                    name:
                      type: string
                      minLength: 1
                      maxLength: 255
                    description:
                      type: string
                      minLength: 1
                    spec:
                      type: object
                      properties:
                        countries:
                          type: array
                          items:
                            type: string
                            minLength: 2
                        regions:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                              name:
                                type: string
                                minLength: 1
                            required:
                              - key
                            additionalProperties: false
                        cities:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                              name:
                                type: string
                                minLength: 1
                              radius:
                                type: number
                                exclusiveMinimum: 0
                              distanceUnit:
                                type: string
                                enum:
                                  - mile
                                  - kilometer
                            required:
                              - key
                            additionalProperties: false
                        zips:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                              name:
                                type: string
                                minLength: 1
                            required:
                              - key
                            additionalProperties: false
                        metros:
                          type: array
                          items:
                            type: object
                            properties:
                              key:
                                type: string
                                minLength: 1
                              name:
                                type: string
                                minLength: 1
                            required:
                              - key
                            additionalProperties: false
                        customLocations:
                          type: array
                          items:
                            type: object
                            properties:
                              latitude:
                                type: number
                                minimum: -90
                                maximum: 90
                              longitude:
                                type: number
                                minimum: -180
                                maximum: 180
                              radius:
                                type: number
                                exclusiveMinimum: 0
                              distanceUnit:
                                type: string
                                enum:
                                  - mile
                                  - kilometer
                              name:
                                type: string
                                minLength: 1
                              address:
                                type: string
                                minLength: 1
                            required:
                              - latitude
                              - longitude
                              - radius
                              - distanceUnit
                            additionalProperties: false
                        excludedLocations:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties: {}
                        ageMin:
                          type: integer
                          minimum: 13
                          maximum: 100
                        ageMax:
                          type: integer
                          minimum: 13
                          maximum: 100
                        gender:
                          type: string
                          enum:
                            - all
                            - male
                            - female
                        incomeTier:
                          type: string
                          enum:
                            - top_5
                            - top_10
                            - top_10_25
                            - top_25_50
                        languages:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        interests:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              key:
                                type: string
                                minLength: 1
                              name:
                                type: string
                                minLength: 1
                            additionalProperties: {}
                        behaviors:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              key:
                                type: string
                                minLength: 1
                              name:
                                type: string
                                minLength: 1
                            additionalProperties: {}
                        demographics:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                minLength: 1
                              key:
                                type: string
                                minLength: 1
                              name:
                                type: string
                                minLength: 1
                            additionalProperties: {}
                        industries:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        companySizes:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        seniorities:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        jobFunctions:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        audienceInclude:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        audienceExclude:
                          type: array
                          items:
                            type: string
                            minLength: 1
                        placements:
                          type: object
                          propertyNames:
                            type: string
                          additionalProperties: {}
                        specialAdCategories:
                          type: array
                          items:
                            type: string
                            minLength: 1
                      additionalProperties: {}
                  required:
                    - type
                    - accountId
                    - name
                    - spec
                  additionalProperties: false
              type: object
      responses:
        '201':
          description: Create an ad audience completed.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      ok:
                        type: boolean
                        x-kavenio-const: true
                      data:
                        type: object
                        properties:
                          audience:
                            type: object
                            properties:
                              id:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                  - type: 'null'
                              platformAudienceId:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                  - type: 'null'
                              name:
                                type: string
                                minLength: 1
                              description:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              type:
                                type: string
                                enum:
                                  - customer_list
                                  - website
                                  - lookalike
                                  - saved_targeting
                              spec:
                                anyOf:
                                  - type: object
                                    properties:
                                      countries:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 2
                                      regions:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            key:
                                              type: string
                                              minLength: 1
                                            name:
                                              type: string
                                              minLength: 1
                                          required:
                                            - key
                                          additionalProperties: false
                                      cities:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            key:
                                              type: string
                                              minLength: 1
                                            name:
                                              type: string
                                              minLength: 1
                                            radius:
                                              type: number
                                              exclusiveMinimum: 0
                                            distanceUnit:
                                              type: string
                                              enum:
                                                - mile
                                                - kilometer
                                          required:
                                            - key
                                          additionalProperties: false
                                      zips:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            key:
                                              type: string
                                              minLength: 1
                                            name:
                                              type: string
                                              minLength: 1
                                          required:
                                            - key
                                          additionalProperties: false
                                      metros:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            key:
                                              type: string
                                              minLength: 1
                                            name:
                                              type: string
                                              minLength: 1
                                          required:
                                            - key
                                          additionalProperties: false
                                      customLocations:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            latitude:
                                              type: number
                                              minimum: -90
                                              maximum: 90
                                            longitude:
                                              type: number
                                              minimum: -180
                                              maximum: 180
                                            radius:
                                              type: number
                                              exclusiveMinimum: 0
                                            distanceUnit:
                                              type: string
                                              enum:
                                                - mile
                                                - kilometer
                                            name:
                                              type: string
                                              minLength: 1
                                            address:
                                              type: string
                                              minLength: 1
                                          required:
                                            - latitude
                                            - longitude
                                            - radius
                                            - distanceUnit
                                          additionalProperties: false
                                      excludedLocations:
                                        type: object
                                        propertyNames:
                                          type: string
                                        additionalProperties: {}
                                      ageMin:
                                        type: integer
                                        minimum: 13
                                        maximum: 100
                                      ageMax:
                                        type: integer
                                        minimum: 13
                                        maximum: 100
                                      gender:
                                        type: string
                                        enum:
                                          - all
                                          - male
                                          - female
                                      incomeTier:
                                        type: string
                                        enum:
                                          - top_5
                                          - top_10
                                          - top_10_25
                                          - top_25_50
                                      languages:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                      interests:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              minLength: 1
                                            key:
                                              type: string
                                              minLength: 1
                                            name:
                                              type: string
                                              minLength: 1
                                          additionalProperties: {}
                                      behaviors:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              minLength: 1
                                            key:
                                              type: string
                                              minLength: 1
                                            name:
                                              type: string
                                              minLength: 1
                                          additionalProperties: {}
                                      demographics:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            id:
                                              type: string
                                              minLength: 1
                                            key:
                                              type: string
                                              minLength: 1
                                            name:
                                              type: string
                                              minLength: 1
                                          additionalProperties: {}
                                      industries:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                      companySizes:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                      seniorities:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                      jobFunctions:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                      audienceInclude:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                      audienceExclude:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                      placements:
                                        type: object
                                        propertyNames:
                                          type: string
                                        additionalProperties: {}
                                      specialAdCategories:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                    additionalProperties: {}
                                  - type: 'null'
                              platform:
                                type: string
                                minLength: 1
                              accountId:
                                type: string
                                minLength: 1
                              adAccountId:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                  - type: 'null'
                              size:
                                anyOf:
                                  - type: integer
                                    minimum: -9007199254740991
                                    maximum: 9007199254740991
                                  - type: 'null'
                              status:
                                type: string
                                minLength: 1
                              createdAt:
                                type: string
                                minLength: 1
                              updatedAt:
                                type: string
                                minLength: 1
                            required:
                              - id
                              - platformAudienceId
                              - name
                              - type
                              - platform
                              - status
                            additionalProperties: false
                          metaData:
                            anyOf:
                              - type: object
                                propertyNames:
                                  type: string
                                additionalProperties: {}
                              - type: 'null'
                          message:
                            type: string
                            minLength: 1
                        required:
                          - audience
                        additionalProperties: false
                    required:
                      - ok
                      - data
                    additionalProperties: false
                  - type: object
                    properties:
                      ok:
                        type: boolean
                        x-kavenio-const: false
                      error:
                        type: object
                        properties:
                          code:
                            type: string
                            minLength: 1
                          message:
                            type: string
                            minLength: 1
                          details: {}
                        required:
                          - code
                          - message
                        additionalProperties: false
                    required:
                      - ok
                      - error
                    additionalProperties: false
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
        '500':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Clerk session or OAuth token

````