Create a profile document
Documents
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.eyJzdWIiOiIxODgyIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzUzMjY2MjI5LCJleHAiOjE3NTU4NTgyMjksImp0aSI6IjA3MzM1NWFmLWM5ZjAtNGNkYS1iZGZhLTk2NDYyNGViOGU2MSJ9.ZIZz8WfZcJ4C_PWdEHxYSQNfx1iwkSSuRVTKwuEORXU
Host: example.org
Cookie:
Body
{
"document": {
"file": "eyJfcmFpbHMiOnsiZGF0YSI6MzIsInB1ciI6ImJsb2JfaWQifX0=--4ce1db220b6462a11f50092b415fd4a2f3f9bf1d",
"name": "rem",
"profile_id": 708
}
}
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/"7dddb370221665b4d1c70b26c4324b62"
cache-control: max-age=0, private, must-revalidate
x-request-id: d663e73e-21d0-4fb8-83a8-eb1d02e8b08e
x-runtime: 0.044886
content-length: 360
Body
{
"document": {
"id": 2,
"file": {
"id": 28,
"signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MzIsInB1ciI6ImJsb2JfaWQifX0=--4ce1db220b6462a11f50092b415fd4a2f3f9bf1d",
"byte_size": 596,
"filename": "test",
"url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MzIsInB1ciI6ImJsb2JfaWQifX0=--4ce1db220b6462a11f50092b415fd4a2f3f9bf1d/test"
},
"name": "rem"
}
}