---
title: "Save a profile setup session"
method: POST
path: "/v1/profiles/{profileId}/save"
tags: ["Browser Context Profiles"]
---

# Save a profile setup session

`POST /v1/profiles/{profileId}/save`

## Request

- Base URL: `https://agent.tinyfish.ai`
- URL: `https://agent.tinyfish.ai/v1/profiles/{profileId}/save`
- Auth: API key in header `X-API-Key`

Captures cookies, local storage, and session storage from a running setup session into the Browser Context Profile. Requires the session_id returned by setup-session.

## Path parameters

- `profileId` string, required: Browser Context Profile ID

## Request body

- object
  - `session_id` string, required
  - `signed_in_sites` string[]: Sites the user says they signed into during this setup, as hosts or URLs. Each is recorded as signed in only if this save wrote cookies for it; for sites TinyFish can check, its sign-in cookie must be saved too. Ignored when sign-in tracking is not enabled for the account.

## Response `200`

Save a profile setup session succeeded.

- object
  - `domains_updated` string[], required
  - `domains_failed` string[], required
  - `cookie_count` integer, required
  - `domains_skipped` object, required
    - `cookies_skipped` string[], required
    - `local_storage_skipped` string[], required
    - `session_storage_skipped` string[], required
    - `blob_too_large` string[], required
  - `pages_captured` integer
  - `target_reads_skipped` integer
  - `cleanup_failed` boolean
  - `cleanup_kind` string
  - `signed_in_sites` string[]: Sites this save recorded as signed in, from sign-in cookies set during setup. Omitted when sign-in tracking is not enabled for the account.
  - `sign_in` object: Whether TinyFish saw a sign-in to the site setup started on. unverifiable when it cannot tell. Omitted when sign-in tracking is not enabled for the account.
    - `site` string, nullable, required
    - `status` 'recorded' | 'already_recorded' | 'not_detected' | 'unverifiable', required
  - `user_confirmed_sites` object: Present when the request sent signed_in_sites and sign-in tracking is enabled for the account: the registered domains recorded as signed in, and the sites rejected with a reason.
    - `recorded` string[], required
    - `rejected` object[], required
      - `site` string, required
      - `reason` 'invalid_site' | 'not_saved' | 'no_sign_in_cookie' | 'record_failed', required

## Other responses

- `400`: Captured state is invalid or exceeds limits.
- `401`: Unauthorized - Invalid or missing API key
- `404`: Browser Context Profile or setup session not found.
- `409`: Browser session is inactive, the profile is busy, or cleanup requires retry.
- `500`: Internal server error

---

[API](https://skmtc.dev/tinyfish/apis/tinyfish-web-agent-automation-api-2.md) · [All operations](https://skmtc.dev/tinyfish/apis/tinyfish-web-agent-automation-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/tinyfish/apis/tinyfish-web-agent-automation-api-2/revisions/6c73a54df35c?raw)
