# Method: projects.configurations.upsert

- [HTTP request](https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations/upsert#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations/upsert#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations/upsert#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations/upsert#body.request_body)
- [Response body](https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations/upsert#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations/upsert#body.UpsertConfigurationResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations/upsert#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations/upsert#body.aspect_1)

Creates or updates a configuration.

### HTTP request

`POST https://threatintelligence.googleapis.com/v1beta/{parent=projects/*}/configurations:upsert`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. Parent of the configuration. |

### Query parameters

| Parameters ||
|---|---|
| `publishTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Optional. Time that the configuration should be considered to have been published. This is an advanced feature used when onboarding and bulk loading data from other systems. Do not set this field without consulting with the API team. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/threat-intelligence/reference/rest/v1beta/projects.configurations#Configuration`.

### Response body

Response message for configurations.upsert.

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "configuration": string } ``` |

| Fields ||
|---|---|
| `configuration` | `string` Output only. Created configuration ID with server assigned id. |

### Authorization scopes

Requires the following OAuth scope:

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

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 `parent` resource:

- `threatintelligence.configurations.update`

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