Skip to main content
POST
/
api
/
v1
/
users
/
me
/
picture
Upload Picture
curl --request POST \
  --url https://api.example.com/api/v1/users/me/picture \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form file='@example-file'
const form = new FormData();
form.append('file', '<string>');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

fetch('https://api.example.com/api/v1/users/me/picture', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api.example.com/api/v1/users/me/picture"

files = { "file": ("example-file", open("example-file", "rb")) }
headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, files=files, headers=headers)

print(response.text)
{
  "picture": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

multipart/form-data
file
file
required

Response

200 - application/json

OK

picture
string
required
message
string
required