Skip to main content
PUT
/
api
/
context
Update saved workspace context
curl --request PUT \
  --url https://app.puffle.ai/api/context \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "context": {
    "user": {
      "professionalBackground": "<string>"
    },
    "company": {
      "overview": "<string>",
      "product": "<string>",
      "problemSolved": "<string>",
      "differentiators": "<string>",
      "linkedInPresence": "<string>"
    },
    "content": {
      "linkedInVoice": "<string>",
      "recommendedTopics": [
        "<string>"
      ],
      "preferredTone": "<string>",
      "contentFormats": [
        "<string>"
      ],
      "topicsToAvoid": [
        "<string>"
      ],
      "postingCadence": "<string>"
    },
    "market": {
      "targetAudience": "<string>",
      "industryContext": "<string>",
      "icpJobTitles": [
        "<string>"
      ],
      "icpIndustries": [
        "<string>"
      ],
      "icpCompanySizes": [
        "<string>"
      ],
      "icpPainPoints": [
        "<string>"
      ],
      "icpKeywords": [
        "<string>"
      ]
    },
    "extra": {}
  },
  "profile": {
    "firstName": "<string>",
    "lastName": "<string>",
    "companyName": "<string>",
    "website": "<string>"
  }
}
'
{
  "context": {
    "user": {
      "professionalBackground": "<string>"
    },
    "company": {
      "overview": "<string>",
      "product": "<string>",
      "problemSolved": "<string>",
      "differentiators": "<string>",
      "linkedInPresence": "<string>"
    },
    "content": {
      "linkedInVoice": "<string>",
      "recommendedTopics": [
        "<string>"
      ],
      "preferredTone": "<string>",
      "contentFormats": [
        "<string>"
      ],
      "topicsToAvoid": [
        "<string>"
      ],
      "postingCadence": "<string>"
    },
    "market": {
      "targetAudience": "<string>",
      "industryContext": "<string>",
      "icpJobTitles": [
        "<string>"
      ],
      "icpIndustries": [
        "<string>"
      ],
      "icpCompanySizes": [
        "<string>"
      ],
      "icpPainPoints": [
        "<string>"
      ],
      "icpKeywords": [
        "<string>"
      ]
    },
    "extra": {}
  }
}

Overview

Replace the workspace context (ICP, company positioning, content strategy, user background) and optionally update identity fields on the user profile row. The body is validated end-to-end against the full context shape — partial objects are rejected with 400. As with getContext, this endpoint is part of the agent boot sequence. Typical flow: fetch with GET /api/context, mutate the sub-sections the user wants to change, and PUT the full object back. Onboarding also calls this internally after scraping the user’s LinkedIn and company website. Agents should not invent context — prefer asking the human for specifics or running onboarding to auto-derive it.
This operation shares the URL path /api/context with other verbs. See the sibling page for related operations on the same resource.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Whole-object replacement for context. There is no field-level PATCH — fetch with GET /api/context, mutate client-side, and PUT the full object back.

context
object
required

Full context object. Validated against FullUserContextSchema; all four sub-objects (user, company, content, market) must be present, extra may be null.

profile
object

Optional identity fields to update alongside the context JSONB columns. Only keys present in the body are applied.

Response

Context saved. Returns the newly persisted full context.

context
object
required

Assembled workspace context. Each sub-object is stored as a separate JSONB column on user_profiles and merged at read time.