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

# List Custom Event Schemas

> Lists all custom event schemas available in the project.

> 📘 Custom Event Documentation
>
> Read [Custom Events](/prepare/custom-events) article to learn how custom events work in Voucherify.
>
>Read also the details about the [Track Custom Event](/api-reference/events/track-custom-event) endpoint and the [Custom Event Object](/api-reference/events/event-object).



## OpenAPI

````yaml /openapi/management.json get /management/v1/projects/{projectId}/custom-event-schemas
openapi: 3.0.1
info:
  title: Voucherify API - Management
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /management/v1/projects/{projectId}/custom-event-schemas:
    parameters:
      - schema:
          $ref: '#/components/schemas/ParameterProjectId'
        in: path
        name: projectId
        description: Provide the unique identifier of the project.
        required: true
    get:
      tags:
        - Management
      summary: List Custom Event Schemas
      description: >-
        Lists all custom event schemas available in the project.


        > 📘 Custom Event Documentation

        >

        > Read [Custom Events](/prepare/custom-events) article to learn how
        custom events work in Voucherify.

        >

        >Read also the details about the [Track Custom
        Event](/api-reference/events/track-custom-event) endpoint and the
        [Custom Event Object](/api-reference/events/event-object).
      operationId: list-custom-event-schemas
      parameters: []
      responses:
        '200':
          description: >-
            Returns the details about the custom event schemas created in the
            project.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/ManagementProjectsCustomEventSchemasListResponseBody
              examples:
                Example:
                  value:
                    object: list
                    data_ref: data
                    data:
                      - id: ms_t4ir0Dcu5T0m3v3nT5ch3ma
                        name: newsletter_subscribed
                        schema:
                          properties: {}
                        created_at: '2023-08-03T10:37:48.716Z'
                        object: custom-event-schema
                      - id: ms_s3c0N6cu5T0m3v3nT5ch3ma
                        name: review_left
                        schema:
                          properties: {}
                        created_at: '2023-08-03T10:37:48.710Z'
                        updated_at: '2024-04-26T14:35:03.463Z'
                        object: custom-event-schema
                      - id: ms_f1r5Tcu5T0m3v3nT5ch3ma
                        name: sign_up
                        schema:
                          properties: {}
                        created_at: '2023-08-03T10:37:48.705Z'
                        object: custom-event-schema
                    total: 3
        '401':
          description: Returns an error if an invalid token was provided.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Unauthorized:
                  value:
                    code: 401
                    message: Unauthorized
                    key: unauthorized
        '402':
          description: >-
            Returns an error if the current plan does not include the Management
            API feature.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorPaymentRequired'
              examples:
                Example:
                  value:
                    code: 402
                    message: Payment required
                    details: >-
                      Your current plan does not include a feature required to
                      perform this operation.
                    key: missing_required_feature
        '404':
          description: Returns an error when a resource could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Resource not found:
                  value:
                    code: 404
                    message: Resource not found
                    details: Cannot find project with id proj_5itvDU7
      security:
        - X-Management-Id: []
          X-Management-Token: []
components:
  schemas:
    ParameterProjectId:
      type: string
      example: proj_TrlkLiH4
    ManagementProjectsCustomEventSchemasListResponseBody:
      type: object
      description: Object containing a list of custom event schemas.
      properties:
        object:
          type: string
          default: list
          description: >-
            The type of the object represented by JSON. This object stores
            information about the custom event schemas in a dictionary.
          enum:
            - list
        data_ref:
          type: string
          default: data
          description: >-
            Identifies the name of the attribute that contains the array of
            custom event schema objects.
          enum:
            - data
        data:
          type: array
          description: Array of custom event schema objects.
          items:
            $ref: '#/components/schemas/ManagementProjectsCustomEventSchema'
        total:
          type: integer
          description: The total number of custom event schema objects.
      required:
        - object
        - data_ref
        - data
        - total
    Error:
      title: Error Object
      type: object
      description: Error details
      properties:
        code:
          type: integer
          description: Error's HTTP status code.
        key:
          type: string
          description: Short string describing the kind of error which occurred.
        message:
          type: string
          description: A human-readable message providing a short description of the error.
        details:
          type: string
          description: A human-readable message providing more details about the error.
        request_id:
          type: string
          example: v-0a885062c80375740f
          description: >-
            This ID is useful when troubleshooting and/or finding the root cause
            of an error response by our support team.
        resource_id:
          type: string
          description: >-
            Unique resource ID that can be used in another endpoint to get more
            details.
          example: rf_0c5d710a87c8a31f86
        resource_type:
          type: string
          description: The resource type.
          example: voucher
        error:
          type: object
          description: Includes additional information about the error.
          properties:
            message:
              type: string
              description: The message configured by the user in a validation rule.
      required:
        - code
        - message
    ErrorPaymentRequired:
      title: Payment Required Error
      type: object
      description: 'Error: Payment required - the current plan does not include the feature.'
      properties:
        code:
          type: integer
          description: Error's HTTP status code.
        message:
          type: string
          description: A human-readable message providing a short description of the error.
        details:
          type: string
          description: A human-readable message providing more details about the error.
        key:
          type: string
          description: Short string describing the kind of error which occurred.
      required:
        - code
        - message
        - details
        - key
    ManagementProjectsCustomEventSchema:
      type: object
      title: Management Projects Custom Event Schema
      description: Object containing the response to creating a custom event schema.
      allOf:
        - type: object
          properties:
            id:
              type: string
              description: Unique identifier of the custom event schema.
              example: ms_oA8CawM07Q8i05Cx62U6euTK
            name:
              type: string
              title: Custom Event Name
              description: >-
                User-defined name of the custom event. This is also shown in
                **Project Settings** > **Event Schema** in the Voucherify
                Dashboard.
        - $ref: '#/components/schemas/ManagementProjectsCustomEventSchemaBase'
        - type: object
          properties:
            created_at:
              type: string
              description: >-
                Timestamp representing the date and time when the custom event
                schema was created. The value is shown in the ISO 8601 format.
              format: date-time
              example: '2024-03-27T08:00:09.472Z'
            updated_at:
              type: string
              description: >-
                Timestamp representing the date and time when the custom event
                schema was updated. The value is shown in the ISO 8601 format.
              format: date-time
              example: '2024-03-27T08:00:09.472Z'
            object:
              type: string
              description: The type of the object represented by JSON.
              example: custom-event-schema
              default: custom-event-schema
              enum:
                - custom-event-schema
      required:
        - id
        - name
        - schema
        - created_at
        - object
    ManagementProjectsCustomEventSchemaBase:
      type: object
      title: Custom Event Schema
      description: Object representing a custom event schema.
      properties:
        schema:
          type: object
          description: >-
            Object containing custom event schema and its custom attributes
            (metadata).
          properties:
            properties:
              type: object
              description: Defines custom event custom attributes (metadata).
              additionalProperties:
                type: object
                title: Custom Event Properties
                description: Custom event metadata name.
                properties:
                  type:
                    type: string
                    description: Indicates the type of the custom event.
                    enum:
                      - string
                      - number
                      - date
                      - datetime
                      - boolean
                  optional:
                    type: boolean
                    description: >-
                      Indicates if this property is optional or not for the
                      resource.
                  deleted:
                    type: boolean
                    description: >-
                      Indicates if the property has been deleted from the
                      schema. A deleted schema is inactive, but it can be
                      restored.
                required:
                  - type
                  - optional
          required:
            - properties
  securitySchemes:
    X-Management-Id:
      type: apiKey
      name: X-Management-Id
      in: header
    X-Management-Token:
      type: apiKey
      name: X-Management-Token
      in: header

````