Required. The parent location in which to create the subscription. Structured like projects/{project_number}/locations/{location}.
Authorization requires the following IAM permission on the specified resource parent:
pubsublite.subscriptions.create
Query parameters
Parameters
subscriptionId
string
Required. The ID to use for the subscription, which will become the final component of the subscription's name.
This value is structured like: my-sub-name.
skipBacklog
boolean
If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false.
Request body
The request body contains an instance of Subscription.
Response body
If successful, the response body contains a newly created instance of Subscription.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-17 UTC."],[],[],null,["# Method: admin.projects.locations.subscriptions.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nCreates a new subscription.\n\n### HTTP request\n\n`POST https://{endpoint}/v1/admin/{parent=projects/*/locations/*}/subscriptions`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/pubsub/lite/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Subscription](/pubsub/lite/docs/reference/rest/v1/admin.projects.locations.subscriptions#Subscription).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Subscription](/pubsub/lite/docs/reference/rest/v1/admin.projects.locations.subscriptions#Subscription).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/)."]]