Users

Delete current user’s avatar

DELETE avatar

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.eyJzdWIiOiIxNjI1Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTg4LCJleHAiOjE3NDAxNDM1ODgsImp0aSI6IjgwYWEyMTNlLTYxYjItNDcyYS04NzY5LTY5NDJlNTU2OWE3ZiJ9.6XOWpW6U-Xsck3KTM4mVHA5B9Aa6f0mDoSu8IJ79QT0
Host: example.org
Cookie: 

Body

{
  "user": {
    "attachment_type": "avatar"
  }
}

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/"b801b538710f040d5efe462539fbbef3"
cache-control: max-age=0, private, must-revalidate
x-request-id: 6f8a8cdd-00f9-4532-9af6-23cf0d00ff8a
x-runtime: 0.011618
content-length: 369

Body

{
  "record": {
    "name": "avatar",
    "record": {
      "id": 1625,
      "email": "ted.bechtelar+driver@example.com",
      "phone_number": null,
      "pin": null,
      "pin_sent_at": null,
      "first_name": "Ted",
      "last_name": "Bechtelar",
      "created_at": "2025-01-22T13:13:08.719Z",
      "updated_at": "2025-01-22T13:13:08.781Z",
      "role": "driver",
      "unconfirmed_login": null,
      "referral_code": "269081",
      "discarded_at": null,
      "profile_id": null
    }
  }
}