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

# List Event Contracts

> List all event contracts in the current workspace



## OpenAPI

````yaml https://api.hightouch.io/api/swagger.json get /events/contracts
openapi: 3.0.0
info:
  title: Hightouch API
  version: 1.0.0
  description: Hightouch Public Rest API to access syncs, models, sources and destinations
  contact:
    name: Hightouch
    url: https://hightouch.com
servers:
  - url: https://api.hightouch.com/api/v1
security: []
paths:
  /events/contracts:
    get:
      summary: List Event Contracts
      description: List all event contracts in the current workspace
      operationId: ListContracts
      parameters:
        - in: query
          name: name
          required: false
          schema:
            type: string
        - description: set the offset on results (for pagination)
          in: query
          name: offset
          required: false
          schema:
            default: 0
            format: double
            type: number
        - description: limit the number of objects returned (default is 100)
          in: query
          name: limit
          required: false
          schema:
            default: 100
            format: double
            type: number
        - description: specify the order
          in: query
          name: orderBy
          required: false
          schema:
            default: id
            type: string
            enum:
              - id
              - name
              - createdAt
              - updatedAt
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      $ref: '#/components/schemas/EventContract'
                    type: array
                required:
                  - data
                type: object
              examples:
                Example 1:
                  value:
                    data:
                      - id: '1'
                        name: My Contract
                        slug: my-contract
                        workspaceId: 1
                        events:
                          - type: track
                            name: Checked Out
                            slug: track-checked-out
                            version: default
                            schema:
                              type: object
                              required:
                                - req
                              properties:
                                req:
                                  type: string
                              description: ''
                            onSchemaViolation: BLOCK_EVENT
                            onUndeclaredFields: BLOCK_EVENT
                        onUndeclaredSchema: BLOCK_EVENT
                        eventSources:
                          - id: '1'
                            name: Marketing Site
                        createdAt: '2022-02-16T21:37:58.510Z'
                        updatedAt: '2022-02-16T21:37:58.510Z'
                    hasMore: false
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '422':
          description: Validation Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidateErrorJSON'
      security:
        - bearerAuth: []
components:
  schemas:
    EventContract:
      description: A collection of schemas that are used for validating your events.
      properties:
        id:
          type: string
          description: The contract's id
        name:
          type: string
          description: The contract's name
        slug:
          type: string
          description: The contract's slug. If not specified, one will be generated.
        description:
          type: string
          description: The contract's description
        onUndeclaredSchema:
          type: string
          enum:
            - ALLOW_EVENT
            - BLOCK_EVENT
          description: >-
            What happens to events that aren't defined in the contract.

            One of ALLOW_EVENT or BLOCK_EVENT. Optional, defaults to
            ALLOW_EVENT.
        events:
          items:
            properties:
              schema:
                properties: {}
                additionalProperties: {}
                type: object
                description: The JSON schema that validates the event. Required.
              onUndeclaredFields:
                type: string
                enum:
                  - ALLOW_EVENT
                  - BLOCK_EVENT
                  - OMIT_FIELDS
                description: >-
                  What happens to events that contain fields not in the schema.

                  One of ALLOW_EVENT, BLOCK_EVENT, or OMIT_FIELDS. Optional,
                  defaults to OMIT_FIELDS.
              onSchemaViolation:
                type: string
                enum:
                  - ALLOW_EVENT
                  - BLOCK_EVENT
                description: >-
                  What happens to events that violate the schema.

                  One of ALLOW_EVENT or BLOCK_EVENT. Optional, defaults to
                  BLOCK_EVENT.
              version:
                type: string
                description: >-
                  The event version. Defaults to "default", optional. You
                  probably don't need to set this.
              slug:
                type: string
                description: The event's slug. If not specified, one will be generated.
              name:
                type: string
                description: The event's name. Required for track events.
              type:
                type: string
                enum:
                  - track
                  - identify
                  - page
                  - screen
                  - group
                description: >-
                  The event's type. One of track, identify, page, screen, or
                  group. Required.
            required:
              - schema
              - type
            type: object
          type: array
          description: The definitions for the events in the contract.
        workspaceId:
          type: number
          format: double
          description: The id of the workspace that the contract belongs to
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the contract was created
        updatedAt:
          type: string
          format: date-time
          description: The timestamp when the contract was last updated
        eventSources:
          items:
            properties:
              name:
                type: string
              id:
                type: string
            required:
              - name
              - id
            type: object
          type: array
          description: The Event Sources linked to the Contract.
      required:
        - id
        - name
        - workspaceId
        - createdAt
        - updatedAt
        - eventSources
      type: object
      additionalProperties: false
    ValidateErrorJSON:
      properties:
        message:
          type: string
          enum:
            - Validation failed
          nullable: false
        details:
          properties: {}
          additionalProperties: {}
          type: object
      required:
        - message
        - details
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer

````