You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6e263b4
Browse filesBrowse the repository at this point in the historyBrowse files
feat(audiences): POST /audiences persists given Apollo filters verbatim (QE-CHIRO-1102) (#482)
An audience whose filters the caller already holds (titles + location) could
only be persisted through the LLM refine loop, so it could never be switched
to the QuickEnrich serve source. The new route stores the filters as given
(they are the audience's identity on /search/next) and counts them with a
free dry-run.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: openapi.json
+187Lines changed: 187 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -5506,6 +5506,103 @@
5506
5506
"quickenrich"
5507
5507
]
5508
5508
},
5509
+
"CreateAudienceFromFiltersResponse": {
5510
+
"type": "object",
5511
+
"properties": {
5512
+
"apolloAudienceId": {
5513
+
"type": "string",
5514
+
"format": "uuid"
5515
+
},
5516
+
"name": {
5517
+
"type": "string"
5518
+
},
5519
+
"filters": {
5520
+
"allOf": [
5521
+
{
5522
+
"$ref": "#/components/schemas/SearchFilters"
5523
+
},
5524
+
{
5525
+
"description": "Apollo People API Search filters using Apollo-native field names. All filters are combined using AND. Start broad and narrow down to avoid empty results."
5526
+
}
5527
+
]
5528
+
},
5529
+
"count": {
5530
+
"type": "integer",
5531
+
"description": "Live Apollo match-count for the filters, from a free dry-run."
5532
+
},
5533
+
"serveSource": {
5534
+
"type": "string",
5535
+
"enum": [
5536
+
"apollo",
5537
+
"quickenrich"
5538
+
]
5539
+
},
5540
+
"quickenrich": {
5541
+
"type": "object",
5542
+
"properties": {
5543
+
"expressible": {
5544
+
"type": "boolean"
5545
+
},
5546
+
"reasons": {
5547
+
"type": "array",
5548
+
"items": {
5549
+
"type": "string"
5550
+
}
5551
+
}
5552
+
},
5553
+
"required": [
5554
+
"expressible",
5555
+
"reasons"
5556
+
]
5557
+
}
5558
+
},
5559
+
"required": [
5560
+
"apolloAudienceId",
5561
+
"name",
5562
+
"filters",
5563
+
"count",
5564
+
"serveSource",
5565
+
"quickenrich"
5566
+
]
5567
+
},
5568
+
"CreateAudienceFromFiltersRequest": {
5569
+
"type": "object",
5570
+
"properties": {
5571
+
"name": {
5572
+
"type": "string",
5573
+
"minLength": 1,
5574
+
"maxLength": 200,
5575
+
"description": "Audience name (English).",
5576
+
"example": "US Chiropractors (by title)"
5577
+
},
5578
+
"description": {
5579
+
"type": "string",
5580
+
"minLength": 1,
5581
+
"maxLength": 2000,
5582
+
"description": "What the audience is, in one or two sentences (English)."
5583
+
},
5584
+
"brandId": {
5585
+
"type": "string",
5586
+
"description": "Brand the audience belongs to."
5587
+
},
5588
+
"filters": {
5589
+
"allOf": [
5590
+
{
5591
+
"$ref": "#/components/schemas/SearchFilters"
5592
+
},
5593
+
{
5594
+
"description": "Apollo-native People Search filters, stored VERBATIM. A consumer that forwards the same object to /search/next is served from this audience (it is the audience's identity on that route, e.g. for its QuickEnrich serve source). A buying signal goes through POST /audiences/signal."
5595
+
}
5596
+
]
5597
+
}
5598
+
},
5599
+
"required": [
5600
+
"name",
5601
+
"description",
5602
+
"filters"
5603
+
],
5604
+
"additionalProperties": false
5605
+
},
5509
5606
"ServeSourceResponse": {
5510
5607
"type": "object",
5511
5608
"properties": {
@@ -8513,6 +8610,96 @@
8513
8610
}
8514
8611
}
8515
8612
},
8613
+
"/audiences": {
8614
+
"post": {
8615
+
"summary": "Persist an Apollo audience from given Apollo-native filters",
8616
+
"description": "Stores the filters exactly as given (no LLM, no rewrite), counted by a free Apollo dry-run. The returned apolloAudienceId can then be switched to the QuickEnrich serve source (PATCH /audiences/{apolloAudienceId}/serve-source) and bound to a consumer audience whose stored filters are the same object.",
name: z.string().min(1).max(200).openapi({description: "Audience name (English).",example: "US Chiropractors (by title)"}),
2009
+
description: z.string().min(1).max(2000).openapi({description: "What the audience is, in one or two sentences (English)."}),
2010
+
brandId: z.string().optional().openapi({description: "Brand the audience belongs to."}),
2011
+
filters: ApolloNativeSearchFiltersSchema.refine((f)=>Object.keys(f).length>0,{message: "filters must state at least one constraint"}).openapi({
2012
+
description:
2013
+
"Apollo-native People Search filters, stored VERBATIM. A consumer that forwards the same object to /search/next is served from this audience (it is the audience's identity on that route, e.g. for its QuickEnrich serve source). A buying signal goes through POST /audiences/signal.",
2014
+
}),
2015
+
})
2016
+
.strict()
2017
+
.openapi("CreateAudienceFromFiltersRequest");
2018
+
2019
+
constCreateAudienceFromFiltersResponseSchema=z
2020
+
.object({
2021
+
apolloAudienceId: z.string().uuid(),
2022
+
name: z.string(),
2023
+
filters: ApolloNativeSearchFiltersSchema,
2024
+
count: z.number().int().openapi({description: "Live Apollo match-count for the filters, from a free dry-run."}),
summary: "Persist an Apollo audience from given Apollo-native filters",
2093
+
description:
2094
+
"Stores the filters exactly as given (no LLM, no rewrite), counted by a free Apollo dry-run. The returned apolloAudienceId can then be switched to the QuickEnrich serve source (PATCH /audiences/{apolloAudienceId}/serve-source) and bound to a consumer audience whose stored filters are the same object.",
0 commit comments