Skip to main content

Twins

Base URL: https://app.neuroflash.com/api/digital-twin-service

Retrieve individual digital twin personas from static groups.

List Static Group Twins

GET/v1/workspaces/{workspace_id}/static-groups/{group_key}/twins

Path Parameters

ParameterTypeRequiredDescription
workspace_idstringYes
group_keystringYes

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-based)
sizeinteger20Number of elements per page
orderstringSort order by name
twinIdsstringComma-separated twin IDs to filter for
languagestringFilter by language

Response

FieldTypeDescription
dataarray<object>List of twins for this page
idstringUnique identifier
createdAtstringTimestamp when the record was created
updatedAtstringTimestamp when the record was last updated
createdByUserIdobjectID of the user who created this record
targetAudienceIdobjectTarget audience ID (either this or staticGroupKey must be set)
staticGroupKeyobjectKey of the associated static group (either this or targetAudienceId must be set)
subjectIdstringID of the subject this twin is based on
namestringFull name of the digital twin
languagestringLanguage code: 'en' or 'de'
titleobjectDescriptive title for the digital twin
ageobjectAge of the digital twin
genderobjectGender of the digital twin
locationobjectLocation of the digital twin
jobTitleobjectJob title of the digital twin
selfDescriptionobjectSelf-description of the digital twin from survey responses
shortBioobjectShort third-person blurb shown above the persona overview (1-2 sentences, ~40-60 words). Distinct from selfDescription which is first-person.
interestsAndPreferencesobjectFirst-person paragraph (~80-150 words) about hobbies, brands consumed, media habits, lifestyle.
uniqueTraitsobjectFirst-person paragraph (~80-150 words) describing the traits that distinguish this persona from typical peers.
demographicsobjectStructured demographic attributes derived from the persona's survey answers. Persisted at twin-creation time. Absent keys hide the corresponding UI row. Frontend resolves labels via i18n key brand_hub.digital_twin.detail.demographics.&lt;snake_case_key&gt;.
psychographicsobjectStructured psychographic attributes derived from the persona's survey answers. Persisted at twin-creation time. Absent keys hide the corresponding UI row. Frontend resolves labels via i18n key brand_hub.digital_twin.detail.psychographics.&lt;snake_case_key&gt;.
activebooleanTrue if the twin is active and usable — can be chatted with, is used for reactions, etc.
_linksobjectHATEOAS links (e.g., avatarUrl)
pageobjectPagination metadata.
sizeintegerNumber of elements per page
totalElementsintegerTotal number of matching elements
totalPagesintegerTotal number of pages
currentPageintegerCurrent page number (1-based)

Example

curl "https://app.neuroflash.com/api/digital-twin-service/v1/workspaces/{workspace_id}/static-groups/{group_key}/twins" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"createdByUserId": "12345",
"targetAudienceId": "aud_12345",
"staticGroupKey": "millennials",
"subjectId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Jens Bauer",
"language": "en",
"title": "Tech-Savvy Millennial",
"age": 28,
"gender": "Male",
"location": "Berlin, Germany",
"jobTitle": "Software Engineer",
"selfDescription": "I'm a tech enthusiast who loves innovation and problem-solving.",
"shortBio": "Sarah is a marketing director with 10+ years of experience in the fashion industry.",
"interestsAndPreferences": "I enjoy gardening and taking walks in the countryside. On weekends I usually meet friends for brunch and follow a few independent fashion designers on Instagram.",
"uniqueTraits": "I'm a 38-year-old married woman living alone in a quiet country village, which is unusual for my age group. I value independence over the social rhythms most of my peers prefer.",
"demographics": {},
"psychographics": {},
"active": true,
"_links": {}
}
],
"page": {
"size": 0,
"totalElements": 0,
"totalPages": 0,
"currentPage": 0
}
}

Chat With Twin

POST/v1/workspaces/{workspace_id}/twins/{twin_id}/chat-completions

Path Parameters

