AviatoAviato
DeveloperAPI ReferenceAuthSetup

/api/auth/setup

POST
/api/auth/setup

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/auth/setup" \  -H "Content-Type: application/json" \  -d '{    "username": "string",    "password": "stringst"  }'
{
  "token": "string",
  "expiresAt": "string",
  "user": {
    "id": "string",
    "username": "string",
    "displayName": "string",
    "role": "admin",
    "publicKey": "string",
    "libraryAccess": [
      {
        "libraryId": "string",
        "maxRating": "string"
      }
    ],
    "enabled": true,
    "createdAt": "string",
    "lastLoginAt": "string"
  },
  "profiles": [
    {
      "id": "string",
      "userId": "string",
      "name": "string",
      "avatarUrl": "string",
      "libraryAccess": [
        {
          "libraryId": "string",
          "maxRating": "string"
        }
      ],
      "isDefault": true,
      "hasPin": true,
      "createdAt": "string",
      "updatedAt": "string"
    }
  ]
}
{
  "error": "string"
}