API Reference

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.

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.
Request
curl "$VDF_BASE_URL/api/profile/me" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
{
  "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

  • image file Required

    The 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.
Request
curl -X PUT "$VDF_BASE_URL/api/profile/update-profile-image" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN" \
  -F "image=@avatar.png"
Response 200
{
  "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.
Request
curl "$VDF_BASE_URL/api/profile/me/profile-image" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
{
  "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

  • company object Required

    Company details.

    Show child parameters Hide child parameters
    • name string Required

      The company's name.

    • email string

      The company's contact email.

    • website string

      The company's website.

    • country string

      The company's country.

    • city string

      The company's city.

    • state string

      The company's state or region.

    • company_size string

      The company's size band.

    • industry string

      The company's industry.

  • billing object

    Billing details.

    Show child parameters Hide child parameters
    • name string

      The billing contact name.

    • address string

      The billing address.

    • country string

      The billing country.

    • city string

      The billing city.

    • state string

      The billing state or region.

    • postalCode string

      The billing postal code.

    • vatNumber string

      The billing VAT number.

Returns

Returns the updated company details.

Errors

  • 400 company.name was not supplied, or the update could not be applied.
Request
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"
    }
  }'
Response 200
{
  "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.
Request
curl -X DELETE "$VDF_BASE_URL/api/profile/delete-profile" \
  -H "Authorization: Bearer $VDF_ACCESS_TOKEN"
Response 200
{
  "success": true,
  "message": "Profile deleted successfully"
}