Skip to main content

Target Audiences

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

Create and manage target audience profiles for your workspace.

Create a new target audience

POST/v1/workspaces/{workspaceId}/target-audiences

Creates a new target audience for the specified workspace

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID

Request Body

FieldTypeRequiredDescription
countrystringNo
genderDistributionobjectYes
femalenumberYes
malenumberYes
nonBinarynumberYes
preferNotToSaynumberYes
interestsarray<string>YesA list of strings stored in the database as JSON
maxAgeintegerYes
minAgeintegerYesWe store age range as separate min/max fields in the database
namestringYes
nativeLanguagestringNo
needsarray<string>YesA list of strings stored in the database as JSON
painPointsarray<string>YesA list of strings stored in the database as JSON
residencestringYes
sharedbooleanYes

Response

FieldTypeDescription
_embeddedobject
imageobjectAn image associated with a target audience
createdAtstring
createdByUserIdstring
fileNamestringFileName is used to generate a storage key which ends with the file name on duplication as well
idstring
targetAudienceIdstring
updatedAtstring
urlstring
permissionsobject
canDeleteboolean
canDuplicateboolean
canUpdateboolean
canViewboolean
countrystring
createdAtstring
createdByUserIdstring
genderDistributionobject
femalenumber
malenumber
nonBinarynumber
preferNotToSaynumber
idstring
interestsarray<string>A list of strings stored in the database as JSON
maxAgeinteger
minAgeintegerWe store age range as separate min/max fields in the database
namestring
nativeLanguagestring
needsarray<string>A list of strings stored in the database as JSON
ownerCustomerIdinteger
painPointsarray<string>A list of strings stored in the database as JSON
residencestring
sharedboolean
updatedAtstring
viewedAtstring
workspaceIdstring

Example

Gender distribution must sum to 1.0

The four genderDistribution fields (female, male, nonBinary, preferNotToSay) are all required and their values must sum to exactly 1.0. The API returns a 400 error if any field is missing or the sum is incorrect.

curl -X POST "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"country": "string",
"genderDistribution": {
"female": 0.5,
"male": 0.4,
"nonBinary": 0.07,
"preferNotToSay": 0.03
},
"interests": [],
"maxAge": 0,
"minAge": 0,
"name": "string",
"nativeLanguage": "string",
"needs": [],
"painPoints": [],
"residence": "string",
"shared": false
}'

Response:

{
"_embedded": {
"image": {
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"fileName": "string",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"targetAudienceId": "string",
"updatedAt": "2025-01-14T16:20:59Z",
"url": "https://storage.googleapis.com/audience-images/113c0b32-ed6c-4421-b7da-d1faf238eb56.jpg"
},
"permissions": {
"canDelete": false,
"canDuplicate": false,
"canUpdate": false,
"canView": false
}
},
"country": "US",
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"genderDistribution": {
"female": 0.5,
"male": 0.4,
"nonBinary": 0.07,
"preferNotToSay": 0.03
},
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"interests": [
"string"
],
"maxAge": 65,
"minAge": 18,
"name": "Young urban professionals",
"nativeLanguage": "de",
"needs": [
"string"
],
"ownerCustomerId": 12345,
"painPoints": [
"string"
],
"residence": "Berlin",
"shared": true,
"updatedAt": "2025-01-14T16:20:59Z",
"viewedAt": "2025-01-14T16:20:59Z",
"workspaceId": "113c0b32-ed6c-4421-b7da-d1faf238eb56"
}

Create duplication

POST/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}/duplication

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID
targetAudienceIdstringYesTarget Audience ID

Request Body

FieldTypeRequiredDescription
newNamestringNo

Response

FieldTypeDescription
duplicateobjectA target audience is a group of people that share common properties and content can be targeted towards them
_embeddedobject
imageobjectAn image associated with a target audience
createdAtstring
createdByUserIdstring
fileNamestringFileName is used to generate a storage key which ends with the file name on duplication as well
idstring
targetAudienceIdstring
updatedAtstring
urlstring
permissionsobject
canDeleteboolean
canDuplicateboolean
canUpdateboolean
canViewboolean
countrystring
createdAtstring
createdByUserIdstring
genderDistributionobject
femalenumber
malenumber
nonBinarynumber
preferNotToSaynumber
idstring
interestsarray<string>A list of strings stored in the database as JSON
maxAgeinteger
minAgeintegerWe store age range as separate min/max fields in the database
namestring
nativeLanguagestring
needsarray<string>A list of strings stored in the database as JSON
ownerCustomerIdinteger
painPointsarray<string>A list of strings stored in the database as JSON
residencestring
sharedboolean
updatedAtstring
viewedAtstring
workspaceIdstring
originalobjectA target audience is a group of people that share common properties and content can be targeted towards them
_embeddedobject
imageobjectAn image associated with a target audience
createdAtstring
createdByUserIdstring
fileNamestringFileName is used to generate a storage key which ends with the file name on duplication as well
idstring
targetAudienceIdstring
updatedAtstring
urlstring
permissionsobject
canDeleteboolean
canDuplicateboolean
canUpdateboolean
canViewboolean
countrystring
createdAtstring
createdByUserIdstring
genderDistributionobject
femalenumber
malenumber
nonBinarynumber
preferNotToSaynumber
idstring
interestsarray<string>A list of strings stored in the database as JSON
maxAgeinteger
minAgeintegerWe store age range as separate min/max fields in the database
namestring
nativeLanguagestring
needsarray<string>A list of strings stored in the database as JSON
ownerCustomerIdinteger
painPointsarray<string>A list of strings stored in the database as JSON
residencestring
sharedboolean
updatedAtstring
viewedAtstring
workspaceIdstring

