Documents

Update a profile document

PUT update document

Endpoint

PUT /api/v1/users/profile/documents/:id

Parameters

Name Description
document[name] required Document name
document[file] Document file

Request

Route

PUT /api/v1/users/profile/documents/3

Headers

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

Body

{
  "document": {
    "name": "soluta"
  }
}

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/"7aa4579b227e83087d66012168348e0a"
cache-control: max-age=0, private, must-revalidate
x-request-id: bf03bef3-c4be-4572-bc5a-78adb70b81a7
x-runtime: 0.013328
content-length: 383

Body

{
  "document": {
    "id": 3,
    "file": {
      "id": 29,
      "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzMsInB1ciI6ImJsb2JfaWQifX0=--bcc4e968bdb984ed331d01841e3ec046fb883735",
      "byte_size": 596,
      "filename": "test_image.png",
      "url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzMsInB1ciI6ImJsb2JfaWQifX0=--bcc4e968bdb984ed331d01841e3ec046fb883735/test_image.png"
    },
    "name": "soluta"
  }
}