Images
Base URL: https://app.neuroflash.com/api/audience-service
Manage profile images for your target audiences.
Get a target audience image
GET
/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}/imageReturns a signed URL for the target audience image
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
targetAudienceId | string | Yes | Target Audience ID |
Response
FieldTypeDescription
createdAtstringcreatedByUserIdstringfileNamestringFileName is used to generate a storage key which ends with the file name on duplication as wellidstringtargetAudienceIdstringupdatedAtstringurlstringExample
- cURL
- Python
- Node.js
- Go
curl "https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/image" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
import requests
response = requests.get(
f"https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/image",
headers={"Authorization": f"Bearer {token}"},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/audience-service/v1/workspaces/${workspaceId}/target-audiences/${targetAudienceId}/image`,
{ headers: { Authorization: `Bearer ${token}` } }
).then((r) => r.json());
req, _ := http.NewRequest("GET", "https://app.neuroflash.com/api/audience-service/v1/workspaces/"+workspaceID+"/target-audiences/"+targetAudienceID+"/image", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
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 the icon of a target audience
PUT
/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}/imagePath Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace ID |
targetAudienceId | string | Yes | Target Audience ID |
Request Body
FieldTypeRequiredDescription
base64stringYescontentTypestringYesfileNamestringYesResponse
FieldTypeDescription
createdAtstringcreatedByUserIdstringfileNamestringFileName is used to generate a storage key which ends with the file name on duplication as wellidstringtargetAudienceIdstringupdatedAtstringurlstringExample
- cURL
- Python
- Node.js
- Go
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"
}'
import requests
response = requests.put(
f"https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/image",
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
json={
"base64": "string",
"contentType": "string",
"fileName": "string"
},
).json()
const response = await fetch(
`https://app.neuroflash.com/api/audience-service/v1/workspaces/${workspaceId}/target-audiences/${targetAudienceId}/image`,
{
method: "PUT",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"base64": "string",
"contentType": "string",
"fileName": "string"
}),
}
).then((r) => r.json());
body, _ := json.Marshal(map[string]any{
"base64": "string",
"contentType": "string",
"fileName": "string",
})
req, _ := http.NewRequest("PUT", "https://app.neuroflash.com/api/audience-service/v1/workspaces/"+workspaceID+"/target-audiences/"+targetAudienceID+"/image", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+token)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
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"
}
Delete a target audience image
DELETE
/v1/workspaces/{workspaceId}/target-audiences/{targetAudienceId}/imageDeletes an existing image for a target audience
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
targetAudienceId | string | Yes | Target Audience ID |
Example
- cURL
- Python
- Node.js
- Go
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"
import requests
requests.delete(
f"https://app.neuroflash.com/api/audience-service/v1/workspaces/{workspace_id}/target-audiences/{target_audience_id}/image",
headers={"Authorization": f"Bearer {token}"},
)
await fetch(
`https://app.neuroflash.com/api/audience-service/v1/workspaces/${workspaceId}/target-audiences/${targetAudienceId}/image`,
{
method: "DELETE",
headers: { Authorization: `Bearer ${token}` },
}
);
req, _ := http.NewRequest("DELETE", "https://app.neuroflash.com/api/audience-service/v1/workspaces/"+workspaceID+"/target-audiences/"+targetAudienceID+"/image", nil)
req.Header.Set("Authorization", "Bearer "+token)
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()