ParameterTypeRequiredDescription
workspace_idstringYes
twin_idstringYes

Request Body

FieldTypeRequiredDescription
messagesarray<object>YesConversation history (at least one message required, last message must be from user)
rolestringYesRole: 'user' or 'assistant'
contentstringYesMessage content
attachmentsobjectNoList of file IDs to attach to this message (user messages only)
responseFormatobjectNoStructured output format using JSON schema. If null, uses default schema with 'answer' and 'reason' fields.
temperatureobjectNoSampling temperature for response generation
useWebSearchobjectNoWeb search mode: 'never', 'auto', or 'always'
useVerbalizedSamplingobjectNoGenerate 5 probability-weighted response options (tau=0.10). Mutually exclusive with custom responseFormat.

Example

curl -X POST "https://app.neuroflash.com/api/digital-twin-service/v1/workspaces/{workspace_id}/twins/{twin_id}/chat-completions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"messages": [],
"responseFormat": {},
"temperature": {},
"useWebSearch": {},
"useVerbalizedSampling": {}
}'

Response:

{}

List Twins

GET/v1/workspaces/{workspace_id}/twins

Path Parameters

ParameterTypeRequiredDescription
workspace_idstringYes

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-based)
sizeinteger20Number of elements per page
sortstringSort field: 'name' or 'createdAt'
orderstringSort order
targetAudienceIdstringFilter by target audience
namestringFilter by name prefix (case-insensitive)

Response

FieldTypeDescription
dataarray<object>List of twins for this page
idstringUnique identifier
createdAtstringTimestamp when the record was created
updatedAtstringTimestamp when the record was last updated
createdByUserIdobjectID of the user who created this record
targetAudienceIdobjectTarget audience ID (either this or staticGroupKey must be set)
staticGroupKeyobjectKey of the associated static group (either this or targetAudienceId must be set)
subjectIdstringID of the subject this twin is based on
namestringFull name of the digital twin
languagestringLanguage code: 'en' or 'de'
titleobjectDescriptive title for the digital twin
ageobjectAge of the digital twin
genderobjectGender of the digital twin
locationobjectLocation of the digital twin
jobTitleobjectJob title of the digital twin
selfDescriptionobjectSelf-description of the digital twin from survey responses
shortBioobjectShort third-person blurb shown above the persona overview (1-2 sentences, ~40-60 words). Distinct from selfDescription which is first-person.
interestsAndPreferencesobjectFirst-person paragraph (~80-150 words) about hobbies, brands consumed, media habits, lifestyle.
uniqueTraitsobjectFirst-person paragraph (~80-150 words) describing the traits that distinguish this persona from typical peers.
demographicsobjectStructured demographic attributes derived from the persona's survey answers. Persisted at twin-creation time. Absent keys hide the corresponding UI row. Frontend resolves labels via i18n key brand_hub.digital_twin.detail.demographics.&lt;snake_case_key&gt;.
psychographicsobjectStructured psychographic attributes derived from the persona's survey answers. Persisted at twin-creation time. Absent keys hide the corresponding UI row. Frontend resolves labels via i18n key brand_hub.digital_twin.detail.psychographics.&lt;snake_case_key&gt;.
activebooleanTrue if the twin is active and usable — can be chatted with, is used for reactions, etc.
_linksobjectHATEOAS links (e.g., avatarUrl)
pageobjectPagination metadata.
sizeintegerNumber of elements per page
totalElementsintegerTotal number of matching elements
totalPagesintegerTotal number of pages
currentPageintegerCurrent page number (1-based)

Example

