---
title: Creates a new event
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Cloudforce One](https://developers.cloudflare.com/api/python/resources/cloudforce_one)

[Threat Events](https://developers.cloudflare.com/api/python/resources/cloudforce_one/subresources/threat_events)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Creates a new event

cloudforce\_one.threat\_events.create(ThreatEventCreateParams\*\*kwargs) -> [ThreatEventCreateResponse](<https://developers.cloudflare.com/api/python/resources/cloudforce_one#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/cloudforce-one/events/create

To create a dataset, see the [`Create Dataset`](https://developers.cloudflare.com/api/resources/cloudforce_one/subresources/threat_events/subresources/datasets/methods/create/) endpoint. When `datasetId` parameter is unspecified, it will be created in a default dataset named `Cloudforce One Threat Events`.

##### Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. [Create a token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).

**Example:**`Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY`

##### Accepted Permissions (at least one required)

`Cloudforce One Write``Cloudforce One Read`

##### ParametersExpand Collapse

account\_id: str

Account ID.

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

category: str

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20category%20%3E%20(schema)>)

date: Union\[str, datetime]

formatdate-time

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20date%20%3E%20(schema)>)

event: str

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20event%20%3E%20(schema)>)

<details>

<summary>

raw: <a href="https://developers.cloudflare.com/api/python/resources/cloudforce_one/subresources/threat_events/methods/create#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20raw%20%3E%20(schema)">Raw</a>

</summary>

data: Optional\[Dict\[str, object]]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20raw%20%3E%20(schema)%20%3E%20(property)%20data">Link to this property</a>

source: Optional\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20raw%20%3E%20(schema)%20%3E%20(property)%20source">Link to this property</a>

tlp: Optional\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20raw%20%3E%20(schema)%20%3E%20(property)%20tlp">Link to this property</a>

</details>

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20raw%20%3E%20(schema)>)

tlp: str

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20tlp%20%3E%20(schema)>)

account\_id: Optional\[float]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20accountId%20%3E%20(schema)>)

attacker: Optional\[str]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20attacker%20%3E%20(schema)>)

attacker\_country: Optional\[str]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20attackerCountry%20%3E%20(schema)>)

dataset\_id: Optional\[str]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20datasetId%20%3E%20(schema)>)

indicator: Optional\[str]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20indicator%20%3E%20(schema)>)

<details>

<summary>

indicators: Optional\[Iterable\[Indicator]]

Array of indicators for this event. Supports multiple indicators per event for complex scenarios.

</summary>

indicator\_type: str

The type of indicator (e.g., DOMAIN, IP, JA3, HASH)

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20indicators%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20indicatorType">Link to this property</a>

value: str

The indicator value (e.g., domain name, IP address, hash)

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20indicators%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20value">Link to this property</a>

</details>

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20indicators%20%3E%20(schema)>)

indicator\_type: Optional\[str]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20indicatorType%20%3E%20(schema)>)

insight: Optional\[str]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20insight%20%3E%20(schema)>)

<details>

<summary>

source: Optional\[<a href="https://developers.cloudflare.com/api/python/resources/cloudforce_one/subresources/threat_events/methods/create#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20source%20%3E%20(schema)">Source</a>]

Controlled provenance for an event and its indicators derived from a Threat Signals article.

</summary>

resource\_id: str

formatuuid

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20source%20%3E%20(schema)%20%3E%20(property)%20resourceId">Link to this property</a>

resource\_type: Literal\["article"]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20source%20%3E%20(schema)%20%3E%20(property)%20resourceType">Link to this property</a>

system: Literal\["threat-signals"]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20source%20%3E%20(schema)%20%3E%20(property)%20system">Link to this property</a>

title: Optional\[str]

Threat Signals article title; null for historical provenance without a stored title.

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20source%20%3E%20(schema)%20%3E%20(property)%20title">Link to this property</a>

</details>

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20source%20%3E%20(schema)>)

tags: Optional\[Sequence\[str]]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20tags%20%3E%20(schema)>)

target\_country: Optional\[str]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20targetCountry%20%3E%20(schema)>)

target\_industry: Optional\[str]

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(method)%20create%20%3E%20(params)%20default%20%3E%20(param)%20targetIndustry%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class ThreatEventCreateResponse: …

</summary>

attacker: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20attacker">Link to this property</a>

attacker\_country: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20attackerCountry">Link to this property</a>

attacker\_country\_alpha3: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20attackerCountryAlpha3">Link to this property</a>

category: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20category">Link to this property</a>

