# GET /v1/projects/:projectId/leased-accounts/requests/:requestId (/docs/api/reference/leased-accounts/get-lease-request)



<Endpoint method="GET" path="/v1/projects/:projectId/leased-accounts/requests/:requestId" auth="Bearer" scope="leased:write" phase="1" />

Read the current state of a lease request. Poll this while ops works through the queue. Cadence: once an hour is plenty — typical turnaround is under 48 hours in business days.

If you'd rather not poll, subscribe to the [`lease_request.assigned`](/docs/api/operational/webhooks) webhook event — the emit fires once ops fulfills the request.

<Parameters
  title="Path"
  rows="[
  { name: 'projectId', type: 'string', required: true, description: 'Project the request was submitted against.' },
  { name: 'requestId', type: 'string', required: true, description: 'Id returned by request-lease.' },
]"
/>

## Example request [#example-request]

<Tabs items="['curl', 'TypeScript', 'Python']">
  <Tab value="curl">
    ```bash
    curl https://api.layers.com/v1/projects/prj_01HX9Y7K8M2P4RSTUV56789AB/leased-accounts/requests/lreq_01HXZR7K8M2P4RSTUV56789AB \
      -H "Authorization: Bearer lp_live_01HX9Y6K7EJ4T2_4QZpN..."
    ```
  </Tab>

  <Tab value="TypeScript">
    ```ts
    const req = await layers.leasedAccounts.getRequest({
      projectId: "prj_01HX9Y7K8M2P4RSTUV56789AB",
      requestId: "lreq_01HXZR7K8M2P4RSTUV56789AB",
    });

    if (req.status === "assigned" || req.status === "partial") {
      const accounts = await layers.leasedAccounts.list({ projectId: req.projectId });
      // accounts.items now includes the assigned leased accounts
    }
    ```
  </Tab>

  <Tab value="Python">
    ```python
    req = layers.leased_accounts.get_request(
        project_id="prj_01HX9Y7K8M2P4RSTUV56789AB",
        request_id="lreq_01HXZR7K8M2P4RSTUV56789AB",
    )
    if req["status"] in ("assigned", "partial"):
        accounts = layers.leased_accounts.list(project_id=req["projectId"])
    ```
  </Tab>
</Tabs>

## Response [#response]

<Response status="200" description="Still queued">
  ```json
  {
    "requestId": "lreq_01HXZR7K8M2P4RSTUV56789AB",
    "projectId": "prj_01HX9Y7K8M2P4RSTUV56789AB",
    "status": "requested",
    "submittedAt": "2026-04-18T19:24:11Z",
    "assignedAt": null,
    "assignedSocialAccountIds": [],
    "note": null
  }
  ```
</Response>

<Response status="200" description="Partially fulfilled — fewer accounts than requested">
  ```json
  {
    "requestId": "lreq_01HXZR7K8M2P4RSTUV56789AB",
    "projectId": "prj_01HX9Y7K8M2P4RSTUV56789AB",
    "status": "partial",
    "submittedAt": "2026-04-18T19:24:11Z",
    "assignedAt": "2026-04-20T16:12:02Z",
    "assignedSocialAccountIds": [
      "sa_01HXZS8N3C5R6STUV7WXYZ9AB",
      "sa_01HXZS8N3C5R6STUV7WXYZ9AC",
      "sa_01HXZS8N3C5R6STUV7WXYZ9AD"
    ],
    "note": "Assigned 3 of 5 requested — the coffee/US pool is running thin. Will top up next week; open a follow-up request if you need the other 2 sooner."
  }
  ```
</Response>

### Status values [#status-values]

| `status`    | Terminal? | Meaning                                                                     |
| ----------- | --------- | --------------------------------------------------------------------------- |
| `requested` | no        | In the queue; not yet being worked.                                         |
| `assigned`  | yes       | All requested accounts delivered. See `assignedSocialAccountIds`.           |
| `partial`   | yes       | Some accounts delivered. `note` explains why not all.                       |
| `rejected`  | yes       | Request can't be fulfilled (e.g. niche not supported). `note` explains why. |

Planned additions: `in_review`, `provisioning`, `failed`. Existing partners don't need to change anything — the current four stay valid.

## Errors [#errors]

| Status | Code              | When                              |
| ------ | ----------------- | --------------------------------- |
| 401    | `UNAUTHENTICATED` | Missing or invalid key.           |
| 403    | `FORBIDDEN_SCOPE` | Key lacks `leased:write`.         |
| 404    | `NOT_FOUND`       | Request not in your organization. |

## See also [#see-also]

* [`POST /v1/projects/:id/leased-accounts/request`](/docs/api/reference/leased-accounts/request-lease) — submit a request
* [`GET /v1/projects/:id/leased-accounts`](/docs/api/reference/leased-accounts/list-leased-accounts) — list assigned accounts
