---
title: "Refresh Cookie"
method: POST
path: "/api/linkedin-accounts/refresh-cookie"
tags: ["LinkedIn Accounts"]
---

# Refresh Cookie

`POST /api/linkedin-accounts/refresh-cookie`

## Request

- Base URL: `https://api.ruzora.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.ruzora.com/api/linkedin-accounts/refresh-cookie`
- Auth: HTTP bearer

Push a fresh LinkedIn cookie to all PhantomBuster phantoms.

Flow:
1. For each phantom (from env vars): GET current config via PB /agents/fetch
2. Update identities[0].sessionCookie + identities[0].userAgent
3. POST back via PB /agents/save
4. Return per-phantom result

In Mode A (UI paste), founder calls this from /settings/linkedin-accounts.
In Mode B (Playwright auto-refresh, future), a background job calls this.

## Request body

- RefreshCookieRequest
  - `li_at_cookie` string, required: Fresh li_at cookie value from browser DevTools → Application → Cookies → linkedin.com
  - `user_agent` string, required: Browser User-Agent string (run `navigator.userAgent` in DevTools console)
  - `phantom_ids` string[], nullable: Optional: specific phantoms to sync. Defaults to all known phantoms from env.

## Response `200`

Successful Response

- RefreshCookieResponse
  - `total` integer, required
  - `succeeded` integer, required
  - `failed` integer, required
  - `details` object[], required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api.md) · [All operations](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ruzora/apis/ruzora-candidate-crm-api/revisions/f9b8223f3ac4?raw)
