Required. The parent resource to charge for the Suggestion's generation. Format: projects/<Project ID>/locations/<Location ID>.
Request body
The request body contains data with the following structure:
JSON representation
{"contextReferences": {string: {object (ContextReference)},...},"conversationContext": {object (ConversationContext)},"triggerEvents": [enum (TriggerEvent)],"securitySettings": string,// Union field generator_resource can be only one of the following:"generator": {object (Generator)},"generatorName": string// End of list of possible types for union field generator_resource.}
Optional. A section of ingested context information. The key is the name of the context reference and the value contains the contents of the context reference. The key is used to incorporate ingested context references to enhance the generator.
An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
Optional. A list of trigger events. Generator will be triggered only if it's trigger event is included here.
securitySettings
string
Optional. Name of the CX SecuritySettings which is used to redact generated response. If this field is empty, try to fetch v2 securitySettings, which is a project level setting. If this field is empty and no v2 securitySettings set up in this project, no redaction will be done.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-27 UTC."],[[["\u003cp\u003eThis API endpoint generates a suggestion for a conversation that lacks a previously created resource, utilizing a POST request to the specified endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eparent\u003c/code\u003e path parameter specifying the project and location, formatted as \u003ccode\u003eprojects/<Project ID>/locations/<Location ID>\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe request body can include optional data like \u003ccode\u003econtextReferences\u003c/code\u003e, \u003ccode\u003econversationContext\u003c/code\u003e, and \u003ccode\u003etriggerEvents\u003c/code\u003e to customize the suggestion generation, it also accepts a pre-existing generator or the full definition of one.\u003c/p\u003e\n"],["\u003cp\u003eThe API returns a response body containing a \u003ccode\u003egeneratorSuggestion\u003c/code\u003e object that holds the generated suggestion for the conversation.\u003c/p\u003e\n"],["\u003cp\u003eAccess to this API requires authorization with one of the following OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Method: projects.locations.statelessSuggestion.generate\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.GenerateStatelessSuggestionResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nGenerates and returns a suggestion for a conversation that does not have a resource created for it.\n\n### HTTP request\n\n`POST https://{endpoint}/v2/{parent=projects/*/locations/*}/statelessSuggestion:generate`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/es/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nThe response message for [Conversations.GenerateStatelessSuggestion](/dialogflow/es/docs/reference/rest/v2/projects.locations.statelessSuggestion/generate#google.cloud.dialogflow.v2.Conversations.GenerateStatelessSuggestion).\n\nIf successful, the response body contains data with the following structure:\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]