Generate AI Profile
Uses OpenAI to generate a professional profile summary for the authenticated customer. The AI drafts the ProfileSummary text based on the customer’s existing profile fields (name, position, company, tags, etc.). The portal presents the result for the customer to review and accept before saving it via PATCH /api/public/coworker/profile.
This endpoint requires the location to have the OpenAI integration enabled. If it is not configured, the AI profile button will not appear in the
portal UI.
Authentication
Requires a valid customer bearer token.
Request Body
No body is required. The AI uses the customer’s existing profile data from the server session.
POST /en/profile/GenerateOpenAiProfile
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...
Response
Returns a Coworker object with the ProfileSummary field populated with the AI-generated text. The customer’s profile is not saved automatically — the customer must review and confirm, after which the portal calls PATCH /api/public/coworker/profile with ProfileSummary.
The AI-generated professional profile summary. May contain Markdown formatting. Presented to the customer for review before saving.
true when AI profile generation is available for this location. Use this to show or hide the “Generate with AI” button.
Example Response
{
"ProfileSummary": "Jane is a product designer with over 8 years of experience building intuitive digital products for SaaS companies. Based at Nexudus Coworking, she specialises in design systems and user research.",
"OpenAiProfileAvailable": true,
"FullName": "Jane Doe",
"Position": "Product Designer",
"CompanyName": "Acme Design Co."
}
TypeScript Integration
import endpoints from '@/api/endpoints'
import { Coworker } from '@/types/spaces/Coworker'
const result = await httpClient.post<Coworker>(endpoints.profile.ai)
if (result.data.ProfileSummary) {
// Present the generated text to the customer for review
setGeneratedSummary(result.data.ProfileSummary)
}
Usage in Portal
| Context | Source file |
|---|
| Professional profile form — “Generate with AI” button | src/views/user/components/ProfessionalProfile.tsx |
Error Responses
The bearer token is missing, expired, or invalid.
The location does not have the OpenAI integration enabled, or the customer’s profile lacks sufficient data to generate a summary.
| Method | Endpoint | Description |
|---|
PATCH | /api/public/coworker/profile | Save the reviewed AI summary to the customer profile |
GET | /en/profile?_resource=Coworker | Retrieve full customer profile data |