---
title: "Extracts events from a document."
method: POST
path: "/events"
tags: ["events"]
---

# Extracts events from a document.

`POST /events`

## Request

- Base URL: `https://api.rosette.com/rest/v1`
- URL: `https://api.rosette.com/rest/v1/events`
- Auth: API key in header `X-RosetteAPI-Key`

Returns each event extracted from the input. The response is a list of event mentions. Each event includes a list of roles as well as any negation cues.

## Request body

- union
  - object
    - `content` string
    - `language` string: 3 letter code of language.
    - `options` object
      - `workspaceId` string: The id of a single events workspace (model)
      - `plan` string: A list of languages and workspaces. Allows multiple event models to be used in a single call
      - `negation` 'ignore' | 'both' | 'only_positive' | 'only_negative': Determines whether to evaluate the event for negation
  - object
    - `contentUri` string
    - `language` string: 3 letter code of language.
    - `options` object
      - `workspaceId` string: The id of a single events workspace (model)
      - `plan` string: A list of languages and workspaces. Allows multiple event models to be used in a single call
      - `negation` 'ignore' | 'both' | 'only_positive' | 'only_negative': Determines whether to evaluate the event for negation

## Response `200`

OK

- EventResponse
  - `events` Event[]: list of extracted events
    - `eventType` string
    - `mentions` RoleOffsets[]
      - `startOffset` integer
      - `endOffset` integer
      - `roles` Roles[]
        - `startOffset` integer
        - `endOffset` integer
        - `name` string: name of the role type
        - `id` string
        - `dataSpan` string: text of the role
        - `confidence` string
        - `extractorName` string: name of the extractor used to extract the role
        - `roleType` string
      - `polarity` string: whether the event happened or didn't happen
      - `negationCues` NegationOffsets[]: value of how negation cues should be extracted
        - `startOffset` integer
        - `endOffset` integer
        - `dataSpan` string: text value of the negation cues
    - `confidence` number: confidence score (0.0.-1.0)
    - `workspaceId` string: identifier of the event model that extracted the event

---

[API](https://skmtc.dev/babelstreet/apis/rosette-text-analytics.md) · [All operations](https://skmtc.dev/babelstreet/apis/rosette-text-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/babelstreet/apis/rosette-text-analytics/revisions/7c1d1497a5dd?raw)
