> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/xsoar-8-api/cortex-xsoar-8.x-apis/incident-fields.md).

# Incident Fields

APIs for managing incident fields

## Create a new incident field

> Define and create a new incident field.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Incident Fields","description":"APIs for managing incident fields"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/incidentfield":{"post":{"summary":"Create a new incident field","tags":["Incident Fields"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"version":{"type":"integer"},"cacheVersn":{"type":"integer"},"modified":{"type":"string"},"sizeInBytes":{"type":"integer"},"dbotCreatedBy":{"type":"string"},"CustomFields":{"$ref":"#/components/schemas/CustomFields"},"account":{"type":"string"},"autime":{"type":"integer"},"type":{"type":"string"},"rawType":{"type":"string"},"name":{"type":"string"},"rawName":{"type":"string"},"status":{"type":"integer"},"custom_status":{"type":"string"},"resolution_status":{"type":"string"},"reason":{"type":"string"},"created":{"type":"string"},"occurred":{"type":"string"},"closed":{"type":"string"},"sla":{"type":"integer"},"severity":{"type":"integer"},"investigationId":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Label"}},"attachment":{"nullable":true},"details":{"type":"string"},"openDuration":{"type":"integer"},"lastOpen":{"type":"string"},"closingUserId":{"type":"string"},"owner":{"type":"string"},"activated":{"type":"string"},"closeReason":{"type":"string"},"rawCloseReason":{"type":"string"},"closeNotes":{"type":"string"},"playbookId":{"type":"string"},"dueDate":{"type":"string"},"reminder":{"type":"string"},"runStatus":{"type":"string"},"notifyTime":{"type":"string"},"phase":{"type":"string"},"rawPhase":{"type":"string"},"isPlayground":{"type":"boolean"},"rawJSON":{"type":"string"},"parent":{"type":"string"},"parentXDRIncident":{"type":"string"},"retained":{"type":"boolean"},"category":{"type":"string"},"rawCategory":{"type":"string"},"linkedIncidents":{"nullable":true},"linkedCount":{"type":"integer"},"droppedCount":{"type":"integer"},"sourceInstance":{"type":"string"},"sourceBrand":{"type":"string"},"canvases":{"nullable":true},"lastJobRunTime":{"type":"string"},"feedBased":{"type":"boolean"},"dbotMirrorId":{"type":"string"},"dbotMirrorInstance":{"type":"string"},"dbotMirrorDirection":{"type":"string"},"dbotDirtyFields":{"nullable":true},"dbotCurrentDirtyFields":{"nullable":true},"dbotMirrorTags":{"nullable":true},"dbotMirrorLastSync":{"type":"string"},"isDebug":{"type":"boolean"},"changeStatus":{"type":"string"},"insights":{"type":"integer"}}}}}}},"operationId":"post-incidentfield","description":"Define and create a new incident field.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"caseInsensitive":{"type":"boolean"},"sla":{"type":"integer"},"propagationLabels":{"type":"array","items":{"type":"string"}},"unsearchable":{"type":"boolean"},"breachScript":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"null"}}}}}}}}},"components":{"schemas":{"CustomFields":{"title":"CustomFields","type":"object","additionalProperties":{"type":"object","properties":{}},"description":"The keys should be the field's display name, all lowercase and without spaces. For example: Scan IP -> scanip\nTo get the actual key name you can also go to Cortex XSOAR CLI and run /incident_add and look for the key that you would like to update."},"Label":{"title":"Label","type":"object","properties":{"type":{"type":"string"},"value":{"type":"string"}}}}}}
```

## Get all incident fields in the tenant

> Retrieve details on all incident fields in the tenant.

```json
{"openapi":"3.0.1","info":{"title":"Cortex XSOAR 8 API","version":"XSOAR 8 Cloud"},"tags":[{"name":"Incident Fields","description":"APIs for managing incident fields"}],"servers":[{"url":"https://api-yourfqdn","description":""}],"paths":{"/xsoar/public/v1/incidentfields":{"get":{"tags":["Incident Fields"],"summary":"Get all incident fields in the tenant","operationId":"get-xsoar-incidentfields","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IncidentField"}}}}}},"description":"Retrieve details on all incident fields in the tenant."}}},"components":{"schemas":{"IncidentField":{"type":"object","title":"IncidentField ...","properties":{"aliasTo":{"type":"string"},"aliases":{"type":"array","items":{"$ref":"#/components/schemas/FieldsAlias"}},"associatedToAll":{"type":"boolean"},"associatedTypes":{"description":"AssociatedTypes - list of incident (case) types IDs related to specific incident field","type":"array","items":{"type":"string"}},"autoCompleteTags":{"type":"array","items":{"type":"string"}},"breachScript":{"type":"string"},"cacheVersn":{"type":"integer","format":"int64"},"caseInsensitive":{"type":"boolean"},"cliName":{"type":"string"},"closeForm":{"type":"boolean"},"columns":{"type":"array","items":{"$ref":"#/components/schemas/GridColumn"}},"commitMessage":{"type":"string"},"content":{"type":"boolean"},"created":{"type":"string","format":"date-time"},"defaultRows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"object"}}},"definitionId":{"type":"string"},"description":{"type":"string"},"editForm":{"type":"boolean"},"fieldCalcScript":{"type":"string"},"fromServerVersion":{"$ref":"#/components/schemas/Version"},"group":{"$ref":"#/components/schemas/FieldGroup"},"hidden":{"type":"boolean"},"highlight":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"id":{"type":"string"},"indexName":{"type":"string"},"isReadOnly":{"type":"boolean"},"itemVersion":{"$ref":"#/components/schemas/Version"},"locked":{"type":"boolean"},"mergeStrategy":{"$ref":"#/components/schemas/FieldMergeStrategy"},"modified":{"type":"string","format":"date-time"},"name":{"type":"string"},"neverSetAsRequired":{"type":"boolean"},"numericId":{"type":"integer","format":"int64"},"openEnded":{"type":"boolean"},"orgType":{"type":"string"},"ownerOnly":{"type":"boolean"},"packID":{"type":"string"},"packName":{"type":"string"},"packPropagationLabels":{"type":"array","items":{"type":"string"}},"placeholder":{"type":"string"},"prevName":{"type":"string"},"primaryTerm":{"type":"integer","format":"int64"},"propagationLabels":{"type":"array","items":{"type":"string"}},"remote":{"type":"boolean"},"required":{"type":"boolean"},"runScriptAfterUpdate":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"sequenceNumber":{"type":"integer","format":"int64"},"shouldCommit":{"type":"boolean"},"sizeInBytes":{"type":"integer","format":"int64"},"sla":{"type":"integer","format":"int64"},"sortValues":{"type":"array","items":{"type":"string"}},"syncHash":{"type":"string"},"system":{"type":"boolean"},"systemAssociatedTypes":{"type":"array","items":{"type":"string"}},"template":{"type":"string"},"threshold":{"type":"number","format":"double"},"toServerVersion":{"$ref":"#/components/schemas/Version"},"type":{"type":"string"},"unmapped":{"type":"boolean"},"unsearchable":{"type":"boolean"},"useAsKpi":{"type":"boolean"},"validatedError":{"type":"string"},"validationRegex":{"type":"string"},"vcShouldIgnore":{"type":"boolean"},"vcShouldKeepItemLegacyProdMachine":{"type":"boolean"},"version":{"type":"integer","format":"int64"},"x2_fields":{"type":"string"}}},"FieldsAlias":{"type":"object","title":"FieldsAlias","properties":{"cliName":{"type":"string"},"type":{"type":"string"}}},"GridColumn":{"title":"GridColumn","type":"object","properties":{"displayName":{"type":"string"},"fieldCalcScript":{"type":"string"},"isDefault":{"type":"boolean"},"isReadOnly":{"type":"boolean"},"key":{"type":"string"},"orgType":{"type":"string"},"required":{"type":"boolean"},"script":{"type":"string"},"selectValues":{"type":"array","items":{"type":"string"}},"type":{"type":"string"},"width":{"type":"integer","format":"int64"}}},"Version":{"title":"Version","type":"object","properties":{"Digits":{"type":"array","description":"WARNING: when adding new attributes or changing the names\nof the existing ones, remember to add support in UnmarshalJSON\nfor items that were exported by msgpack.","items":{"type":"integer","format":"int64"}},"Label":{"type":"string"}},"description":"Version represents a version."},"FieldGroup":{"description":"FieldGroup is the field group","type":"number","format":"double"},"FieldMergeStrategy":{"description":"FieldMergeStrategy strategy for merging of indicator fields","type":"string"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/xsoar-8-api/cortex-xsoar-8.x-apis/incident-fields.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