curl "https://app.neuroflash.com/api/digital-twin-service/v1/workspaces/{workspace_id}/twins" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"createdByUserId": "12345",
"targetAudienceId": "aud_12345",
"staticGroupKey": "millennials",
"subjectId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Jens Bauer",
"language": "en",
"title": "Tech-Savvy Millennial",
"age": 28,
"gender": "Male",
"location": "Berlin, Germany",
"jobTitle": "Software Engineer",
"selfDescription": "I'm a tech enthusiast who loves innovation and problem-solving.",
"shortBio": "Sarah is a marketing director with 10+ years of experience in the fashion industry.",
"interestsAndPreferences": "I enjoy gardening and taking walks in the countryside. On weekends I usually meet friends for brunch and follow a few independent fashion designers on Instagram.",
"uniqueTraits": "I'm a 38-year-old married woman living alone in a quiet country village, which is unusual for my age group. I value independence over the social rhythms most of my peers prefer.",
"demographics": {},
"psychographics": {},
"active": true,
"_links": {}
}
],
"page": {
"size": 0,
"totalElements": 0,
"totalPages": 0,
"currentPage": 0
}
}

Get Twin

GET/v1/workspaces/{workspace_id}/twins/{twin_id}

Path Parameters

ParameterTypeRequiredDescription
workspace_idstringYes
twin_idstringYes

Response

FieldTypeDescription
idstringUnique identifier
createdAtstringTimestamp when the record was created
updatedAtstringTimestamp when the record was last updated
createdByUserIdobjectID of the user who created this record
targetAudienceIdobjectTarget audience ID (either this or staticGroupKey must be set)
staticGroupKeyobjectKey of the associated static group (either this or targetAudienceId must be set)
subjectIdstringID of the subject this twin is based on
namestringFull name of the digital twin
languagestringLanguage code: 'en' or 'de'
titleobjectDescriptive title for the digital twin
ageobjectAge of the digital twin
genderobjectGender of the digital twin
locationobjectLocation of the digital twin
jobTitleobjectJob title of the digital twin
selfDescriptionobjectSelf-description of the digital twin from survey responses
shortBioobjectShort third-person blurb shown above the persona overview (1-2 sentences, ~40-60 words). Distinct from selfDescription which is first-person.
interestsAndPreferencesobjectFirst-person paragraph (~80-150 words) about hobbies, brands consumed, media habits, lifestyle.
uniqueTraitsobjectFirst-person paragraph (~80-150 words) describing the traits that distinguish this persona from typical peers.
demographicsobjectStructured demographic attributes derived from the persona's survey answers. Persisted at twin-creation time. Absent keys hide the corresponding UI row. Frontend resolves labels via i18n key brand_hub.digital_twin.detail.demographics.&lt;snake_case_key&gt;.
psychographicsobjectStructured psychographic attributes derived from the persona's survey answers. Persisted at twin-creation time. Absent keys hide the corresponding UI row. Frontend resolves labels via i18n key brand_hub.digital_twin.detail.psychographics.&lt;snake_case_key&gt;.
activebooleanTrue if the twin is active and usable — can be chatted with, is used for reactions, etc.
_linksobjectHATEOAS links (e.g., avatarUrl)

Example

curl "https://app.neuroflash.com/api/digital-twin-service/v1/workspaces/{workspace_id}/twins/{twin_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"createdByUserId": "12345",
"targetAudienceId": "aud_12345",
"staticGroupKey": "millennials",
"subjectId": "550e8400-e29b-41d4-a716-446655440000",
"name": "Jens Bauer",
"language": "en",
"title": "Tech-Savvy Millennial",
"age": 28,
"gender": "Male",
"location": "Berlin, Germany",
"jobTitle": "Software Engineer",
"selfDescription": "I'm a tech enthusiast who loves innovation and problem-solving.",
"shortBio": "Sarah is a marketing director with 10+ years of experience in the fashion industry.",
"interestsAndPreferences": "I enjoy gardening and taking walks in the countryside. On weekends I usually meet friends for brunch and follow a few independent fashion designers on Instagram.",
"uniqueTraits": "I'm a 38-year-old married woman living alone in a quiet country village, which is unusual for my age group. I value independence over the social rhythms most of my peers prefer.",
"demographics": {},
"psychographics": {},
"active": true,
"_links": {}
}