# Method: projects.traceSinks.create

- [HTTP request](https://docs.cloud.google.com/trace/docs/reference/v2/rest/v2beta1/projects.traceSinks/create#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/trace/docs/reference/v2/rest/v2beta1/projects.traceSinks/create#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/trace/docs/reference/v2/rest/v2beta1/projects.traceSinks/create#body.request_body)
- [Response body](https://docs.cloud.google.com/trace/docs/reference/v2/rest/v2beta1/projects.traceSinks/create#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/trace/docs/reference/v2/rest/v2beta1/projects.traceSinks/create#body.aspect)
- [Try it!](https://docs.cloud.google.com/trace/docs/reference/v2/rest/v2beta1/projects.traceSinks/create#try-it)

Creates a sink that exports trace spans to a destination. The export of newly-ingested traces begins immediately, unless the sink's `writerIdentity` is not permitted to write to the destination. A sink can export traces only from the resource owning the sink (the 'parent').

### HTTP request

`POST https://cloudtrace.googleapis.com/v2beta1/{parent=projects/*}/traceSinks`

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

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The resource in which to create the sink (currently only project sinks are supported): "projects/[PROJECT_ID]" Examples: `"projects/my-trace-project"`, `"projects/123456789"`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `parent`: - `cloudtrace.tracesinks.create` |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/trace/docs/reference/v2/rest/v2beta1/projects.traceSinks#TraceSink`.

### Response body

If successful, the response body contains a newly created instance of `https://docs.cloud.google.com/trace/docs/reference/v2/rest/v2beta1/projects.traceSinks#TraceSink`.

### Authorization scopes

Requires one of the following OAuth scopes:

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

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