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

# Retrieve clients who granted consent for marketing for events by status

> Retrieves a list of clients who have granted consent for marketing purposes for events filtered by the specified status. Includes metrics such as total users, users who granted consent, users who revoked consent, and percentages.




## OpenAPI

````yaml get /marketing/clients-granted-consent/events
openapi: 3.0.1
info:
  title: TIXY Private Organizer API
  version: 1.0.0
  description: >
    The TIXY Private Organizer API provides endpoints for event organizers to
    manage their events  and handle secure interactions with clients. It
    includes CORS preflight support, event retrieval  by unique ID or slug, and
    integrates with AWS Lambda for custom backend processing.
servers:
  - url: https://private-api.tixyapp.com
security: []
paths:
  /marketing/clients-granted-consent/events:
    get:
      summary: Retrieve clients who granted consent for marketing for events by status
      description: >
        Retrieves a list of clients who have granted consent for marketing
        purposes for events filtered by the specified status. Includes metrics
        such as total users, users who granted consent, users who revoked
        consent, and percentages.
      parameters:
        - name: status
          in: query
          required: false
          description: >
            The status of the events to retrieve sales report for. If not
            specified, it defaults to `all`.  Valid values are:
              - `all`: Fetch sales report for all events.
              - `published`: Fetch sales report for events currently published.
              - `pastdue`: Fetch sales report for events whose dates have passed.
          schema:
            type: string
            enum:
              - all
              - published
              - pastdue
      responses:
        '200':
          description: >
            Successful response containing marketing consent information for
            clients associated with events matching the specified status.
          content:
            application/json:
              schema:
                type: array
                description: An array of event objects.
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: The UUID of the event.
                    name:
                      type: string
                      description: The name of the event.
                    slug:
                      type: string
                      description: A slug identifier for the event.
                    clientsGrantedConsent:
                      type: array
                      description: A list of clients who have granted consent.
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                            description: The client's first name.
                          lastName:
                            type: string
                            description: The client's last name.
                          email:
                            type: string
                            format: email
                            description: The client's email address.
                        required:
                          - name
                          - lastName
                          - email
                additionalProperties: false
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - privateOrganizerApiAuthFunction: []
components:
  responses:
    BadRequest:
      description: |
        Bad Request. The `id` parameter is invalid or malformed.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error message explaining the issue.
              code:
                type: string
                description: Error code indicating the error.
    Unauthorized:
      description: >
        Unauthorized. The request is not authenticated, or the provided
        credentials are invalid.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error message explaining the unauthorized request.
              code:
                type: string
                description: Error code indicating the reason for the unauthorized status.
    Forbidden:
      description: >
        Forbidden. The request is authenticated but does not have the necessary
        permissions to access the resource.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error message explaining the forbidden request.
              code:
                type: string
                description: Error code indicating the reason for the forbidden status.
    InternalServerError:
      description: >
        Internal Server Error. An unexpected error occurred while processing the
        request.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error message explaining the server issue.
              code:
                type: string
                description: Error code indicating the server error.
  securitySchemes:
    privateOrganizerApiAuthFunction:
      type: http
      scheme: bearer
      description: >
        Custom Bearer token authentication for accessing private organizer
        endpoints.
      x-amazon-apigateway-authtype: custom
      x-amazon-apigateway-authorizer:
        authorizerUri:
          uri:
            Fn::Sub: >-
              arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${organizerApiAuthFunction.Arn}/invocations
        authorizerResultTtlInSeconds: 300
        identitySource: method.request.header.Authorization

````