dataset\_id: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20datasetId">Link to this property</a>

date: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20date">Link to this property</a>

event: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20event">Link to this property</a>

has\_children: bool

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20hasChildren">Link to this property</a>

indicator: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20indicator">Link to this property</a>

indicator\_type: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20indicatorType">Link to this property</a>

indicator\_type\_id: float

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20indicatorTypeId">Link to this property</a>

kill\_chain: float

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20killChain">Link to this property</a>

mitre\_attack: List\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20mitreAttack">Link to this property</a>

mitre\_capec: List\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20mitreCapec">Link to this property</a>

num\_referenced: float

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20numReferenced">Link to this property</a>

num\_references: float

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20numReferences">Link to this property</a>

raw\_id: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20rawId">Link to this property</a>

referenced: List\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20referenced">Link to this property</a>

referenced\_ids: List\[float]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20referencedIds">Link to this property</a>

references: List\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20references">Link to this property</a>

references\_ids: List\[float]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20referencesIds">Link to this property</a>

tags: List\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20tags">Link to this property</a>

target\_country: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20targetCountry">Link to this property</a>

target\_country\_alpha3: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20targetCountryAlpha3">Link to this property</a>

target\_industry: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20targetIndustry">Link to this property</a>

tlp: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20tlp">Link to this property</a>

uuid: str

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20uuid">Link to this property</a>

insight: Optional\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20insight">Link to this property</a>

releasability\_id: Optional\[str]

<a href="#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)%20%3E%20(property)%20releasabilityId">Link to this property</a>

</details>

[Link to this property](<#(resource)%20cloudforce_one.threat_events%20%3E%20(model)%20threat_event_create_response%20%3E%20(schema)>)

### Creates a new event

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from datetime import datetime
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
threat_event = client.cloudforce_one.threat_events.create(
    path_account_id="account_id",
    category="Domain Resolution",
    date=datetime.fromisoformat("2022-04-01T00:00:00"),
    event="An attacker registered the domain domain.com",
    raw={
        "data": {
            "foo": "bar"
        }
    },
    tlp="amber",
)
print(threat_event.uuid)
```

200 example

```
{
  "attacker": "Flying Yeti",
  "attackerCountry": "CN",
  "attackerCountryAlpha3": "CHN",
  "category": "Domain Resolution",
  "datasetId": "dataset-example-id",
  "date": "2022-04-01T00:00:00Z",
  "event": "An attacker registered the domain domain.com",
  "hasChildren": true,
  "indicator": "domain.com",
  "indicatorType": "domain",
  "indicatorTypeId": 5,
  "killChain": 0,
  "mitreAttack": [
    " "
  ],
  "mitreCapec": [
    " "
  ],
  "numReferenced": 0,
  "numReferences": 0,
  "rawId": "453gw34w3",
  "referenced": [
    " "
  ],
  "referencedIds": [
    0
  ],
  "references": [
    " "
  ],
  "referencesIds": [
    0
  ],
  "tags": [
    "malware"
  ],
  "targetCountry": "US",
  "targetCountryAlpha3": "USA",
  "targetIndustry": "Agriculture",
  "tlp": "amber",
  "uuid": "12345678-1234-1234-1234-1234567890ab",
  "insight": "insight",
  "releasabilityId": "releasabilityId"
}
```

##### Returns Examples

200 example

```
{
  "attacker": "Flying Yeti",
  "attackerCountry": "CN",
  "attackerCountryAlpha3": "CHN",
  "category": "Domain Resolution",
  "datasetId": "dataset-example-id",
  "date": "2022-04-01T00:00:00Z",
  "event": "An attacker registered the domain domain.com",
  "hasChildren": true,
  "indicator": "domain.com",
  "indicatorType": "domain",
  "indicatorTypeId": 5,
  "killChain": 0,
  "mitreAttack": [
    " "
  ],
  "mitreCapec": [
    " "
  ],
  "numReferenced": 0,
  "numReferences": 0,
  "rawId": "453gw34w3",
  "referenced": [
    " "
  ],
  "referencedIds": [
    0
  ],
  "references": [
    " "
  ],
  "referencesIds": [
    0
  ],
  "tags": [
    "malware"
  ],
  "targetCountry": "US",
  "targetCountryAlpha3": "USA",
  "targetIndustry": "Agriculture",
  "tlp": "amber",
  "uuid": "12345678-1234-1234-1234-1234567890ab",
  "insight": "insight",
  "releasabilityId": "releasabilityId"
}
```