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.eyJzdWIiOiIxODQ5Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQyNDY0OTUzLCJleHAiOjE3NDUwNTY5NTMsImp0aSI6IjUxODY1MjgwLWRkOTgtNDMyNS1iOGM5LTliZTM2NTFhMDhkNiJ9.EOfexQevqh5LBePbL3HfUTBZ654-NmUyBbR6nQbua2I
Host: example.org
Cookie:
Body
{
"document": {
"file": "eyJfcmFpbHMiOnsiZGF0YSI6MzEsInB1ciI6ImJsb2JfaWQifX0=--88ff9c99b80d68e57f07401692209c5170b6a02c",
"name": "officiis"
}
}
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/"7d4e61d61cd7216fde1cea0495289f67"
cache-control: max-age=0, private, must-revalidate
x-request-id: c7bd425c-0bd2-4fa0-a33c-10e3db7b73d6
x-runtime: 0.066116
content-length: 365
Body
{
"document": {
"id": 1,
"file": {
"id": 27,
"signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzEsInB1ciI6ImJsb2JfaWQifX0=--88ff9c99b80d68e57f07401692209c5170b6a02c",
"byte_size": 596,
"filename": "test",
"url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzEsInB1ciI6ImJsb2JfaWQifX0=--88ff9c99b80d68e57f07401692209c5170b6a02c/test"
},
"name": "officiis"
}
}