contentstack Audiences API

Audiences are defined segments of users grouped by demographic, behavioral, or other attribute-based criteria for targeted content experiences.

Operations 4

GET /audiences Get all audiences #
POST /audiences Create an audience #
PUT /audiences/{id} Update an audience #
DELETE /audiences/{id} Delete an audience #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/contentstack-audiences-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

contentstack-audiences-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Contentstack Personalize Management Audiences API
  description: The Contentstack Personalize Management API provides programmatic control over the resources in a Contentstack Personalize project, including Attributes, Audiences, Events, and Experiences. Developers can use this API to create and manage audience segments based on user attributes and behavioral events, and to configure personalized content experiences for those segments. It is a REST API that follows standard CRUD conventions and is intended for use in headless personalization workflows where content targeting logic needs to be managed programmatically or integrated with external data platforms.
  version: v1
  contact:
    name: Contentstack Support
    url: https://www.contentstack.com/contact
  termsOfService: https://www.contentstack.com/legal/terms-of-service
servers:
- url: https://personalize-api.contentstack.com
  description: AWS North America Production Server
- url: https://eu-personalize-api.contentstack.com
  description: AWS Europe Production Server
- url: https://au-personalize-api.contentstack.com
  description: AWS Australia Production Server
- url: https://azure-na-personalize-api.contentstack.com
  description: Azure North America Production Server
- url: https://azure-eu-personalize-api.contentstack.com
  description: Azure Europe Production Server
security:
- bearerAuth: []
- authtokenAuth: []
tags:
- name: Audiences
  description: Audiences are defined segments of users grouped by demographic, behavioral, or other attribute-based criteria for targeted content experiences.
paths:
  /audiences:
    get:
      operationId: getAllAudiences
      summary: Get all audiences
      description: Retrieves all audience segment definitions in the Personalize project. Audiences define the user groups that experiences are targeted to.
      tags:
      - Audiences
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      responses:
        '200':
          description: A list of all audiences in the project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudienceList'
        '401':
          $ref: '#/components/responses/Unauthorized'
    post:
      operationId: createAudience
      summary: Create an audience
      description: Creates a new audience segment in the Personalize project based on attribute conditions and behavioral rules.
      tags:
      - Audiences
      parameters:
      - $ref: '#/components/parameters/ProjectUid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAudienceRequest'
      responses:
        '201':
          description: The newly created audience.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Audience'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /audiences/{id}:
    put:
      operationId: updateAudience
      summary: Update an audience
      description: Updates the rules and configuration of an existing audience segment.
      tags:
      - Audiences
      parameters:
      - $ref: '#/components/parameters/AudienceId'
      - $ref: '#/components/parameters/ProjectUid'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAudienceRequest'
      responses:
        '200':
          description: The updated audience.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Audience'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      operationId: deleteAudience
      summary: Delete an audience
      description: Permanently deletes an audience from the Personalize project. Audiences referenced in active experiences cannot be deleted.
      tags:
      - Audiences
      parameters:
      - $ref: '#/components/parameters/AudienceId'
      - $ref: '#/components/parameters/ProjectUid'
      responses:
        '200':
          description: Audience deleted successfully.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    AudienceList:
      type: object
      description: A list of audience segment definitions.
      properties:
        data:
          type: array
          description: Array of audience objects.
          items:
            $ref: '#/components/schemas/Audience'
    Audience:
      type: object
      description: An audience segment based on attribute rules and user behaviors.
      properties:
        uid:
          type: string
          description: Unique identifier of the audience.
        name:
          type: string
          description: Display name of the audience.
        description:
          type: string
          description: Description of the audience and its targeting criteria.
        rules:
          type: object
          description: Logical conditions that determine audience membership.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp when the audience was created.
    CreateAudienceRequest:
      type: object
      description: Parameters for creating or updating an audience.
      required:
      - name
      properties:
        name:
          type: string
          description: Display name for the audience.
        description:
          type: string
          description: Description of the audience targeting criteria.
        rules:
          type: object
          description: Logical conditions for audience membership.
    Error:
      type: object
      description: Standard error response.
      properties:
        message:
          type: string
          description: Human-readable description of the error.
        status:
          type: integer
          description: HTTP status code.
  parameters:
    ProjectUid:
      name: x-project-uid
      in: header
      required: true
      description: The UID of the Contentstack Personalize project.
      schema:
        type: string
    AudienceId:
      name: id
      in: path
      required: true
      description: The unique identifier of the audience.
      schema:
        type: string
  responses:
    Unauthorized:
      description: Authentication credentials are missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadRequest:
      description: The request is malformed or contains invalid parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: OAuth 2.0 Bearer token with personalize:manage or personalize:read scope.
    authtokenAuth:
      type: apiKey
      in: header
      name: authtoken
      description: Contentstack user authtoken for session-based authentication.
externalDocs:
  description: Contentstack Personalize Management API Documentation
  url: https://www.contentstack.com/docs/developers/apis/personalize-management-api