Authentication is required. You can only update your own profile — the
endpoint always writes to the profile that matches the authenticated session,
regardless of the id in the URL.
Path parameters
UUID of the profile to update. Must match the authenticated user’s UUID.
Request body
Display name for the profile. Leading and trailing whitespace is stripped
before saving. Must be between 1 and 30 characters after trimming.
Short bio for the profile. Leading and trailing whitespace is stripped before
saving. Maximum 300 characters after trimming. Pass null or omit to clear
the field.
URL pointing to the user’s avatar image. Pass null or omit to clear the
field.
Validation rules
nombre is required and cannot be blank (empty string or whitespace only).
nombre must not exceed 30 characters after trimming.
sobre_mi, if provided, must not exceed 300 characters after trimming.
Examples
Full update
Clear optional fields
curl --request PUT \
--url 'https://yourdomain.com/api/perfil/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--cookie 'sb-access-token=<session-cookie>' \
--header 'Content-Type: application/json' \
--data '{
"nombre": "María García",
"sobre_mi": "Amante de la cocina tradicional.",
"avatar_url": "https://example.com/avatars/maria.png"
}'
200 — success
{
"message" : "Perfil actualizado correctamente"
}
400 — validation error
{
"error" : "El nombre no puede estar en blanco."
}
{
"error" : "El nombre no puede exceder los 30 caracteres."
}
{
"error" : "La sección 'Sobre mí' no puede exceder los 300 caracteres."
}
401 — unauthenticated
{
"error" : "No autorizado"
}
500 — internal server error
{
"error" : "Error interno del servidor"
}