---
title: "List Event Contracts"
method: GET
path: "/events/contracts"
---

# List Event Contracts

`GET /events/contracts`

List all event contracts in the current workspace

## Query parameters

- `name` string
- `offset` number, double
- `limit` number, double
- `orderBy` 'id' | 'name' | 'createdAt' | 'updatedAt'

## Response `200`

Ok

- object
  - `data` EventContract[], required
    - `id` string, required — The contract's id
    - `name` string, required — The contract's name
    - `slug` string — The contract's slug. If not specified, one will be generated.
    - `description` string — The contract's description
    - `onUndeclaredSchema` 'ALLOW_EVENT' | 'BLOCK_EVENT' — What happens to events that aren't defined in the contract. One of ALLOW_EVENT or BLOCK_EVENT. Optional, defaults to ALLOW_EVENT.
    - `events` object[] — The definitions for the events in the contract.
      - `schema` object, required — The JSON schema that validates the event. Required.
      - `onUndeclaredFields` 'ALLOW_EVENT' | 'BLOCK_EVENT' | 'OMIT_FIELDS' — 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` 'ALLOW_EVENT' | 'BLOCK_EVENT' — What happens to events that violate the schema. One of ALLOW_EVENT or BLOCK_EVENT. Optional, defaults to BLOCK_EVENT.
      - `version` string — The event version. Defaults to "default", optional. You probably don't need to set this.
      - `slug` string — The event's slug. If not specified, one will be generated.
      - `name` string — The event's name. Required for track events.
      - `type` 'track' | 'identify' | 'page' | 'screen' | 'group', required — The event's type. One of track, identify, page, screen, or group. Required.
    - `workspaceId` number, double, required — The id of the workspace that the contract belongs to
    - `createdAt` string, date-time, required — The timestamp when the contract was created
    - `updatedAt` string, date-time, required — The timestamp when the contract was last updated
    - `eventSources` object[], required — The Event Sources linked to the Contract.
      - `name` string, required
      - `id` string, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `422` — Validation Failed

---

[API](https://skmtc.net/hightouch/apis/hightouch-api.md) · [All operations](https://skmtc.net/hightouch/apis/hightouch-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hightouch/hightouch-api/revisions/24a8012aa8c8/schema)
