---
title: "Set Code Profile"
method: POST
path: "/v1/projects/{project_id}/code-profile"
tags: ["onboarding"]
---

# Set Code Profile

`POST /v1/projects/{project_id}/code-profile`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/projects/{project_id}/code-profile`
- Auth: none declared

Record which frameworks this project's codebase uses (Developer+).

UPSERT: this REPLACES the stored profile. A repository can carry several
frameworks at once, so `frameworks` is a list — `detected_at` is stamped by
the server, one timestamp per write.

An unknown framework name is a **422**, never a silently stored string: the
dashboard renders these, so an unrenderable value would show up as a blank
chip instead of an error.

## Path parameters

- `project_id` string, required

## Request body

- CodeProfileIn
  - `frameworks` FrameworkIn[]: EVERY framework detected. A repo can carry several (an Astro site with a Next/React SPA inside), so this is a list. Posting REPLACES the profile — it does not merge, otherwise a framework removed from the repo could never be cleared.
    - `name` string, required: One of: react, vue, svelte, next, astro, react-native, capacitor. An unknown name is refused (422), never stored.
    - `source` string, nullable: Where it was detected: package.json | config | imports. `imports` is the weakest evidence, `package.json` the strongest.
  - `language` string, nullable: ts | js (optional).
  - `meta` object, nullable: Free-form run context. Stored verbatim; NO key is validated or guaranteed.

## Response `200`

Successful Response

- CodeProfileOut
  - `frameworks` FrameworkOut[]
    - `name` string, required
    - `source` string, nullable
    - `detected_at` string, date-time, required
  - `language` string, nullable
  - `meta` object
  - `updated_at` string, date-time, required
  - `updated_by_user_uuid` string, nullable
  - `updated_by_api_key_uuid` string, nullable
  - `via` string, required
  - `deduplicated` string[]
  - `formula` object

## Other responses

- `422`: Validation Error

---

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