POST /api/experience/user-assets/avatar

Upload an image (e.g. avatar) during the Register experience interaction and return the public URL of the uploaded asset. The user account may not have been created yet at this point; the upload is scoped to the current interaction session. The returned URL can then be submitted as a profile field value via POST /api/experience/profile.

multipart/form-data

Body

  • file

    The avatar image file to upload. Must be an allowed image type and not exceed the maximum upload file size.

Responses

  • 200 application/json

    The asset was uploaded successfully.

    Hide response attribute Show response attribute object
    • url string Required
  • 400

    Invalid request.
    - The current interaction event is not Register.
    - The file is invalid, exceeds the maximum size, has a disallowed image type, or storage is not configured.

  • 403

    Permission denied for the current interaction state.

  • 404

    Entity not found related to the current interaction.

  • 500

    Failed to upload the file to the storage provider.

POST /api/experience/user-assets/avatar
curl \
 --request POST 'https://[tenant_id].logto.app/api/experience/user-assets/avatar' \
 --header "Content-Type: multipart/form-data"
Response examples (200)
{
  "url": "string"
}