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.eyJzdWIiOiIyOTMiLCJzY3AiOiJ1c2VyIiwiYXVkIjpudWxsLCJpYXQiOjE3Mzc1NTE1NTcsImV4cCI6MTc0MDE0MzU1NywianRpIjoiYzc4MjkwMjYtNDg2Zi00ZjExLWIxZmItNTUzMzM5NDdiMTBhIn0.HP_ibMsD8RctpSCegD-uh0m3wUltA8OFLjVOuXfgcGA
Host: example.org
Cookie: 

Body

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

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/"66f3a3eab2b652d543d780b48f8cb444"
cache-control: max-age=0, private, must-revalidate
x-request-id: 65ada76f-877f-4ba2-a7da-7d5b9f71d09d
x-runtime: 0.014303
content-length: 364

Body

{
  "record": {
    "name": "avatar",
    "record": {
      "id": 293,
      "email": "elayne.haag+driver@example.com",
      "phone_number": null,
      "pin": null,
      "pin_sent_at": null,
      "first_name": "Elayne",
      "last_name": "Haag",
      "created_at": "2025-01-22T13:12:37.477Z",
      "updated_at": "2025-01-22T13:12:37.503Z",
      "role": "driver",
      "unconfirmed_login": null,
      "referral_code": "628742",
      "discarded_at": null,
      "profile_id": null
    }
  }
}