POST /functions/v1/api with resource: "profiles".
Access control
| Action | Regular user | Admin |
|---|---|---|
all | No | Yes |
list | No | Yes |
get | Own profile only | Any profile |
create | No | Yes |
update | Own profile only | Any profile |
delete | Own profile only | Any profile |
Admin endpoints require a role starting with
internal_ (e.g. internal_admin). Non-admin users attempting admin-only actions receive a 403 Forbidden response.role values
| Value | Description |
|---|---|
"standard_user" | Business owner — can create and manage agents, view leads, and access all standard features |
"consumer" | End user — can talk to agents and interact with consumer-facing features |
"internal_admin" | Full platform access — can manage all users, agents, marketplace listings, and system settings |
Profile mutations (
create, update, delete) are automatically logged to the activities table as user_action events. Update actions include the list of changed fields in the activity metadata.List all profiles (admin)
Retrieves all profiles with complete joined data including subscriptions, call purchases, and phone subscriptions.Must be
"profiles"Must be
"all"Response
List basic profiles (admin)
Retrieves a paginated list of profiles with basic fields only, optimized for lists and dropdowns.Must be
"profiles"Must be
"list"Response
Get a profile
Retrieves a single profile with complete details including subscriptions and team data. Users can only access their own profile; admins can access any profile.Must be
"profiles"Must be
"get"The profile ID (user UUID).
Response
Create a profile (admin)
Creates a new user profile. Theid must match an existing auth user UUID.
Must be
"profiles"Must be
"create"Response (status 201)
Update a profile
Updates an existing profile. Users can only update their own profile; admins can update any profile. This is a partial update — only include the fields you want to change.Must be
"profiles"Must be
"update"The profile ID (user UUID).
Any combination of profile fields. See the
create action for the full list of fields (all fields except id are accepted).Response
Delete a profile
Permanently deletes a profile. Users can only delete their own profile; admins can delete any profile.Must be
"profiles"Must be
"delete"The profile ID (user UUID).
Response
Profile object
The full profile object returned byall, get, create, and update actions.
Core fields
User UUID.
Contact information
Address
Company
Preferences
External IDs
Marketplace
Team
Subscription
Call purchases
Phone subscriptions
Timestamps
Activity logging
Profile mutations are logged to theactivities table:
| Action | Activity type | Action logged |
|---|---|---|
| Create | user_action | profile_created |
| Update | user_action | profile_updated (includes updated_fields in metadata) |
| Delete | user_action | profile_deleted |
Error responses
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Profile ID not provided |
| 401 | UNAUTHORIZED | Invalid or missing authentication token |
| 403 | FORBIDDEN | Non-admin accessing admin-only action, or user accessing another user’s profile |
| 404 | NOT_FOUND | Profile does not exist |
| 500 | INTERNAL_ERROR | Database operation failed |

