GET /v1/projects/:projectId/leased-accounts/requests/:requestId
Poll a lease request until it transitions to assigned, partial, or rejected.
GET
/v1/projects/:projectId/leased-accounts/requests/:requestIdPhase 1stable
- Auth
- Bearer
- Scope
- leased:write
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 webhook event — the emit fires once ops fulfills the request.
Path
projectIdstringrequiredProject the request was submitted against.requestIdstringrequiredId returned by request-lease.
Example request
curl https://api.layers.com/v1/projects/prj_01HX9Y7K8M2P4RSTUV56789AB/leased-accounts/requests/lreq_01HXZR7K8M2P4RSTUV56789AB \
-H "Authorization: Bearer lp_live_01HX9Y6K7EJ4T2_4QZpN..."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
}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"])Response
200Still queued
{
"requestId": "lreq_01HXZR7K8M2P4RSTUV56789AB",
"projectId": "prj_01HX9Y7K8M2P4RSTUV56789AB",
"status": "requested",
"submittedAt": "2026-04-18T19:24:11Z",
"assignedAt": null,
"assignedSocialAccountIds": [],
"note": null
}200Partially fulfilled — fewer accounts than requested
{
"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."
}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
| 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
POST /v1/projects/:id/leased-accounts/request— submit a requestGET /v1/projects/:id/leased-accounts— list assigned accounts