Delete a profile
const url = 'http://127.0.0.1:8765/api/profiles/example';const options = {method: 'DELETE'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://127.0.0.1:8765/api/profiles/exampleDelete a profile: it is archived as deleted and the journal keeps its history. Send Content-Type: application/json like every write (no body is read). The profile leaves GET /api/profiles, the switcher, new runs and background tagging; its runs and assessments stay readable (GET /api/runs?profile_id=… or include_deleted=1). The default profile and the only active profile are a 409. Deleting the selected profile selects the default; selected_profile_id is the selection after the delete. The answers and stories are the user’s and are untouched.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”A profile id from GET /api/profiles.
Responses
Section titled “Responses”Success.
object
Example
{ "deleted": "prof_2", "schema_version": "scout-profile-delete-response:1", "selected_profile_id": "prof_1"}Forbidden / forbidden_origin: loopback peer and Host 127.0.0.1:<port> or localhost:<port> only (Origin too on writes).
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}Not_found
object
object
Example
{ "error": { "code": "not_found", "message": "..." }}Scout_profile_default_delete, scout_profile_last_active, scout_profile_deleted
object
object
Example
{ "error": { "code": "scout_profile_default_delete", "message": "..." }}Unsupported_media_type: writes need Content-Type: application/json.
object
object
Examplegenerated
{ "error": { "allowed_keys": [ "example" ], "code": "example", "message": "example" }}