Skip to main content
POST
/
api
/
v1
/
driver
/
storage
/
uploads
Sign Upload
curl --request POST \
  --url https://api.example.com/api/v1/driver/storage/uploads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "context": "USER_AVATAR",
  "fileName": "avatar.png",
  "contentType": "image/png"
}
'
{
  "key": "temp/users/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/user-avatar/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png",
  "cdnUrl": "https://dev.static.devmob.app.br/user/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/avatar/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png",
  "upload": {
    "url": "https://dev.static.devmob.app.br/",
    "fields": {}
  },
  "expiresIn": 900
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

fields
string

Comma-separated list of fields to include in the response. Supports dot notation for nested projection (e.g. id,name,user.email,trips.route.id). Unknown fields are silently dropped.

Body

application/json

Sign upload payload

context
enum<string>
required

Upload context

Available options:
USER_AVATAR
Example:

"USER_AVATAR"

fileName
string
required

Original file name

Example:

"avatar.png"

contentType
enum<string>
required

Allowed MIME type

Available options:
image/png,
image/jpeg,
image/webp
Example:

"image/png"

Response

OK

Sign upload result

key
string
required

Object key

Example:

"temp/users/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/user-avatar/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png"

cdnUrl
string<uri>
required

Public CDN URL

Example:

"https://dev.static.devmob.app.br/user/0195e7a1-8b5c-7d3e-9f4a-2c6b8d0e1f3a/avatar/0195e7b2-4a3c-7d3e-9f4a-2c6b8d0e1f3b.png"

upload
object
required

Presigned POST upload payload

expiresIn
integer
required

Presign TTL in seconds

Required range: x > 0
Example:

900