Example

curl -X POST "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/duplication" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"newName": "string"
}'

Response:

{
"duplicate": {
"_embedded": {
"image": {
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"fileName": "string",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"targetAudienceId": "string",
"updatedAt": "2025-01-14T16:20:59Z",
"url": "https://storage.googleapis.com/audience-images/113c0b32-ed6c-4421-b7da-d1faf238eb56.jpg"
},
"permissions": {
"canDelete": false,
"canDuplicate": false,
"canUpdate": false,
"canView": false
}
},
"country": "US",
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"genderDistribution": {
"female": 0.5,
"male": 0.4,
"nonBinary": 0.07,
"preferNotToSay": 0.03
},
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"interests": [
"string"
],
"maxAge": 65,
"minAge": 18,
"name": "Young urban professionals",
"nativeLanguage": "de",
"needs": [
"string"
],
"ownerCustomerId": 12345,
"painPoints": [
"string"
],
"residence": "Berlin",
"shared": true,
"updatedAt": "2025-01-14T16:20:59Z",
"viewedAt": "2025-01-14T16:20:59Z",
"workspaceId": "113c0b32-ed6c-4421-b7da-d1faf238eb56"
},
"original": {
"_embedded": {
"image": {
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"fileName": "string",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"targetAudienceId": "string",
"updatedAt": "2025-01-14T16:20:59Z",
"url": "https://storage.googleapis.com/audience-images/113c0b32-ed6c-4421-b7da-d1faf238eb56.jpg"
},
"permissions": {
"canDelete": false,
"canDuplicate": false,
"canUpdate": false,
"canView": false
}
},
"country": "US",
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"genderDistribution": {
"female": 0.5,
"male": 0.4,
"nonBinary": 0.07,
"preferNotToSay": 0.03
},
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"interests": [
"string"
],
"maxAge": 65,
"minAge": 18,
"name": "Young urban professionals",
"nativeLanguage": "de",
"needs": [
"string"
],
"ownerCustomerId": 12345,
"painPoints": [
"string"
],
"residence": "Berlin",
"shared": true,
"updatedAt": "2025-01-14T16:20:59Z",
"viewedAt": "2025-01-14T16:20:59Z",
"workspaceId": "113c0b32-ed6c-4421-b7da-d1faf238eb56"
}
}

List target audiences

GET/v1/workspaces/{workspaceId}/target-audiences

List all target audiences that the user has access to

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID

Query Parameters

ParameterTypeDefaultDescription
pageintegerpage number
sizeintegerpage size
searchstringfind audience by name
countrystringfilter audience by country
nativeLanguagestringfilter audience by native language

Response

FieldTypeDescription
dataarray<object>
_embeddedobject
imageobjectAn image associated with a target audience
createdAtstring
createdByUserIdstring
fileNamestringFileName is used to generate a storage key which ends with the file name on duplication as well
idstring
targetAudienceIdstring
updatedAtstring
urlstring
permissionsobject
canDeleteboolean
canDuplicateboolean
canUpdateboolean
canViewboolean
countrystring
createdAtstring
createdByUserIdstring
genderDistributionobject
femalenumber
malenumber
nonBinarynumber
preferNotToSaynumber
idstring
interestsarray<string>A list of strings stored in the database as JSON
maxAgeinteger
minAgeintegerWe store age range as separate min/max fields in the database
namestring
nativeLanguagestring
needsarray<string>A list of strings stored in the database as JSON
ownerCustomerIdinteger
painPointsarray<string>A list of strings stored in the database as JSON
residencestring
sharedboolean
updatedAtstring
viewedAtstring
workspaceIdstring
pageobject
currentPageinteger
sizeinteger
totalElementsinteger
totalPagesinteger

Example

