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

# Creates an audience snapshot based on the provided audience ID.
An audience snapshot is a captured state of the audience customers.



## OpenAPI

````yaml openapi/audience-v1.json POST /v1/audiences/{audienceId}/snapshot
openapi: 3.0.4
info:
  title: Audience.Api
  version: v1
servers:
  - url: https://{host}/audience
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v1/audiences/{audienceId}/snapshot:
    post:
      tags:
        - Audiences
      summary: |-
        Creates an audience snapshot based on the provided audience ID.
        An audience snapshot is a captured state of the audience customers.
      parameters:
        - name: audienceId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSnapshotRequest'
          text/json:
            schema:
              $ref: '#/components/schemas/CreateSnapshotRequest'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CreateSnapshotRequest'
        required: true
      responses:
        '202':
          description: Accepted
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/CreateSnapshotResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSnapshotResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/CreateSnapshotResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/WebServiceError'
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
            text/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
components:
  schemas:
    CreateSnapshotRequest:
      required:
        - authorName
      type: object
      properties:
        authorName:
          maxLength: 64
          minLength: 0
          type: string
          description: Name of the user who creates the snapshot.
      additionalProperties: false
    CreateSnapshotResponse:
      type: object
      properties:
        snapshotId:
          type: string
          nullable: true
        executionId:
          type: string
          nullable: true
        name:
          type: string
          nullable: true
        creationState:
          $ref: '#/components/schemas/AudienceCreationState'
        state:
          $ref: '#/components/schemas/AudienceState'
        authorName:
          type: string
          nullable: true
        size:
          type: integer
          format: int32
        source:
          type: string
          nullable: true
      additionalProperties: false
    WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
    AudienceCreationState:
      enum:
        - Pending
        - Created
      type: string
    AudienceState:
      enum:
        - Draft
        - Published
        - Archived
      type: string
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````