- [HTTP request](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#body.aspect_1)
- [IntentEnum](https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#IntentEnum)

**Full name**: projects.locations.instances.generateSoarChatMessage

Generates an AI-driven chat response based on a specific security intent. Use this method to interact with an AI assistant for tasks such as analyzing case details, summarizing alerts, or exploring playbook logic. The response is tailored based on the provided intent and environmental context.

### HTTP request

`POST https://{endpoint}/v1alpha/{instance}:generateSoarChatMessage`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/chronicle/docs/reference/rest#rest_endpoints).

### Path parameters

| Parameters ||
|---|---|
| `instance` | `string` Required. The name of the parent resource, which is the SecOps instance associated with the request. Format: projects/{project}/locations/{location}/instances/{instance} |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "intent": enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#IntentEnum`), "userPrompt": string, "context": { object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.users.conversations.messages#Context`) } } ``` |

| Fields ||
|---|---|
| `intent` | ``enum (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances/generateSoarChatMessage#IntentEnum`)`` Required. The intent of the message. |
| `userPrompt` | `string` Required. The user's prompt. |
| `context` | ``object (`https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.users.conversations.messages#Context`)`` Required. The message's context. The context holds the information that is needed to generate the message. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/chronicle/docs/reference/rest/v1alpha/projects.locations.instances.users.conversations.messages#MessageResponse`.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/cloud-platform`
- `
  https://www.googleapis.com/auth/chronicle`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `instance` resource:

- `chronicle.instances.generateSoarChatMessage`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## IntentEnum

An open enumeration of all SOAR's supported chat intents. LINT.IfChange(intent_enum)

| Enums ||
|---|---|
| `INTENT_ENUM_UNSPECIFIED` | Represents a nullish value for the enum. |
| `CASE_INTROSPECTION` | Represents intent for SOAR case introspection. |
| `ALERT_INTROSPECTION` | Represents intent for SOAR alert introspection. |
| `PLAYBOOK_INTROSPECTION` | Represents intent for SOAR playbook introspection. |