# Change the own access

> Support code, own contact, social media accounts, panel settings of the own access - with a session only.

- Effect: Write - Changes the account. Agents ask first.
- Idempotent: yes
- Stability: beta
- REST: `POST https://api.manitu.de/v1/access/profile/set`
- Page: /reference/access/profile/set/

**Changes the account. Agents say what will happen and wait for an explicit yes before calling it.**

## REST

`POST https://api.manitu.de/v1/access/profile/set`

### Authentication

One of `X-API-Key`, `Authorization: Bearer …` - never more than one in a request.

### Request body

JSON; unknown fields are refused.

Send at least 1 field(s).

- `support_code` (object) - (minProperties `1`)
  - `support_code.status` (string) - (one of `"active"`, `"inactive"`)
  - `support_code.spelling_type` (string) - (one of `"none"`, `"de_postal"`, `"de_din5009"`, `"icao"`, `"misc_godhoods_gr"`, `"misc_astronomic_planetsmoons"`, `"misc_animals"`, `"misc_culinary"`, `"misc_moviecharacters"`, `"misc_startrek"`, `"misc_starwars"`)
- `contact` (object) - A sub access's own contact only. (minProperties `1`)
  - `contact.email` (string) - (minLength `3`; maxLength `128`)
  - `contact.phone_mobile` (string | null) - A mobile number; null or empty: none. (maxLength `32`)
- `socialmedia_account_list` (array of object) - All of them - the list replaces the one kept.
  - `socialmedia_account_list[].type` (string, required) - (one of `"mastodon"`, `"twitter"`)
  - `socialmedia_account_list[].name` (string, required) - (minLength `1`; maxLength `100`)
- `preferences_gui` (object)
  - `preferences_gui.table_page_length` (integer | null, required) - (one of `10`, `25`, `50`, `100`, `-1`, `null`)

### Response

In `data`; the rest of the body as on every call.

- `account_user_id` (integer, required) - The access.
- `type` (string, required) - primary: the main access; secondary: a sub access; ngcobalt_site_mail_user: a mailbox's. (one of `"primary"`, `"secondary"`, `"ngcobalt_site_mail_user"`)
- `username` (string | null, required) - What a sub access signs in with; null for the others.
- `description` (string | null, required) - What the customer wrote about it (his description), null if nothing - not its name or user name.
- `status` (string, required) - (one of `"active"`, `"inactive"`, `"deleted"`)
- `created_at` (string | null, required) - (format `date-time`)
- `valid_from` (string | null, required) - From when the access works; null: from its creation. (format `date-time`)
- `valid_until` (string | null, required) - Until when the access works; null: without end. (format `date-time`)
- `last_login_at` (string | null, required) - The last sign-in to the customer panel. (format `date-time`)
- `login_count` (integer, required) - How often the access signed in to the customer panel.
- `password_changed_at` (string | null, required) - (format `date-time`)
- `password_change_recommended` (boolean, required) - The password is kept in an outdated form - setting it again renews it.
- `phone_password_type` (string, required) - How the access proves itself on the phone to manitu's support: none, fixed (a password), oath-totp (a code from an authenticator app). (one of `"none"`, `"fixed"`, `"oath-totp"`)
- `support_code` (object, required)
  - `support_code.status` (string, required) - (one of `"active"`, `"inactive"`)
  - `support_code.spelling_type` (string, required) - (one of `"none"`, `"de_postal"`, `"de_din5009"`, `"icao"`, `"misc_godhoods_gr"`, `"misc_astronomic_planetsmoons"`, `"misc_animals"`, `"misc_culinary"`, `"misc_moviecharacters"`, `"misc_startrek"`, `"misc_starwars"`)
- `contact` (object | null, required) - A sub access's own contact; null for the main access (its contact is the account's) and a mailbox's.
  - `contact.email` (string | null, required)
  - `contact.phone_mobile` (string | null, required)
- `socialmedia_account_list` (array of object, required)
  - `socialmedia_account_list[].type` (string, required) - (one of `"mastodon"`, `"twitter"`)
  - `socialmedia_account_list[].name` (string, required)
- `preferences_gui` (object, required)
  - `preferences_gui.table_page_length` (integer | null, required) - Rows per table in the customer panel; -1: all; null: the default. (one of `10`, `25`, `50`, `100`, `-1`, `null`)

### Statuses

- `200` Success.
- `400` The request does not match the declared input schema.
- `401` No credential was presented, or it was not recognised.
- `403` The credential is not permitted to use this operation.
- `500` The server failed. Nothing about the request was wrong. Whether a change took effect is not known - check before trying it again.
- `503` The channel this operation forwards through is unavailable.

### Example

```sh
curl -X POST 'https://api.manitu.de/v1/access/profile/set' \
  -H 'X-API-Key: $API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

## Example result

```json
{
  "account_user_id": 12345,
  "type": "primary",
  "username": "string",
  "description": "Example",
  "status": "active",
  "created_at": "2026-10-23T12:00:00+02:00",
  "valid_from": "2026-10-23T12:00:00+02:00",
  "valid_until": "2026-10-23T12:00:00+02:00",
  "last_login_at": "2026-10-23T12:00:00+02:00",
  "login_count": 1,
  "password_changed_at": "2026-10-23T12:00:00+02:00",
  "password_change_recommended": true,
  "phone_password_type": "none",
  "support_code": {
    "status": "active",
    "spelling_type": "none"
  },
  "contact": {
    "email": "info@example.com",
    "phone_mobile": "string"
  },
  "socialmedia_account_list": [
    {
      "type": "mastodon",
      "name": "example.com"
    }
  ],
  "preferences_gui": {
    "table_page_length": 10
  }
}
```
