---
title: "Create or update a context entry"
method: PUT
path: "/context"
tags: ["context"]
---

# Create or update a context entry

`PUT /context`

Save context (ICP, Messaging Playbook, user profile, scraper entries, etc.).

## Request body

- object
  - `type` string, required — Context type — closed set (server rejects anything else with 400 INVALID_CONTEXT_TYPE). Pick the canonical slot that matches the content; free-form "custom:*" slugs are rejected. Per-slot contracts: • "user-profile" — Who the operator is — name, role, company, background. Saved once globally; personalises every message. • "offering" — What the operator sells — products, services, agencies, anything they deliver to clients. Saved once globally. • "icp" — Who this chat targets — titles, industries, seniority, geography, company size. Guides discovery and qualification. • "playbook" — How outreach is WRITTEN for this chat — strategy, angle, value-prop, voice/tone, AND the messaging cadence (initial DM, follow-up timing, J+N reminders). One field covers the full messaging brief. • "scraper-post" / "scraper-profile" / "scraper-company" / "scraper-hashtag" — sources mined on a recurring schedule to feed contacts into the chat's list. Each row carries its own lifecycle (active/paused/completed) and mineFrequencyMinutes.
  - `content` string — Markdown content. For scraper-* contexts, a JSON-serialized object with the source handle + mining state.
  - `scope` string — Defaults to "user". IMPORTANT: "scraper-*" types MUST use scope="campaign:{id}" — global user scope is rejected for these types.
  - `label` string — Display label
  - `postTicketId` string — For scraper-post: pass the _postTicketId value from each post object in the collect_posts result. Server resolves the real postUrl from the ticket — fabricated IDs are rejected.

## Response `200`

Context saved

- object
  - `success` true, required
  - `entry` object, required
    - `id` string, required — Unique entry ID
    - `type` string, required
    - `label` string, nullable, required
    - `content` string, required — Full content (present when fullContent=true) or a 200-char preview
    - `contentPreview` string — First 200 chars of content — present when fullContent is not requested
    - `scope` string, required
    - `updatedAt` string, required
  - `creditsUsed` integer, required — Credits consumed (always 0 for workspace operations).
  - `retryAfter` integer, required — Seconds to wait (always 0 for workspace operations).

## Other responses

- `400` — The server cannot or will not process the request due to something that is perceived to be a client error.
- `401` — Although HTTP specifies "unauthorized", this response means "unauthenticated". Authenticate to continue. NOTE: 401 is also returned with code "linkedin_not_connected" when the caller IS authenticated but has no connected LinkedIn account — connect LinkedIn (not re-authenticate) to continue.
- `403` — The client does not have access rights to the content.
- `404` — The server cannot find the requested resource.
- `409` — The request conflicts with the current state of the server.
- `410` — The requested content has been permanently deleted from the server.
- `422` — The request was well-formed but was unable to be followed due to semantic errors.
- `429` — Rate limit exceeded. Read error.retryAfter for the wait time in seconds.
- `500` — The server encountered a situation it does not know how to handle.
- `502` — LinkedIn returned a server error or the proxy connection failed. Retry after a few seconds.
- `503` — Proxy capacity temporarily exceeded. Retry after a few seconds.

---

[API](https://skmtc.net/berea/apis/bereach-api.md) · [All operations](https://skmtc.net/berea/apis/bereach-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/berea/bereach-api/revisions/3caf12036b26/schema)
