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.eyJzdWIiOiIxODczIiwic2NwIjoidXNlciIsImF1ZCI6bnVsbCwiaWF0IjoxNzQ4NTE2NTQwLCJleHAiOjE3NTExMDg1NDAsImp0aSI6IjE3NjYxMWI5LTQyNmQtNGExZS04MGY3LTY4NGFiOGJmOWI1OSJ9.v0gCD5nRSEBfoJefHnVpJvBUOD4wg8MG-ppjvaFD-LU
Host: example.org
Cookie:
Body
{
"document": {
"file": "eyJfcmFpbHMiOnsiZGF0YSI6MzEsInB1ciI6ImJsb2JfaWQifX0=--88ff9c99b80d68e57f07401692209c5170b6a02c",
"name": "veritatis"
}
}
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/"5f558dccf0381399d9a9fb19577af8ad"
cache-control: max-age=0, private, must-revalidate
x-request-id: a0362044-d999-4279-81d6-9b140c56e33a
x-runtime: 0.059399
content-length: 366
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": "veritatis"
}
}