Profile
These endpoints manage the signed-in user's own record. Each endpoint on this page acts on the user identified by the access token.
Use Retrieve your profile for the account, Update your company profile for the organisation's details, and the avatar endpoints for the profile image.
- GET /profile/me Retrieve your profile
- PUT /profile/update-profile-image Update your avatar
- GET /profile/me/profile-image Retrieve your avatar URL
- PUT /registration/update-company-profile Update your company profile
- DEL /profile/delete-profile Delete your account
Paths are relative to /api
Retrieve your profile
GET /api/profile/me
Returns the signed-in user's profile.
Returns the caller's own profile. The user is identified from the access token, so no identifier is passed.
- Authentication
- Bearer token How it works
Parameters
No parameters.
Returns
Returns your profile in data.
Errors
- 401 The request carried no valid session.
- 404 The user record no longer exists.
curl "$VDF_BASE_URL/api/profile/me" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/api/profile/me`, {
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.get(
f"{os.environ['VDF_BASE_URL']}/api/profile/me",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"data": {
"id": 42,
"name": "Ada",
"surname": "Lovelace",
"title": "Analyst",
"email": "ada@example.com",
"memberSince": "Tue, 01 Sep 2026 09:30:00 GMT",
"planName": "Regular User",
"bio": "Systems thinker.",
"profileImage": "<PROFILE_IMAGE_URL>"
}
} Update your avatar
PUT /api/profile/update-profile-image
Stores a new profile image for the signed-in user.
Uploads and stores a new profile image for the caller and returns its image URL. The user is identified from the access token.
- Authentication
- Bearer token How it works
Form fields multipart/form-data
-
imagefile RequiredThe image file to store.
Returns
Returns the new image URL in imageUrl.
Errors
- 400 No image file was provided or none was selected.
- 404 The user record no longer exists.
curl -X PUT "$VDF_BASE_URL/api/profile/update-profile-image" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-F "image=@avatar.png" import { openAsBlob } from 'node:fs';
const form = new FormData();
form.append('image', await openAsBlob('avatar.png'), 'avatar.png');
const response = await fetch(`${process.env.VDF_BASE_URL}/api/profile/update-profile-image`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
body: form,
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
with open("avatar.png", "rb") as file:
response = requests.put(
f"{os.environ['VDF_BASE_URL']}/api/profile/update-profile-image",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
files={"image": file},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"imageUrl": "<PROFILE_IMAGE_URL>"
} Retrieve your avatar URL
GET /api/profile/me/profile-image
Also available as GET /api/profile/get-profile-image
Returns the URL of the signed-in user's profile image.
Returns the relative URL of the caller's profile image, or null when none is set. The user is identified from the access token.
- Authentication
- Bearer token How it works
Parameters
No parameters.
Returns
Returns the profile image URL.
Errors
- 404 The user record no longer exists.
curl "$VDF_BASE_URL/api/profile/me/profile-image" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/api/profile/me/profile-image`, {
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.get(
f"{os.environ['VDF_BASE_URL']}/api/profile/me/profile-image",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"profileImage": "<PROFILE_IMAGE_URL>"
} Update your company profile
PUT /api/registration/update-company-profile
Updates the company and billing details of the caller's own organisation, creating the record on first use. The organisation is derived from the access token; only fields you supply are changed. company.name is required on every request, even when you change other fields only.
- Authentication
- Bearer token How it works
Body parameters application/json
-
companyobject RequiredCompany details.
Show child parameters Hide child parameters
-
namestring RequiredThe company's name.
-
emailstringThe company's contact email.
-
websitestringThe company's website.
-
countrystringThe company's country.
-
citystringThe company's city.
-
statestringThe company's state or region.
-
company_sizestringThe company's size band.
-
industrystringThe company's industry.
-
-
billingobjectBilling details.
Show child parameters Hide child parameters
-
namestringThe billing contact name.
-
addressstringThe billing address.
-
countrystringThe billing country.
-
citystringThe billing city.
-
statestringThe billing state or region.
-
postalCodestringThe billing postal code.
-
vatNumberstringThe billing VAT number.
-
Returns
Returns the updated company details.
Errors
- 400
company.namewas not supplied, or the update could not be applied.
curl -X PUT "$VDF_BASE_URL/api/registration/update-company-profile" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"company": {
"name": "Contoso",
"country": "United Kingdom",
"city": "London"
},
"billing": {
"address": "1 Example Way",
"postalCode": "EC1A 1BB",
"vatNumber": "GB123456789"
}
}' const response = await fetch(`${process.env.VDF_BASE_URL}/api/registration/update-company-profile`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
company: {
name: 'Contoso',
country: 'United Kingdom',
city: 'London',
},
billing: {
address: '1 Example Way',
postalCode: 'EC1A 1BB',
vatNumber: 'GB123456789',
},
}),
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.put(
f"{os.environ['VDF_BASE_URL']}/api/registration/update-company-profile",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
json={
"company": {
"name": "Contoso",
"country": "United Kingdom",
"city": "London",
},
"billing": {
"address": "1 Example Way",
"postalCode": "EC1A 1BB",
"vatNumber": "GB123456789",
},
},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"message": "Company details updated successfully",
"data": {
"id": 1,
"company_name": "Contoso",
"company_size": null,
"industry": null,
"country": "United Kingdom",
"company_email": null,
"website": null,
"billing_name": null,
"billing_address": "1 Example Way",
"billing_country": null,
"billing_city": null,
"billing_state": null,
"billing_postal_code": "EC1A 1BB",
"vat_number": "GB123456789",
"team_members": null,
"city": "London",
"state": null,
"created_at": "Tue, 01 Sep 2026 09:30:00 GMT",
"updated_at": "Tue, 01 Sep 2026 09:34:12 GMT"
}
} Delete your account
DEL /api/profile/delete-profile
Permanently deletes the signed-in user's account and associated data.
Permanently deletes the caller's own account together with their chat sessions, messages, documents, and related data. The user is identified from the access token. This cannot be undone.
- Authentication
- Bearer token How it works
Parameters
No parameters.
Returns
Returns success: true and a confirmation message.
Errors
- 400 The account could not be deleted.
curl -X DELETE "$VDF_BASE_URL/api/profile/delete-profile" \
-H "Authorization: Bearer $VDF_ACCESS_TOKEN" const response = await fetch(`${process.env.VDF_BASE_URL}/api/profile/delete-profile`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.VDF_ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed with status ${response.status}`);
const data = await response.json(); import os
import requests
response = requests.delete(
f"{os.environ['VDF_BASE_URL']}/api/profile/delete-profile",
headers={"Authorization": f"Bearer {os.environ['VDF_ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json() {
"success": true,
"message": "Profile deleted successfully"
}