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.eyJzdWIiOiIxODUyIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQyNDY0OTU0LCJleHAiOjE3NDUwNTY5NTQsImp0aSI6IjBhZmZkY2EyLWE3ZmYtNDZkOS1hZGI2LTE1Y2E3MDI3YTAwNyJ9.SNbgiSPO0GU995NJwnzQ1LuceI2ExTKwREmVcceBsjY
Host: example.org
Cookie: 

Body

{
  "document": {
    "name": "quia"
  }
}

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/"b44dd5c3a3670f280e10c276d9e20a3e"
cache-control: max-age=0, private, must-revalidate
x-request-id: 95c2c825-1daf-4fbb-9ff8-38cc3ae1d9b6
x-runtime: 0.015678
content-length: 381

Body

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