Skip to content

Delete a profile

DELETE
/api/profiles/{profile_id}
curl --request DELETE \
--url http://127.0.0.1:8765/api/profiles/example

Delete 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.

profile_id
required
string

A profile id from GET /api/profiles.

Success.

Media typeapplication/json
object
schema_version
required
Allowed value: scout-profile-delete-response:1
key
additional properties
any
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).

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}

Not_found

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "not_found",
"message": "..."
}
}

Scout_profile_default_delete, scout_profile_last_active, scout_profile_deleted

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Example
{
"error": {
"code": "scout_profile_default_delete",
"message": "..."
}
}

Unsupported_media_type: writes need Content-Type: application/json.

Media typeapplication/json
object
error
required
object
allowed_keys
Array<string>
code
required
string
message
required
string
key
additional properties
any
Examplegenerated
{
"error": {
"allowed_keys": [
"example"
],
"code": "example",
"message": "example"
}
}