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.eyJzdWIiOiIxODE4Iiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzM3NTUxNTkzLCJleHAiOjE3NDAxNDM1OTMsImp0aSI6IjY3MjVjZjlkLTYzYzAtNDNkMy04ZDI0LWZmMGQ1ZDA5NzhhOSJ9.YNUPFU_J4eaR5vY1TEmPk7RG8Wmd3ckYnDAbPaxStU0
Host: example.org
Cookie:
Body
{
"document": {
"file": "eyJfcmFpbHMiOnsiZGF0YSI6MjgsInB1ciI6ImJsb2JfaWQifX0=--010aa4b6593c1371fac60c5741541789dc7dff34",
"name": "eum"
}
}
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/"e61b13f7773521eda23edc83f5afcb74"
cache-control: max-age=0, private, must-revalidate
x-request-id: 36ba95b9-331d-4f83-8fa2-cec2bd8b94c5
x-runtime: 0.064641
content-length: 360
Body
{
"document": {
"id": 1,
"file": {
"id": 26,
"signed_id": "eyJfcmFpbHMiOnsiZGF0YSI6MjgsInB1ciI6ImJsb2JfaWQifX0=--010aa4b6593c1371fac60c5741541789dc7dff34",
"byte_size": 596,
"filename": "test",
"url": "http://localhost:3000/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MjgsInB1ciI6ImJsb2JfaWQifX0=--010aa4b6593c1371fac60c5741541789dc7dff34/test"
},
"name": "eum"
}
}