# Method: accounts.locations.questions.answers.upsert

- [HTTP request](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers/upsert#body.HTTP_TEMPLATE)
- [Path parameters](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers/upsert#body.PATH_PARAMETERS)
- [Request body](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers/upsert#body.request_body)
  - [JSON representation](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers/upsert#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers/upsert#body.response_body)
- [Authorization Scopes](https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers/upsert#body.aspect)

Creates an answer or updates the existing answer written by the user for the specified question. A user can only create one answer per question.

### HTTP request

`POST https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*/questions/*}/answers:upsert`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` The name of the question to write an answer for. |

### Request body

The request body contains data with the following structure:

| JSON representation ||
|---|---|
| ``` { "answer": { object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers#Answer`) } } ``` |

| Fields ||
|---|---|
| `answer` | ``object (`https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers#Answer`)`` The new answer. |

### Response body

If successful, the response body contains an instance of `https://developers.google.com/my-business/reference/rest/v4/accounts.locations.questions.answers#Answer`.

### Authorization Scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/plus.business.manage`
- `https://www.googleapis.com/auth/business.manage`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).