DirectUploads

Delete current user’s avatar

DELETE attachment

Endpoint

DELETE /api/v1/users/attachment

Parameters

Name Description Enum
user[attachment_type] required Attachment type to remove ["avatar"]

Request

Route

DELETE /api/v1/users/attachment

Headers

Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIzMDAiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3NDI0NjQ5MTIsImV4cCI6MTc0NTA1NjkxMiwianRpIjoiNjhiM2NlMzItYjQzMi00MTk1LWJiY2ItYTEzNjdlOWU3MWVmIn0.sexKuZSrrPSN7ZYDjLVFZJjCPGuv4sPnGEJExj_Qv8I
Host: example.org
Cookie: 

Body

{
  "user": {
    "attachment_type": "avatar",
    "id": 300
  }
}

Response

Simulated Response

Status

200

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/json; charset=utf-8
vary: Accept, Origin
etag: W/"b6106f71bf7c7329c8c4dd621a00c9f3"
cache-control: max-age=0, private, must-revalidate
x-request-id: 890d8625-1792-4eb7-93b2-3faf7f5abb51
x-runtime: 0.011799
content-length: 374

Body

{
  "record": {
    "name": "avatar",
    "record": {
      "id": 300,
      "email": "olimpia.leuschke+driver@example.com",
      "phone_number": null,
      "pin": null,
      "pin_sent_at": null,
      "first_name": "Olimpia",
      "last_name": "Leuschke",
      "created_at": "2025-03-20T10:01:52.412Z",
      "updated_at": "2025-03-20T10:01:52.433Z",
      "role": "driver",
      "unconfirmed_login": null,
      "referral_code": "193738",
      "discarded_at": null,
      "profile_id": null
    }
  }
}