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.eyJzdWIiOiIxODIwIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTkzLCJleHAiOjE3NDAxNDM1OTMsImp0aSI6IjFkZjQ0ZTU1LWM0MzctNDdhZS1hNmY0LWJmMTkzNzgyZmNiOCJ9.jnJZwxZt3CQXmROv_dP5_m0DpxDmvMYGUd-DdGJPU2s
Host: example.org
Cookie:
Body
{
"document": {
"file": "eyJfcmFpbHMiOnsiZGF0YSI6MjksInB1ciI6ImJsb2JfaWQifX0=--9e6492b3d2d97a2d4418745e7f7a710eda387ff1",
"name": "eos",
"profile_id": 702
}
}
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/"4f950e0d72f9fa6893022e902754d33d"
cache-control: max-age=0, private, must-revalidate
x-request-id: e4bcfe95-4ed7-4ddf-b203-4efa26360bc0
x-runtime: 0.060049
content-length: 360
Body
{
"document": {
"id": 2,
"file": {
"id": 27,
"signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MjksInB1ciI6ImJsb2JfaWQifX0=--9e6492b3d2d97a2d4418745e7f7a710eda387ff1",
"byte_size": 596,
"filename": "test",
"url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MjksInB1ciI6ImJsb2JfaWQifX0=--9e6492b3d2d97a2d4418745e7f7a710eda387ff1/test"
},
"name": "eos"
}
}