---
title: "Save Role"
method: POST
path: "/api/v1/onboarding/save-role"
tags: ["Onboarding"]
---

# Save Role

`POST /api/v1/onboarding/save-role`

## Request

- Base URL: `https://backend.caspr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://backend.caspr.ai/api/v1/onboarding/save-role`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

Save the user's role selection (Step 1).

When the chosen role is the ``Other`` row, ``custom_role_text`` must be
supplied in the request body and is persisted alongside the role.

## Request body

- SaveUserRoleRequest
  - `role_id` string, required
  - `custom_role_text` string, nullable: Free-text description the user typed when selecting the 'Other' role. Required only when role_id maps to the 'other' row in user_roles; ignored otherwise.

## Response `200`

Successful Response

- OnboardingStepResponse
  - `success` boolean, required
  - `message` string
  - `error` string, nullable

## Other responses

- `422`: Validation Error

---

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