curl "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"data": [
{
"_embedded": {
"image": {
"createdAt": "...",
"createdByUserId": "...",
"fileName": "...",
"id": "...",
"targetAudienceId": "...",
"updatedAt": "...",
"url": "..."
},
"permissions": {
"canDelete": "...",
"canDuplicate": "...",
"canUpdate": "...",
"canView": "..."
}
},
"country": "US",
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"genderDistribution": {
"female": 0.5,
"male": 0.4,
"nonBinary": 0.07,
"preferNotToSay": 0.03
},
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"interests": [
"string"
],
"maxAge": 65,
"minAge": 18,
"name": "Young urban professionals",
"nativeLanguage": "de",
"needs": [
"string"
],
"ownerCustomerId": 12345,
"painPoints": [
"string"
],
"residence": "Berlin",
"shared": true,
"updatedAt": "2025-01-14T16:20:59Z",
"viewedAt": "2025-01-14T16:20:59Z",
"workspaceId": "113c0b32-ed6c-4421-b7da-d1faf238eb56"
}
],
"page": {
"currentPage": 2,
"size": 10,
"totalElements": 35,
"totalPages": 4
}
}

Get a target audience by ID

GET/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}

Retrieves a target audience by its ID

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID
targetAudienceIdstringYesTarget Audience ID

Response

FieldTypeDescription
_embeddedobject
imageobjectAn image associated with a target audience
createdAtstring
createdByUserIdstring
fileNamestringFileName is used to generate a storage key which ends with the file name on duplication as well
idstring
targetAudienceIdstring
updatedAtstring
urlstring
permissionsobject
canDeleteboolean
canDuplicateboolean
canUpdateboolean
canViewboolean
countrystring
createdAtstring
createdByUserIdstring
genderDistributionobject
femalenumber
malenumber
nonBinarynumber
preferNotToSaynumber
idstring
interestsarray<string>A list of strings stored in the database as JSON
maxAgeinteger
minAgeintegerWe store age range as separate min/max fields in the database
namestring
nativeLanguagestring
needsarray<string>A list of strings stored in the database as JSON
ownerCustomerIdinteger
painPointsarray<string>A list of strings stored in the database as JSON
residencestring
sharedboolean
updatedAtstring
viewedAtstring
workspaceIdstring

Example

curl "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"_embedded": {
"image": {
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"fileName": "string",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"targetAudienceId": "string",
"updatedAt": "2025-01-14T16:20:59Z",
"url": "https://storage.googleapis.com/audience-images/113c0b32-ed6c-4421-b7da-d1faf238eb56.jpg"
},
"permissions": {
"canDelete": false,
"canDuplicate": false,
"canUpdate": false,
"canView": false
}
},
"country": "US",
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"genderDistribution": {
"female": 0.5,
"male": 0.4,
"nonBinary": 0.07,
"preferNotToSay": 0.03
},
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"interests": [
"string"
],
"maxAge": 65,
"minAge": 18,
"name": "Young urban professionals",
"nativeLanguage": "de",
"needs": [
"string"
],
"ownerCustomerId": 12345,
"painPoints": [
"string"
],
"residence": "Berlin",
"shared": true,
"updatedAt": "2025-01-14T16:20:59Z",
"viewedAt": "2025-01-14T16:20:59Z",
"workspaceId": "113c0b32-ed6c-4421-b7da-d1faf238eb56"
}

Get a target audience image

GET/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}/image

Returns a signed URL for the target audience image

Path Parameters

ParameterTypeRequiredDescription
targetAudienceIdstringYesTarget Audience ID

Response

FieldTypeDescription
createdAtstring
createdByUserIdstring
fileNamestringFileName is used to generate a storage key which ends with the file name on duplication as well
idstring
targetAudienceIdstring
updatedAtstring
urlstring

Example

curl "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/image" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"fileName": "string",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"targetAudienceId": "string",
"updatedAt": "2025-01-14T16:20:59Z",
"url": "https://storage.googleapis.com/audience-images/113c0b32-ed6c-4421-b7da-d1faf238eb56.jpg"
}

Update a target audience

PUT/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}

Updates an existing target audience

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID
targetAudienceIdstringYesTarget Audience ID

Request Body

FieldTypeRequiredDescription
countrystringNo
genderDistributionobjectYes
femalenumberYes
malenumberYes
nonBinarynumberYes
preferNotToSaynumberYes
interestsarray<string>YesA list of strings stored in the database as JSON
maxAgeintegerYes
minAgeintegerYesWe store age range as separate min/max fields in the database
namestringYes
nativeLanguagestringNo
needsarray<string>YesA list of strings stored in the database as JSON
painPointsarray<string>YesA list of strings stored in the database as JSON
residencestringYes
sharedbooleanYes

Response

