---
title: "POST /v1/{+subscription}:pull"
method: POST
path: "/v1/{+subscription}:pull"
tags: ["projects"]
---

# POST /v1/{+subscription}:pull

`POST /v1/{+subscription}:pull`

Pulls messages from the server.

## Path parameters

- `subscription` string, required

## Request body

- PullRequest — Request for the `Pull` method.
  - `returnImmediately` boolean — Optional. If this field set to true, the system will respond immediately even if it there are no messages available to return in the `Pull` response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to `true` is discouraged because it adversely impacts the performance of `Pull` operations. We recommend that users do not set this field.
  - `maxMessages` integer — Required. The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/pubsub.md) · [All operations](https://skmtc.net/google/apis/pubsub/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/pubsub/versions/bf72396b5785/schema)
