Create a profile document
Documents
POST create document
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.eyJzdWIiOiIxODgwIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzUzMjY2MjI5LCJleHAiOjE3NTU4NTgyMjksImp0aSI6ImQyZTc0YTU2LWI3NTItNDJkNS04M2JlLWU4ZDhjNjUyYTI5NyJ9.gOw2ENG47ZezpSDfkH80d33KqLRb9Zg-hjenb2Ih6sA
Host: example.org
Cookie:
Body
{
"document": {
"file": "eyJfcmFpbHMiOnsiZGF0YSI6MzEsInB1ciI6ImJsb2JfaWQifX0=--ebeadec20caa2791b9340144104ad8ef37069d4e",
"name": "nemo"
}
}
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/"dec9c50c9676bb475ae20ce9f4120ce0"
cache-control: max-age=0, private, must-revalidate
x-request-id: a992083f-8943-4f2b-ab49-af612fc859b1
x-runtime: 0.045076
content-length: 361
Body
{
"document": {
"id": 1,
"file": {
"id": 27,
"signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzEsInB1ciI6ImJsb2JfaWQifX0=--ebeadec20caa2791b9340144104ad8ef37069d4e",
"byte_size": 596,
"filename": "test",
"url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzEsInB1ciI6ImJsb2JfaWQifX0=--ebeadec20caa2791b9340144104ad8ef37069d4e/test"
},
"name": "nemo"
}
}