FieldTypeDescription
_embeddedobject
imageobjectAn image associated with a target audience
createdAtstring
createdByUserIdstring
fileNamestringFileName is used to generate a storage key which ends with the file name on duplication as well
idstring
targetAudienceIdstring
updatedAtstring
urlstring
permissionsobject
canDeleteboolean
canDuplicateboolean
canUpdateboolean
canViewboolean
countrystring
createdAtstring
createdByUserIdstring
genderDistributionobject
femalenumber
malenumber
nonBinarynumber
preferNotToSaynumber
idstring
interestsarray<string>A list of strings stored in the database as JSON
maxAgeinteger
minAgeintegerWe store age range as separate min/max fields in the database
namestring
nativeLanguagestring
needsarray<string>A list of strings stored in the database as JSON
ownerCustomerIdinteger
painPointsarray<string>A list of strings stored in the database as JSON
residencestring
sharedboolean
updatedAtstring
viewedAtstring
workspaceIdstring

Example

Full profile required on every update

The update endpoint uses PUT semantics — you must supply the complete demographic profile on every call, even if you only want to change one field. Fetch the audience first with GET /target-audiences/{id}, then re-send all existing values with your change applied.

curl -X PUT "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"country": "string",
"genderDistribution": {},
"interests": [],
"maxAge": 0,
"minAge": 0,
"name": "string",
"nativeLanguage": "string",
"needs": [],
"painPoints": [],
"residence": "string",
"shared": false
}'

Response:

{
"_embedded": {
"image": {
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"fileName": "string",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"targetAudienceId": "string",
"updatedAt": "2025-01-14T16:20:59Z",
"url": "https://storage.googleapis.com/audience-images/113c0b32-ed6c-4421-b7da-d1faf238eb56.jpg"
},
"permissions": {
"canDelete": false,
"canDuplicate": false,
"canUpdate": false,
"canView": false
}
},
"country": "US",
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"genderDistribution": {
"female": 0.5,
"male": 0.4,
"nonBinary": 0.07,
"preferNotToSay": 0.03
},
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"interests": [
"string"
],
"maxAge": 65,
"minAge": 18,
"name": "Young urban professionals",
"nativeLanguage": "de",
"needs": [
"string"
],
"ownerCustomerId": 12345,
"painPoints": [
"string"
],
"residence": "Berlin",
"shared": true,
"updatedAt": "2025-01-14T16:20:59Z",
"viewedAt": "2025-01-14T16:20:59Z",
"workspaceId": "113c0b32-ed6c-4421-b7da-d1faf238eb56"
}

Update the icon of a target audience

PUT/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}/image

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID
targetAudienceIdstringYesTarget Audience ID

Request Body

FieldTypeRequiredDescription
base64stringYes
contentTypestringYes
fileNamestringYes

Response

FieldTypeDescription
createdAtstring
createdByUserIdstring
fileNamestringFileName is used to generate a storage key which ends with the file name on duplication as well
idstring
targetAudienceIdstring
updatedAtstring
urlstring

Example

curl -X PUT "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/image" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"base64": "string",
"contentType": "string",
"fileName": "string"
}'

Response:

{
"createdAt": "2025-01-14T16:20:59Z",
"createdByUserId": "b0920767-2e30-48d3-80ce-268810bc433a",
"fileName": "string",
"id": "113c0b32-ed6c-4421-b7da-d1faf238eb56",
"targetAudienceId": "string",
"updatedAt": "2025-01-14T16:20:59Z",
"url": "https://storage.googleapis.com/audience-images/113c0b32-ed6c-4421-b7da-d1faf238eb56.jpg"
}

Creates a usage of target audience

PUT/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}/usage

Create a documented usage of a target audience.

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID (uuid4)
targetAudienceIdstringYesTarget Audience ID

Example

curl -X PUT "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/usage" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'

Delete a target audience

DELETE/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}

Deletes an existing target audience

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID
targetAudienceIdstringYesTarget Audience ID

Example

curl -X DELETE "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Ownership

Only the user who created a target audience can update or delete it. Attempting to modify a resource owned by another user returns 403 Forbidden.

Delete a target audience image

DELETE/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}/image

Deletes an existing image for a target audience

Path Parameters

ParameterTypeRequiredDescription
targetAudienceIdstringYesTarget Audience ID

Example

curl -X DELETE "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/image" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Get target audience limits

GET/v1/workspaces/{workspaceId}/limits/target-audiences

Retrieves target audience limits

Path Parameters

ParameterTypeRequiredDescription
workspaceIdstringYesWorkspace ID

Response

FieldTypeDescription
createobject
isAvailableboolean
isUnlimitedboolean
limitinteger
usageinteger

Example

curl "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/limits/target-audiences" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"create": {
"isAvailable": false,
"isUnlimited": false,
"limit": 0,
"usage": 0
}
}