Documents

Create a profile document

POST create document(admin)

Endpoint

POST /api/v1/users/profile/documents

Parameters

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

Request

Route

POST /api/v1/users/profile/documents

Headers

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

Body

{
  "document": {
    "file": "eyJfcmFpbHMiOnsiZGF0YSI6MzIsInB1ciI6ImJsb2JfaWQifX0=--b59537dc3d0aa992d0558d7186588f94b59ef352",
    "name": "praesentium",
    "profile_id": 703
  }
}

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/"d1ec021856aa9f3bc88dc28cc47fe137"
cache-control: max-age=0, private, must-revalidate
x-request-id: 13fecfe2-7348-4c06-8ad3-e9dfb14c3675
x-runtime: 0.069682
content-length: 368

Body

{
  "document": {
    "id": 2,
    "file": {
      "id": 28,
      "signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzIsInB1ciI6ImJsb2JfaWQifX0=--b59537dc3d0aa992d0558d7186588f94b59ef352",
      "byte_size": 596,
      "filename": "test",
      "url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIsInB1ciI6ImJsb2JfaWQifX0=--b59537dc3d0aa992d0558d7186588f94b59ef352/test"
    },
    "name": "praesentium"
  }
}