Method: conversations.surveys.create

  • You can create a customer satisfaction survey within a conversation.

  • Only the first survey sent within a 24-hour period in the same conversation will be delivered to the user.

  • Surveys are created by making a POST request to the specified API endpoint.

  • Each survey requires a unique identifier (surveyId) and is linked to a specific conversation using the parent parameter.

Creates a customer satisfaction survey in a conversation.

If an agent sends multiple surveys in the same conversation within 24 hours, Business Messages only attempts to send the first survey to the user.

HTTP request

POST https://businessmessages.googleapis.com/v1/{parent=conversations/*}/surveys

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The conversation that contains the survey. Resolves to "conversations/{conversationId}".

Query parameters

Parameters
surveyId

string

The unique identifier of the survey, assigned by the agent. If a survey attempts to use the same surveyId as a previous survey, Business Messages ignores the request.

Request body

The request body contains an instance of Survey.

Response body

If successful, the response body contains a newly created instance of Survey.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/businessmessages

For more information, see the OAuth 2.0 Overview.