Skip to content

Choose your avatar

PUT
/spaces/preferences/skin
curl --request PUT \
--url https://spaces.work.optidata.cloud/api/spaces/preferences/skin \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "skin": "premade:07" }'

Saves the avatar you appear with in every space. Send one of available_skins (premade:NN), a character made in the Spaces character maker (custom:…, when is_custom_skin_accepted is true), or null to go back to the default one. You see the change the next time you enter a space.

Media typeapplication/json
object
skin
required
string | null
Examples
{
"skin": "premade:07"
}

Your avatar and the ones you can choose from.

Media typeapplication/json
object
skin
required

Your avatar (premade:NN or custom:…).

string
has_skin_preference
required

false when you never picked one and skin is your default avatar.

boolean
available_skins
required
Array<string>
is_custom_skin_accepted
required

Whether characters made in the character maker (custom:…) are accepted.

boolean
Examples
Examplepreference
{
"skin": "premade:07",
"has_skin_preference": true,
"available_skins": [
"premade:01",
"premade:02",
"premade:03",
"premade:04",
"premade:05",
"premade:06",
"premade:07",
"premade:08"
],
"is_custom_skin_accepted": true
}

No authentication key was sent.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Exampleexpired
{
"error": "JWT passport expired: Passport expired"
}

The avatar is not one you can choose, or skin is missing.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
{
"message": "The selected skin is invalid.",
"errors": {
"skin": [
"The selected skin is invalid."
]
}
}