# Method: projects.attestors.create

- [HTTP request](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/create#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/create#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/create#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/create#body.request_body)
- [Response body](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/create#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors/create#body.aspect)

Creates an `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`, and returns a copy of the new `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`. Returns `NOT_FOUND` if the project does not exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor` already exists.

### HTTP request

`POST https://binaryauthorization.googleapis.com/v1/{parent=projects/*}/attestors`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent of this `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `binaryauthorization.attestors.create` |

### Query parameters

| Parameters ||
|---|---|
| `attestorId` | `string` Required. The `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor` ID. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`.

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.attestors#Attestor`.

### Authorization scopes

Requires the following OAuth scope:

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

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