{"openapi":"3.1.0","info":{"title":"Scala App API","version":"0.1.0"},"paths":{"/":{"get":{"summary":"Root","operationId":"root","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status/liveness":{"get":{"summary":"Liveness","operationId":"liveness","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/status/readiness":{"get":{"summary":"Readiness","operationId":"readiness","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/retool/embed":{"post":{"tags":["retool"],"summary":"Embed","operationId":"embed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder/fields":{"get":{"tags":["audience_builder"],"summary":"Get Fields","description":"Get all possible values of enum-like fields.","operationId":"get_fields","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldsEntity"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder/playbooks/{playbook_id}/export":{"get":{"tags":["audience_builder"],"summary":"Export Audience Playbook","description":"Export audience playbook.","operationId":"export_audience_playbook","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}},{"name":"only_new","in":"query","required":false,"schema":{"type":"boolean","description":"Set to true to export only new records","default":false,"title":"Only New"},"description":"Set to true to export only new records"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audience_builder_v2/profile/search":{"post":{"tags":["audience_builder_v2"],"summary":"Profile Search V2","description":"Execute profile search using the v2 query builder. Same API as v1.","operationId":"profile_search_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSearchBodyV2"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ProfileSearchResponseV2"},"type":"array","title":"Response Profile Search V2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder_v2/profile/search/count":{"post":{"tags":["audience_builder_v2"],"summary":"Profile Search Count V2","description":"Execute profile search count using the v2 query builder. Same API as v1.","operationId":"profile_search_count_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultsCount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder_v2/profile/search/export":{"post":{"tags":["audience_builder_v2"],"summary":"Profile Search Csv Export V2","description":"Download a CSV export of profile search results.","operationId":"profile_search_csv_export_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSearchExportBodyV2"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder_v2/company/search":{"post":{"tags":["audience_builder_v2"],"summary":"Company Search V2","description":"Execute company search using the v2 query builder. Same API as v1.","operationId":"company_search_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchBodyV2"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CompanySearchResponseV2"},"type":"array","title":"Response Company Search V2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder_v2/persona_stats":{"post":{"tags":["audience_builder_v2"],"summary":"Persona Stats Search V2","description":"Persona job-title / seniority distribution stats (v2 warehouse).","operationId":"persona_stats_search_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaStatsSearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PersonaStatsSearchResponse"},"type":"array","title":"Response Persona Stats Search V2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder_v2/company/search/count":{"post":{"tags":["audience_builder_v2"],"summary":"Company Search Count V2","description":"Execute company search count using the v2 query builder. Same API as v1.","operationId":"company_search_count_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultsCount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder_v2/company/search/export":{"post":{"tags":["audience_builder_v2"],"summary":"Company Search Csv Export V2","description":"Download a CSV export of company search results.","operationId":"company_search_csv_export_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchExportBodyV2"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audience_builder_v2/enrich":{"post":{"tags":["audience_builder_v2"],"summary":"Audience Enrich V2","description":"Trigger on-demand Custom Data Point enrichment over the enrichable set.\n\nResolves the companies that pass the search's other filters but have no value yet\nfor the searched QF(s), and hands those keys to ai-agents to enrich, naming the actor\nas the person its credit reservation is recorded for. Gated on both\n``USE_AUDIENCE_BUILDER`` and ``AGENTS_DATA_ENRICH``.","operationId":"audience_enrich_v2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichRecordsResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/customers":{"get":{"tags":["customers"],"summary":"Get Customers","description":"List the customers the caller may see one page at a time, inactive ones included.\n\nScalability's staff see every customer, anyone else those whose organization they belong\nto. `q` searches the name and the Salesforce account id. The list is in `sort` order, then\nby id; `name` sorts ignoring case and accents. A cursor is valid only with the filters,\n`sort` and `q` of the page it came from.","operationId":"get_customers","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|sf_account_id)(,-?(name|sf_account_id))*$","description":"Comma-separated keys among `name`, `sf_account_id`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"name","title":"Sort"},"description":"Comma-separated keys among `name`, `sf_account_id`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the active customers when true, only the inactive ones when false.","title":"Is Active"},"description":"Only the active customers when true, only the inactive ones when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these customers.","title":"Id"},"description":"Repeat to read only these customers."},{"name":"sf_account_id","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"Repeat to read only the customers of these Salesforce accounts.","title":"Sf Account Id"},"description":"Repeat to read only the customers of these Salesforce accounts."},{"name":"member","in":"query","required":false,"schema":{"type":"boolean","description":"Only the customers whose organization the caller belongs to, the ones they can sign in to. Anyone but Scalability's staff sees only those anyway.","default":false,"title":"Member"},"description":"Only the customers whose organization the caller belongs to, the ones they can sign in to. Anyone but Scalability's staff sees only those anyway."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomersPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["customers"],"summary":"Create Customer","description":"Register a customer from the closed-won payload, and queue its provisioning.\n\nWrites the row and lets the ``customers_update`` outbox fan out to Kinde, ai-agents and\nthe Hub; it does not provision inline. Re-posting an existing Salesforce account fills a\nwebsite it lacks, updates its Slack channels, keeps its name, and re-queues every target.\nThe credential's Kinde user is logged as its author.","operationId":"create_customer","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/current":{"get":{"tags":["customers"],"summary":"Get Current Customer","description":"Get the customer of the organization the caller is signed in to, active or not.\n\nAn inactive one is read too, though every route acting for it answers 404, so that a person\nsigned in to an organization being closed still sees where they are and can switch away.","operationId":"get_current_customer","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCustomersOutput"}}}},"404":{"description":"No customer has the organization signed in to."}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/customers/{customer_id}/lemlist":{"patch":{"tags":["customers"],"summary":"Update Customer Lemlist","description":"Update a customer's Lemlist credentials.","operationId":"update_customer_lemlist","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"integer","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLemlistUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLemlistUpdateOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customers/{customer_id}/account-manager":{"patch":{"tags":["customers"],"summary":"Update Customer Account Manager","description":"Update a customer's account manager.","operationId":"update_customer_account_manager","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"integer","title":"Customer Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAccountManagerUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerAccountManagerUpdateOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/google-workspaces":{"get":{"tags":["google-workspaces"],"summary":"List Google Workspaces","description":"List every Google Workspace the app reads mail from.","operationId":"list_google_workspaces","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GoogleWorkspaceOutput"},"type":"array","title":"Response List Google Workspaces"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"post":{"tags":["google-workspaces"],"summary":"Create Google Workspace","description":"Add a Google Workspace and queue a mailbox refresh.","operationId":"create_google_workspace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceWritePayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/google-workspaces/{workspace_id}":{"patch":{"tags":["google-workspaces"],"summary":"Update Google Workspace","description":"Change a workspace's name or admin email.","operationId":"update_google_workspace","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"integer","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceWritePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleWorkspaceOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["google-workspaces"],"summary":"Delete Google Workspace","description":"Delete a workspace and the mailboxes recorded for it.","operationId":"delete_google_workspace","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"integer","title":"Workspace Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/google-workspaces/{workspace_id}/mailboxes":{"get":{"tags":["google-workspaces"],"summary":"List Workspace Mailboxes","description":"List Gmail mailboxes in one Google Workspace.","operationId":"list_workspace_mailboxes","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"integer","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Mailbox"},"title":"Response List Workspace Mailboxes"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/settings/audience_builder/favorite_filters":{"get":{"tags":["settings"],"summary":"Get Favorite Filters","description":"Get the favorite filters for the given category.","operationId":"get_favorite_filters","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FavoriteField"},"type":"array","title":"Response Get Favorite Filters"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"patch":{"tags":["settings"],"summary":"Patch Favorite Filters","description":"Update the favorite filters.\n\nMethod: PATCH\nPayload examples:\n    {\"field\": {\"key\": \"field1\"}, \"operation\": \"add\"}\n    {\"field\": {\"key\": \"field1\"}, \"operation\": \"remove\"}","operationId":"patch_favorite_filters","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteFieldOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FavoriteField"},"type":"array","title":"Response Patch Favorite Filters"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/settings/audience_builder/profile/favorite_columns":{"get":{"tags":["settings"],"summary":"Get Favorite Profile Columns","description":"Get the favorite columns for the given category.","operationId":"get_favorite_profile_columns","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FavoriteField"},"type":"array","title":"Response Get Favorite Profile Columns"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"patch":{"tags":["settings"],"summary":"Patch Favorite Profile Columns","description":"Update the favorite columns.\n\nMethod: PATCH\nPayload examples:\n    {\"field\": {\"key\": \"field1\"}, \"operation\": \"add\"}\n    {\"field\": {\"key\": \"field1\"}, \"operation\": \"remove\"}","operationId":"patch_favorite_profile_columns","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteFieldOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FavoriteField"},"type":"array","title":"Response Patch Favorite Profile Columns"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/settings/audience_builder/company/favorite_columns":{"get":{"tags":["settings"],"summary":"Get Favorite Company Columns","description":"Get the favorite columns for the given category.","operationId":"get_favorite_company_columns","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FavoriteField"},"type":"array","title":"Response Get Favorite Company Columns"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"patch":{"tags":["settings"],"summary":"Patch Favorite Company Columns","description":"Update the favorite columns.\n\nMethod: PATCH\nPayload examples:\n    {\"field\": {\"key\": \"field1\"}, \"operation\": \"add\"}\n    {\"field\": {\"key\": \"field1\"}, \"operation\": \"remove\"}","operationId":"patch_favorite_company_columns","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FavoriteFieldOperation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FavoriteField"},"type":"array","title":"Response Patch Favorite Company Columns"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/lists/company":{"get":{"tags":["lists"],"summary":"Get Company Lists","description":"List the customer's company lists one page at a time.\n\n`q` searches the list's name. The list is in `sort` order, then by id; on the default list\n(`type=default`) the customer's own lists come before the library's, each in that order. A\ncursor is valid only with the filters, `sort` and `q` of the page it came from.","operationId":"get_company_lists","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|created_at)(,-?(name|created_at))*$","description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-created_at","title":"Sort"},"description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"type","in":"query","required":false,"schema":{"enum":["default","management","scala-lib"],"type":"string","description":"`default` for the customer's own lists, then the library's; `management` for the customer's own; `scala-lib` for the library's.","default":"default","title":"Type"},"description":"`default` for the customer's own lists, then the library's; `management` for the customer's own; `scala-lib` for the library's."},{"name":"is_used","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the lists some audience uses when true, only those none uses when false, as `audience_count` counts them.","title":"Is Used"},"description":"Only the lists some audience uses when true, only those none uses when false, as `audience_count` counts them."},{"name":"excluded_by_default","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the lists every search of the customer's excludes when true, only the others when false.","title":"Excluded By Default"},"description":"Only the lists every search of the customer's excludes when true, only the others when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these lists.","title":"Id"},"description":"Repeat to read only these lists."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["lists"],"summary":"Create Company List","description":"Create a company list.","operationId":"create_company_list","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyListInput"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lists/people":{"get":{"tags":["lists"],"summary":"Get People Lists","description":"List the customer's people lists one page at a time.\n\n`q` searches the list's name. The list is in `sort` order, then by id; on the default list\n(`type=default`) the customer's own lists come before the library's, each in that order. A\ncursor is valid only with the filters, `sort` and `q` of the page it came from.","operationId":"get_people_lists","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|created_at)(,-?(name|created_at))*$","description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-created_at","title":"Sort"},"description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"type","in":"query","required":false,"schema":{"enum":["default","management","scala-lib"],"type":"string","description":"`default` for the customer's own lists, then the library's; `management` for the customer's own; `scala-lib` for the library's.","default":"default","title":"Type"},"description":"`default` for the customer's own lists, then the library's; `management` for the customer's own; `scala-lib` for the library's."},{"name":"is_used","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the lists some audience uses when true, only those none uses when false, as `audience_count` counts them.","title":"Is Used"},"description":"Only the lists some audience uses when true, only those none uses when false, as `audience_count` counts them."},{"name":"excluded_by_default","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the lists every search of the customer's excludes when true, only the others when false.","title":"Excluded By Default"},"description":"Only the lists every search of the customer's excludes when true, only the others when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these lists.","title":"Id"},"description":"Repeat to read only these lists."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeopleListsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["lists"],"summary":"Create People List","description":"Create a people list.","operationId":"create_people_list","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePeopleListPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeopleListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lists/company/{list_id}/duplicate":{"post":{"tags":["lists"],"summary":"Duplicate Company List","description":"Duplicating a company list.","operationId":"duplicate_company_list","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateListPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListEntity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lists/people/{list_id}/duplicate":{"post":{"tags":["lists"],"summary":"Duplicate People List","description":"Duplicating a people list.","operationId":"duplicate_people_list","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateListPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeopleListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lists/company/{list_id}":{"patch":{"tags":["lists"],"summary":"Update Company List","description":"Say whether every search of the customer's excludes the company list.","operationId":"update_company_list","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateListPayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["lists"],"summary":"Delete Company List","description":"Delete the company list.","operationId":"delete_company_list","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lists/people/{list_id}":{"patch":{"tags":["lists"],"summary":"Update People List","description":"Say whether every search of the customer's excludes the people list.","operationId":"update_people_list","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateListPayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["lists"],"summary":"Delete People List","description":"Delete the people list.","operationId":"delete_people_list","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/settings":{"get":{"tags":["crm"],"summary":"Get Crm Push Settings","description":"Get CRM push settings for a customer.","operationId":"get_crm_push_settings","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMPushSettingsSchema"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/settings/contact-reassign":{"put":{"tags":["crm"],"summary":"Update Contact Reassign","description":"Update contact reassign setting for a customer.","operationId":"update_contact_reassign","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMPushSettingsUpdateContactReassignSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMPushSettingsSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/settings/account-update":{"put":{"tags":["crm"],"summary":"Update Account Update","description":"Update account update setting for a customer.","operationId":"update_account_update","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMPushSettingsUpdateAccountUpdateSchema"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMPushSettingsSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/fields/read-mappings/{record_type}":{"get":{"tags":["crm"],"summary":"Get Crm Read Mappings","operationId":"get_crm_read_mappings","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"record_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CRMRecordType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ContactFieldReadMappings"},{"$ref":"#/components/schemas/AccountFieldReadMappings"},{"$ref":"#/components/schemas/OpportunityFieldReadMappings"}],"title":"Response Get Crm Read Mappings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/fields/read-mappings":{"post":{"tags":["crm"],"summary":"Add Crm Read Mapping","operationId":"add_crm_read_mapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCRMReadMappingPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"delete":{"tags":["crm"],"summary":"Delete Crm Read Mapping","operationId":"delete_crm_read_mapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCRMReadMappingPayload"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/fields/write-mappings/{record_type}":{"get":{"tags":["crm"],"summary":"Get Crm Write Mappings","operationId":"get_crm_write_mappings","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"record_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CRMRecordType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrmFieldWriteMappingEntry"},"title":"Response Get Crm Write Mappings"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/fields/write-mappings":{"post":{"tags":["crm"],"summary":"Add Crm Write Mapping","operationId":"add_crm_write_mapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCRMWriteMappingPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"delete":{"tags":["crm"],"summary":"Delete Crm Write Mapping","operationId":"delete_crm_write_mapping","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCRMWriteMappingPayload"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/fields/v2/{record_type}":{"get":{"tags":["crm"],"summary":"Get Crm Fields V2","operationId":"get_crm_fields_v2","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"record_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CRMRecordType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrmFieldResponse"},"title":"Response Get Crm Fields V2"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/fields/refresh/v2":{"post":{"tags":["crm"],"summary":"Refresh Crm Fields V2","operationId":"refresh_crm_fields_v2","responses":{"204":{"description":"Successful Response"}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/fields/default":{"post":{"tags":["crm"],"summary":"Create Default Crm Fields","operationId":"create_default_crm_fields","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCreationResult"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/fields/provision":{"post":{"tags":["crm"],"summary":"Provision Platform Crm Fields","description":"Bring each family of the platform's own columns up to the requested count.\n\nThe body is required: what a campaign needs comes from its layout, which this side does\nnot model, so there is nothing sensible to default to.","operationId":"provision_platform_crm_fields","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformFieldsWanted"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCreationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/segments":{"get":{"tags":["crm"],"summary":"Get Crm Segments","description":"Get the CRM segments for the given Salesforce account ID.\n\nArgs:\n    get_crm_segments_use_case: Use case to load CRM segments.\n    customer: The authorized customer.","operationId":"get_crm_segments","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CRMSegmentSchema"},"type":"array","title":"Response Get Crm Segments"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"post":{"tags":["crm"],"summary":"Create Crm Segment","description":"Create a new CRM segment.\n\nArgs:\n    payload: The data for the new CRM segment.\n    create_crm_segment_use_case: Use case to persist the segment.\n    customer: The authorized customer.\n    actor: The actor performing the operation.","operationId":"create_crm_segment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMSegmentCreatePayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCRMSegmentResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/segments/{segment_id}/count":{"get":{"tags":["crm"],"summary":"Get Crm Segment Count","description":"Get the count of matching records for a CRM segment.\n\nArgs:\n    crm_segment_distinct_count: Distinct-count use case for CRM segments.\n    segment: The authorized CRM segment.\n    customer: The authorized customer.","operationId":"get_crm_segment_count","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"integer","title":"Segment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMSegmentCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/segments/{segment_id}/match-breakdown":{"get":{"tags":["crm"],"summary":"Get Crm Segment Match Breakdown","description":"Return one page of this segment's CRM records, matched to Scala's or not.\n\nA matched row is a CRM record and one Scala company or profile it matched, by CRM id then\nScala key; an unmatched row is a CRM record with no match, by CRM id.","operationId":"get_crm_segment_match_breakdown","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"integer","title":"Segment Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"tab","in":"query","required":true,"schema":{"enum":["matched","unmatched"],"type":"string","title":"Tab"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMSegmentMatchBreakdownPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/segments/{segment_id}/match-breakdown/export":{"get":{"tags":["crm"],"summary":"Export Crm Segment Match Breakdown Csv","description":"Download capped CSV of CRM↔Scala segment matches (same rows as match-breakdown tabs).","operationId":"export_crm_segment_match_breakdown_csv","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"integer","title":"Segment Id"}},{"name":"tab","in":"query","required":true,"schema":{"enum":["matched","unmatched"],"type":"string","title":"Tab"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/segments/{segment_id}":{"patch":{"tags":["crm"],"summary":"Update Crm Segment","description":"Update an existing CRM segment.\n\nArgs:\n    payload: The data for updating the CRM segment.\n    update_crm_segment_use_case: Use case to persist updates.\n    segment: The authorized CRM segment.","operationId":"update_crm_segment","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"integer","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMSegmentUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMSegmentSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["crm"],"summary":"Delete Crm Segment","description":"Delete a CRM segment.\n\nArgs:\n    delete_crm_segment_use_case: Use case to delete the segment.\n    segment: The authorized CRM segment dependency.","operationId":"delete_crm_segment","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"integer","title":"Segment Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/users":{"get":{"tags":["crm"],"summary":"Get Crm Users","operationId":"get_crm_users","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CrmUser"},"type":"array","title":"Response Get Crm Users"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/person-object":{"put":{"tags":["crm"],"summary":"Update Person Object","operationId":"update_person_object","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonObjectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePersonObjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/oauth/authorize":{"post":{"tags":["crm"],"summary":"Crm Oauth Authorize","operationId":"crm_oauth_authorize","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOAuthAuthorizeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmOAuthAuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/oauth/integration":{"get":{"tags":["crm"],"summary":"Get Crm Oauth Integration","operationId":"get_crm_oauth_integration","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmIntegrationResponse"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"delete":{"tags":["crm"],"summary":"Disconnect Crm","operationId":"disconnect_crm","responses":{"204":{"description":"Successful Response"}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/crm/oauth/callback":{"get":{"tags":["crm"],"summary":"Crm Oauth Callback","operationId":"crm_oauth_callback","parameters":[{"name":"state","in":"query","required":true,"schema":{"type":"string","title":"State"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/lists":{"get":{"tags":["crm"],"summary":"Get Crm Lists","description":"Return one page of the CRM's own lists for the connected person object, in its order.\n\nThe CRM pages them itself, with a token of its own that the cursor carries, so the list\ncannot be counted.","operationId":"get_crm_lists","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Always false: this list cannot be counted.","const":false,"default":false,"title":"With Total Count"},"description":"Always false: this list cannot be counted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMListsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/crm/list-template":{"get":{"tags":["crm"],"summary":"Get Crm List Template","description":"Return the CRM list stored as the membership template, if one is set.","operationId":"get_crm_list_template","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CRMListTemplateSchema"},{"type":"null"}],"title":"Response Get Crm List Template"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"put":{"tags":["crm"],"summary":"Set Crm List Template","description":"Store the selected CRM list as the template.","operationId":"set_crm_list_template","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMListTemplateUpdatePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMListTemplateSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/audiences":{"get":{"tags":["audiences"],"summary":"Get Audiences","description":"List the customer's audiences one page at a time.\n\nThe list is every audience of the customer, deleted ones included unless `is_deleted` says\notherwise, but those built from uploaded records.\n\n`q` searches the audience's name. The list is in `sort` order, then by id. A cursor is valid\nonly with the filters, `sort` and `q` of the page it came from.","operationId":"get_audiences","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|created_at)(,-?(name|created_at))*$","description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-created_at","title":"Sort"},"description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"audience_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AudienceType"},{"type":"null"}],"title":"Audience Type"}},{"name":"is_deleted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only deleted audiences when true, only those not deleted when false.","title":"Is Deleted"},"description":"Only deleted audiences when true, only those not deleted when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these audiences.","title":"Id"},"description":"Repeat to read only these audiences."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudiencesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["audiences"],"summary":"Create Audience","description":"Create an audience.","operationId":"create_audience","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceCreationPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAudienceOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audiences/{audience_id}/playbooks":{"post":{"tags":["audiences"],"summary":"Create Playbook","description":"Create playbook.","operationId":"create_playbook","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CampaignPlaybookPayload"},{"$ref":"#/components/schemas/TaskPlaybookPayload"},{"$ref":"#/components/schemas/EnrichmentPlaybookPayload"},{"$ref":"#/components/schemas/AudienceEnrichmentPlaybookPayload"}],"discriminator":{"propertyName":"workflow_type","mapping":{"campaign_v2":"#/components/schemas/CampaignPlaybookPayload","tasks_v2":"#/components/schemas/TaskPlaybookPayload","email_enrichment":"#/components/schemas/EnrichmentPlaybookPayload","audience_enrichment":"#/components/schemas/AudienceEnrichmentPlaybookPayload"}},"title":"Payload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlaybookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audiences/{audience_id}":{"patch":{"tags":["audiences"],"summary":"Patch Audience","description":"Replace an audience's configuration.\n\n`expected_revision` is the `revision` the configuration was read at; an audience saved\nsince answers 409. A records audience takes a new name or intent only: a change to its\ntype, table mode or filters is a 400.","operationId":"patch_audience","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudiencePatchPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchAudienceResponse"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceRevisionConflict"}}},"description":"Conflict"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["audiences"],"summary":"Get Audience","description":"Get a saved audience.","operationId":"get_audience","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAudienceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["audiences"],"summary":"Delete Audience","description":"Delete a saved audience.","operationId":"delete_audience","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audiences/{audience_id}/records":{"get":{"tags":["audiences"],"summary":"Get Audience Records","description":"List a profile audience's active records one page at a time, in the order it gained them.\n\nRead from Postgres, never searched: the records its last refresh stored, or the rows an\naudience built from uploaded records was created with. `GET /{audience_id}` says how\ncurrent they are (`snapshot`). `include=full` adds the whole search row of a member of its\nsample, its first 50 records. A company audience is a 409.","operationId":"get_audience_records","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"const":"full","type":"string"},"description":"Parts to add to each record: `full`.","default":[],"title":"Include"},"description":"Parts to add to each record: `full`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceRecordsPage"}}}},"409":{"description":"The audience is of another kind.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/audiences/{audience_id}/generate-campaign-info":{"get":{"tags":["audiences"],"summary":"Get Audience Generated Campaign Info","description":"Generate campaign info for a saved audience.","operationId":"get_audience_generated_campaign_info","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratedCampaignInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/strategy/intents":{"get":{"tags":["strategy"],"summary":"Get Strategy Intents","description":"List the strategy intents an audience's intent is one of: the live ones, or every one.","operationId":"get_strategy_intents","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"include_retired","in":"query","required":false,"schema":{"type":"boolean","description":"List retired intents too, to name the key a campaign or audience still holds. Never offer one: no campaign or audience is given a retired key.","default":false,"title":"Include Retired"},"description":"List retired intents too, to name the key a campaign or audience still holds. Never offer one: no campaign or audience is given a retired key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StrategyIntentResponse"},"title":"Response Get Strategy Intents"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks":{"get":{"tags":["playbooks"],"summary":"Get Playbooks","description":"List the customer's playbooks one page at a time.\n\nThe list is every playbook of the customer's profile audiences, archived ones included unless\n`is_deleted` says otherwise.\n\n`q` searches the playbook's name and its audience's name. The list is in `sort` order, then\nby id. A cursor is valid only with the filters, `sort` and `q` of the page it came from.","operationId":"get_playbooks","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|created_at)(,-?(name|created_at))*$","description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-created_at","title":"Sort"},"description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"workflow_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkflowType"},{"type":"null"}],"title":"Workflow Type"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only active playbooks when true, only paused ones when false.","title":"Is Active"},"description":"Only active playbooks when true, only paused ones when false."},{"name":"is_deleted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only archived playbooks when true, only those not archived when false.","title":"Is Deleted"},"description":"Only archived playbooks when true, only those not archived when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these playbooks.","title":"Id"},"description":"Repeat to read only these playbooks."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybooksPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["playbooks"],"summary":"Create Playbook From Source","description":"Create a playbook from an audience source. Passed-in records are not looked up.","operationId":"create_playbook_from_source","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlaybookPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlaybookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}":{"get":{"tags":["playbooks"],"summary":"Get Playbook","description":"Get playbook detail (progress first; more fields later).","operationId":"get_playbook","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPlaybookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["playbooks"],"summary":"Update Playbook","description":"Update playbook.","operationId":"update_playbook","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookPatchPayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["playbooks"],"summary":"Delete Playbook","description":"Delete playbook.","operationId":"delete_playbook","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/progress":{"get":{"tags":["playbooks"],"summary":"Get Playbook Progress","description":"Get playbook progress.","operationId":"get_playbook_progress","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPlaybookProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/retry-failed-records":{"post":{"tags":["playbooks"],"summary":"Retry Failed Playbook Records","description":"Send the playbook's failed records back to the step their workflow retries from.","operationId":"retry_failed_playbook_records","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryFailedRecordsResult"}}}},"400":{"description":"The playbook is inactive or deleted."},"409":{"description":"The playbook's workflow retries no failed records."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/state":{"get":{"tags":["playbooks"],"summary":"Get Playbook State","description":"Get playbook state.","operationId":"get_playbook_state","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookWithStateSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/records":{"get":{"tags":["playbooks"],"summary":"Get Playbook Records","description":"List a playbook's records one page at a time, in the order they were added.\n\nEvery record, skipped, failed and done included, with where it is in the playbook, read\nfrom Postgres alone. `include=scala_vars` adds what the playbook's variables resolved to\nonce the record's enrichment was retrieved; `include=full` adds the whole search row of a\nmember of the audience's sample.","operationId":"get_playbook_records","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecordInclude"},"description":"Parts to add to each record: `scala_vars`, `full`.","default":[],"title":"Include"},"description":"Parts to add to each record: `scala_vars`, `full`."},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlaybookRecordStatus"},"description":"Only the records in one of these statuses; all when none.","title":"Status"},"description":"Only the records in one of these statuses; all when none."},{"name":"has_email","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the records the enrichment found an email for when true, only those it ran on and found none for when false; all when omitted.","title":"Has Email"},"description":"Only the records the enrichment found an email for when true, only those it ran on and found none for when false; all when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookRecordsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/auto-sync":{"patch":{"tags":["playbooks"],"summary":"Update Playbook Auto Sync","description":"Update playbook auto_sync setting.","operationId":"update_playbook_auto_sync","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookAutoSyncSchema"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/campaigns":{"get":{"tags":["playbooks"],"summary":"Get Playbook Campaigns","description":"Get playbook campaigns.","operationId":"get_playbook_campaigns","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignSequencesSchema"},"title":"Response Get Playbook Campaigns"}}}},"409":{"description":"The customer has no Lemlist API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/campaign-info":{"get":{"tags":["playbooks"],"summary":"Get Playbook Campaign Info","description":"Get playbook campaign info.","operationId":"get_playbook_campaign_info","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookCampaignInfoSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/crm-lists/retry":{"post":{"tags":["playbooks"],"summary":"Retry Playbook Crm Lists","description":"Create the campaign playbook's missing CRM lists again.\n\nA list already stored is left as it is. The response is the campaign info, with the error\nwhen the CRM refuses again. An inactive, deleted, or non-campaign playbook is a 400.","operationId":"retry_playbook_crm_lists","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookCampaignInfoSchema"}}}},"400":{"description":"The playbook is inactive, deleted, or not a campaign playbook."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/create-campaign":{"post":{"tags":["playbooks"],"summary":"Create Playbook Campaign","description":"Manually create a campaign for a playbook.\n\nAlways uses ``create`` (append-only): a new sender-side campaign is\ncreated on every call, even if one of the same type already exists,\nand sibling campaigns of other types are left alone.","operationId":"create_playbook_campaign","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookCampaignCreatePayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateResponse"}}}},"409":{"description":"The customer has no Lemlist API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/playbooks/{playbook_id}/sequences/{sequence_id}/steps/{step_id}":{"patch":{"tags":["playbooks"],"summary":"Update Playbook Sequence Step","description":"Update a playbook sequence step.","operationId":"update_playbook_sequence_step","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"sequence_id","in":"path","required":true,"schema":{"type":"string","title":"Sequence Id"}},{"name":"step_id","in":"path","required":true,"schema":{"type":"string","title":"Step Id"}},{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/UpdateEmailStepPayload"},{"$ref":"#/components/schemas/UpdateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/UpdateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/UpdateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/UpdateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/UpdateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/UpdateConditionalStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"email":"#/components/schemas/UpdateEmailStepPayload","linkedinInvite":"#/components/schemas/UpdateLinkedinInvitationStepPayload","linkedinSend":"#/components/schemas/UpdateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/UpdateLinkedinVisitStepPayload","linkedinLikeLastPost":"#/components/schemas/UpdateLinkedinLikeLastPostStepPayload","linkedinWithdrawInvitation":"#/components/schemas/UpdateLinkedinWithdrawInvitationStepPayload","conditional":"#/components/schemas/UpdateConditionalStepPayload"}},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"409":{"description":"The customer has no Lemlist API key."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/persona":{"get":{"tags":["persona"],"summary":"Get Persona List","description":"Get all the actor's list of persona.","operationId":"get_persona_list","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PersonaResponse"},"type":"array","title":"Response Get Persona List"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"post":{"tags":["persona"],"summary":"Create Persona","description":"Create a persona.","operationId":"create_persona","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaCreationPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonaOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/persona/{persona_id}":{"get":{"tags":["persona"],"summary":"Get Persona","description":"Get a persona.","operationId":"get_persona","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"integer","title":"Persona Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["persona"],"summary":"Patch Persona","description":"Update partially a persona.","operationId":"patch_persona","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"integer","title":"Persona Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaPatchPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/persona":{"get":{"tags":["persona-admin"],"summary":"Get Persona List","description":"Get all the actor's list of persona.","operationId":"get_persona_list","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ManagedPersonaResponse"},"type":"array","title":"Response Get Persona List"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/admin/scala-lib/persona":{"get":{"tags":["persona-admin"],"summary":"Get Scala Lib List","description":"Get all the scala-lib list of persona.","operationId":"get_scala_lib_list","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ManagedPersonaResponse"},"type":"array","title":"Response Get Scala Lib List"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/admin/persona/{persona_id}":{"delete":{"tags":["persona-admin"],"summary":"Delete Persona","description":"Delete a persona.","operationId":"delete_persona","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"integer","title":"Persona Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users":{"get":{"tags":["users"],"summary":"Get Users","operationId":"get_users","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/KindeUserResponse"},"type":"array","title":"Response Get Users"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]},"post":{"tags":["users"],"summary":"Create User","operationId":"create_user","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreationPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KindeUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/users/{kinde_user_id}":{"patch":{"tags":["users"],"summary":"Patch User","operationId":"patch_user","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"kinde_user_id","in":"path","required":true,"schema":{"type":"string","title":"Kinde User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserRole"},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KindeOrganizationUser"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Delete User","operationId":"delete_user","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"kinde_user_id","in":"path","required":true,"schema":{"type":"string","title":"Kinde User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{kinde_user_id}/organizations":{"get":{"tags":["users"],"summary":"Get User Organizations","operationId":"get_user_organizations","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"kinde_user_id","in":"path","required":true,"schema":{"type":"string","title":"Kinde User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetCustomersOutput"},"title":"Response Get User Organizations"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/{kinde_user_id}/organizations/roles":{"patch":{"tags":["users"],"summary":"Update User Organizations Roles","description":"Set which customers a user belongs to, as the portfolio editor shows them. Staff only.\n\n`organization_ids` is the full list, within the caller's scope. An organization not yet\njoined is joined with `role`; one already joined keeps its roles, which the role route\nchanges; one left out is left, except the organization the request is made in. A staff\ntarget is refused, as their access is reconciled from the Scalability organization.","operationId":"update_user_organizations_roles","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"kinde_user_id","in":"path","required":true,"schema":{"type":"string","title":"Kinde User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRoleUpdatePayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/campaign-metrics":{"get":{"tags":["dashboard"],"summary":"Get Campaigns Metrics","description":"List the customer's campaigns one page at a time, with their metrics.\n\n`q` searches the campaign's name. The keys of `sort` are the table's columns: `name`\n(ignoring case and accents), `start_date` (`campaign_launch_date`), `currently_active`\n(whether `campaign_status` is `running`), `people_contacted`, and `replied_rate` and\n`interest_rate`, the people who replied or became interested over those contacted, none when\nnobody was. Ties are broken by `campaign_id`. A customer with no Lemlist team has no\ncampaign. A cursor is valid only with the filters, `sort` and `q` of the page it came from.","operationId":"get_campaigns_metrics","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|start_date|currently_active|people_contacted|replied_rate|interest_rate)(,-?(name|start_date|currently_active|people_contacted|replied_rate|interest_rate))*$","description":"Comma-separated keys among `name`, `start_date`, `currently_active`, `people_contacted`, `replied_rate`, `interest_rate`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-start_date","title":"Sort"},"description":"Comma-separated keys among `name`, `start_date`, `currently_active`, `people_contacted`, `replied_rate`, `interest_rate`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case but not accents, in the campaign's name.","title":"Q"},"description":"Words that must each appear, ignoring case but not accents, in the campaign's name."},{"name":"currently_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the running campaigns when true, only the others when false.","title":"Currently Active"},"description":"Only the running campaigns when true, only the others when false."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignMetricsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/overall-metrics":{"get":{"tags":["dashboard"],"summary":"Get Overall Metrics","description":"Get overall metrics.","operationId":"get_overall_metrics","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverallMetricsEntity"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/dashboard/customer-metrics-daily":{"get":{"tags":["dashboard"],"summary":"Get Customer Metrics Daily","description":"Get the customer's metrics of each day of the range, in day order, whole.\n\nOne row a day, every day included; a customer with no Lemlist team has none.","operationId":"get_customer_metrics_daily","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the range, included; the earliest day when left out.","title":"From"},"description":"The first day of the range, included; the earliest day when left out."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the range, included; the latest day when left out.","title":"To"},"description":"The last day of the range, included; the latest day when left out."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerMetricsDaily"},"title":"Response Get Customer Metrics Daily"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/customer-metrics-monthly":{"get":{"tags":["dashboard"],"summary":"Get Customer Metrics Monthly","description":"Get the customer's metrics of each month the range overlaps, in month order, whole.\n\nA month the range only partly covers comes whole, since a month's figures cannot be cut;\na customer with no Lemlist team has none.","operationId":"get_customer_metrics_monthly","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the range, included; the earliest day when left out.","title":"From"},"description":"The first day of the range, included; the earliest day when left out."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the range, included; the latest day when left out.","title":"To"},"description":"The last day of the range, included; the latest day when left out."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerMetricsMonthly"},"title":"Response Get Customer Metrics Monthly"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/edges/accounts":{"get":{"tags":["edges"],"summary":"List Accounts","description":"List all LinkedIn accounts from Edges.","operationId":"list_accounts","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ListAccountsOutput"},"type":"array","title":"Response List Accounts"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/edges/scrap-linkedin-page-followers":{"post":{"tags":["edges"],"summary":"Scrap Linkedin Page Followers","description":"Scrape LinkedIn page followers from Edges.","operationId":"scrap_linkedin_page_followers","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapLinkedinPageFollowersInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScrapLinkedinPageFollowersOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/ai-agents/{proxy_path}":{"delete":{"tags":["ai-agents"],"summary":"Ai Agents Proxy","operationId":"ai_agents_proxy","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"proxy_path","in":"path","required":true,"schema":{"type":"string","title":"Proxy Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["ai-agents"],"summary":"Ai Agents Proxy","operationId":"ai_agents_proxy","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"proxy_path","in":"path","required":true,"schema":{"type":"string","title":"Proxy Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["ai-agents"],"summary":"Ai Agents Proxy","operationId":"ai_agents_proxy","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"proxy_path","in":"path","required":true,"schema":{"type":"string","title":"Proxy Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["ai-agents"],"summary":"Ai Agents Proxy","operationId":"ai_agents_proxy","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"proxy_path","in":"path","required":true,"schema":{"type":"string","title":"Proxy Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["ai-agents"],"summary":"Ai Agents Proxy","operationId":"ai_agents_proxy","security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}],"parameters":[{"name":"proxy_path","in":"path","required":true,"schema":{"type":"string","title":"Proxy Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/email-configuration/domains/generate":{"post":{"tags":["email-configuration"],"summary":"Generate Domains","operationId":"generate_domains","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainGeneratorPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DomainAvailability"},"type":"array","title":"Response Generate Domains"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"BearerAuth":[]},{"ApiKeyAuth":[]},{"TenantId":[]}]}},"/api/v1/clay/email/{sf_account_id}/messages/{message_id}/label":{"post":{"tags":["clay"],"summary":"Label Message","description":"Store Clay's classification of one message. A later call replaces it.","operationId":"label_message","parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"x-clay-callback-auth","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Clay-Callback-Auth"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelMessageRequest"}}}},"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing or wrong callback token."},"404":{"description":"Customer not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/domains/generate":{"post":{"tags":["internal-domains"],"summary":"Generate Domains Internal","description":"Domain suggestions for n8n, which has no user to authorize as.","operationId":"generate_domains_internal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainGeneratorPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DomainAvailability"},"type":"array","title":"Response Generate Domains Internal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/customers":{"post":{"tags":["internal-customers"],"summary":"Create Customer Internal","description":"Register a customer from the closed-won payload, and queue its provisioning.\n\nWrites the row and lets the ``customers_update`` outbox fan out to Kinde, ai-agents and\nthe Hub; it does not provision inline. A re-post fills a website the customer lacks,\nupdates its Slack channels and keeps its name. The customer's event log records the\nregistration, or the fields a re-post moved, with who sent it.","operationId":"create_customer_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOrganizationPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-customers"],"summary":"List Customers Internal","description":"List every customer one page at a time, inactive ones included, with its offer.\n\n`q` searches the name and the Salesforce account id. The list is in `sort` order, then by\nid; `name` sorts ignoring case and accents. A cursor is valid only with the filters, `sort`\nand `q` of the page it came from.","operationId":"list_customers_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|sf_account_id)(,-?(name|sf_account_id))*$","description":"Comma-separated keys among `name`, `sf_account_id`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"name","title":"Sort"},"description":"Comma-separated keys among `name`, `sf_account_id`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the active customers when true, only the inactive ones when false.","title":"Is Active"},"description":"Only the active customers when true, only the inactive ones when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these customers.","title":"Id"},"description":"Repeat to read only these customers."},{"name":"sf_account_id","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"maxItems":100,"description":"Repeat to read only the customers of these Salesforce accounts.","title":"Sf Account Id"},"description":"Repeat to read only the customers of these Salesforce accounts."},{"name":"strategy_scan_enabled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the customers the daily strategy scan includes when true, only the others when false.","title":"Strategy Scan Enabled"},"description":"Only the customers the daily strategy scan includes when true, only the others when false."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCustomersPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}":{"get":{"tags":["internal-customers"],"summary":"Get Customer Internal","description":"Get a customer by Salesforce account ID.","operationId":"get_customer_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCustomerOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-customers"],"summary":"Update Customer","description":"Rename, (de)activate a customer, set its website or where replies are forwarded.\n\nA field left out, or null, stays as it is; a body naming none is a 422. A rename is\ncarried to Kinde, ai-agents and the Hub, a website to ai-agents and the Hub. A forward\naddress is only stored: no other service holds it, and a blank string clears it.\nDeactivating\nis destructive and immediate: the next drain deletes the Kinde organization and every\nmembership in it, and closes the customer's Hub; reactivating mints a new organization\nrather than restoring the old one. There is no grace period to cancel within.\n\n``customers:write`` is what may do it: the lifecycle, which ``n8n`` starts on closed-won\nand the back office ends on churn, and the website, which the Hub's operators correct. Each\nchange is logged in the customer's event log with who made it; a value equal to the stored\none logs nothing.","operationId":"update_customer","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCustomerListItem"}}}},"404":{"description":"No customer has this account id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/crm-record-urls":{"get":{"tags":["internal-customers"],"summary":"Get Customer Crm Record Urls","description":"Deep links into the customer's CRM for the given contact and account records.\n\nEither id may be omitted, and a customer with no connected CRM answers with both\nURLs null rather than an error: the caller is annotating a message, not resolving a\nrecord, so a missing link degrades instead of failing the run.","operationId":"get_customer_crm_record_urls","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"contact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Id"}},{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCrmRecordUrlsOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/events":{"get":{"tags":["internal-customers"],"summary":"List Customer Events","description":"List who registered, changed, activated or deactivated a customer, and when.\n\nNewest first, by page, inactive customers included. A customer registered before the\nlog began has no `created` event.","operationId":"list_customer_events","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomerEventKind"},{"type":"null"}],"description":"Only the events of this kind; every kind when omitted.","title":"Kind"},"description":"Only the events of this kind; every kind when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerEventsPage"}}}},"404":{"description":"No customer has this account id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/offer":{"patch":{"tags":["internal-customers"],"summary":"Update Customer Offer","description":"Set a customer's offer, its SQL target per month, or both.\n\nA field left out stays as it is, and `null` clears it. Each field that moves is logged in the\ncustomer's event log with who moved it; a write that moves nothing logs nothing.","operationId":"update_customer_offer","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOfferUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOfferOutput"}}}},"404":{"description":"No customer has this account id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/strategy":{"patch":{"tags":["internal-customers"],"summary":"Update Customer Strategy","description":"Include a customer in ai-agents' daily strategy scan, or leave it out.\n\nEvery customer starts out of it. The flag says nothing about whether the customer is active,\nand deactivating one leaves it as it is: a reader wanting the customers to scan also filters\non `is_active=true`. Each change is logged in the customer's event log with who made it;\nthe stored value logs nothing.","operationId":"update_customer_strategy","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerStrategyUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerStrategyOutput"}}}},"404":{"description":"No customer has this account id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/language":{"patch":{"tags":["internal-customers"],"summary":"Update Customer Language","description":"Set the language ai-agents writes a customer's copy in when the campaign names none.\n\nEvery customer starts on `fr`. A change is pushed to ai-agents and logged in the customer's\nevent log with who made it; setting the stored value changes, logs and queues nothing.","operationId":"update_customer_language","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLanguageUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLanguageOutput"}}}},"404":{"description":"No customer has this account id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/formality":{"patch":{"tags":["internal-customers"],"summary":"Update Customer Formality","description":"Set the register ai-agents writes a customer's French copy in when the campaign names none.\n\nNull is not stated, as a customer nobody set one for is, and clears it back. A campaign may\nname its own in ai-agents. A change is pushed to ai-agents and logged in the customer's\nevent log with who made it; setting the stored value changes, logs and queues nothing.","operationId":"update_customer_formality","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFormalityUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerFormalityOutput"}}}},"404":{"description":"No customer has this account id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/context":{"get":{"tags":["internal-customers"],"summary":"Get Customer Context","description":"Read a customer's context in force: the newest version of each category.\n\nA customer's context is what people keep for the agents writing for the customer, ai-agents'\nand the Hub's: `common`,\nwhat applies whatever the work, the rules every agent follows; `strategy`, its targeting,\ntiming and offers and the facts worth keeping about it; `copy`, how its messages are\nwritten. Each agent chooses the categories it reads. The client reads all of them. A\ncategory never written is left out; one written and then cleared is there, empty.","operationId":"get_customer_context","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerContextResponse"},"title":"Response Get Customer Context"}}}},"404":{"description":"No customer has this account id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/context/{category}":{"put":{"tags":["internal-customers"],"summary":"Write Customer Context","description":"Replace one category of a customer's context, recording who wrote it.\n\nThe content becomes the category's next version, and the previous ones stay as its\nhistory. Writing the content already in force adds no version and answers the current\none.","operationId":"write_customer_context","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"category","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomerContextCategory"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerContextWritePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerContextResponse"}}}},"404":{"description":"No customer has this account id."},"409":{"description":"`expected_version` is not the category's newest version."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/context/{category}/versions":{"get":{"tags":["internal-customers"],"summary":"List Customer Context Versions","description":"List every version of one category of a customer's context, newest first.","operationId":"list_customer_context_versions","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"category","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CustomerContextCategory"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerContextVersionsPage"}}}},"404":{"description":"No customer has this account id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/client-references":{"get":{"tags":["internal-customers"],"summary":"List Client References","description":"List a customer's client references one page at a time, in the order they were added.\n\nA reference is a client of the customer's and how the customer's copy may use it: cite it,\nshow its logo only, describe it without its name, use it only as a seed for similar\nprospects, or never name it because it refused. `to_validate` ones wait for someone to\nconfirm the customer agreed. The customer and their team keep them, in the Hub and through\nai-agents. A cursor is valid only with the customer and the filters of the page it came from.","operationId":"list_client_references","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ClientReferenceStatus"},{"type":"null"}],"description":"Keep the references in this status.","title":"Status"},"description":"Keep the references in this status."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientReferencesPage"}}}},"404":{"description":"No active customer has this id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-customers"],"summary":"Create Client Reference","description":"Add a client reference to a customer's, recording who wrote it.","operationId":"create_client_reference","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientReferenceCreatePayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientReferenceResponse"}}}},"404":{"description":"No active customer has this id."},"409":{"description":"The customer already has a reference to this client."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/client-references/{reference_id}":{"patch":{"tags":["internal-customers"],"summary":"Update Client Reference","description":"Change some fields of one of a customer's client references.\n\nIts writer becomes the one recorded. Sending only values it already holds changes nothing,\nits writer included.","operationId":"update_client_reference","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"reference_id","in":"path","required":true,"schema":{"type":"integer","title":"Reference Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientReferenceUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientReferenceResponse"}}}},"404":{"description":"No active customer has this account id, or it has no reference with this id."},"409":{"description":"The new name is a client the customer already has a reference to."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-customers"],"summary":"Delete Client Reference","description":"Delete one of a customer's client references. Who deleted it is logged.","operationId":"delete_client_reference","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"reference_id","in":"path","required":true,"schema":{"type":"integer","title":"Reference Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"No active customer has this account id, or it has no reference with this id."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/exclusions":{"post":{"tags":["internal-customers"],"summary":"Exclude Customer Contacts Internal","description":"Take contacts out of every campaign of the customer's, now and to come.\n\nBy `profile_key`, or every contact of a `company_key`. The exclusion is queued and the\nworker applies it after this answer, usually within seconds, longer while a refresh of one\nof the customer's audiences is running: the keys join the customer's client-exclusion lists,\nwhich every search of theirs excludes, and the audience records holding them are turned off,\nso no push carries them. Each contact a playbook already took in, a stopped one included, is\nthen taken out of the CRM, by clearing its `lemlist_sequence`, which takes it out of the CRM\nlist Lemlist imports from, and out of the playbook's Lemlist campaigns, retrying until both\nare done. An audience built from a CSV holds no warehouse key, so none names its records.\n`GET …/exclusions/{exclusion_id}` reads where it stands.","operationId":"exclude_customer_contacts_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeCustomerContactsPayload"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionQueuedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-customers"],"summary":"List Customer Exclusions Internal","description":"List the customer's exclusions, newest first, each as its own GET reads it, from Postgres.\n\nBoth kinds: those from every campaign of the customer's, which the client's « Retirer » in\nthe Hub sends and which name no campaign, and a strategy campaign's own. `actor` is who\nasked and `caller` the machine that sent it. With `strategy_campaign_id`, only what reached\nthe campaign: its own exclusions, and those from every campaign whose keys name a contact\nits playbook took in, before the worker has applied them too, so one stuck in `pending` or\n`error` shows; their `removals` are narrowed to that playbook. A campaign of another\ncustomer's is a 404.","operationId":"list_customer_exclusions_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"strategy_campaign_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only what reached this campaign of the customer's: its own exclusions, and those from every campaign whose keys name a contact its playbook took in, each with the removals from that playbook alone. Every exclusion of the customer's when omitted.","title":"Strategy Campaign Id"},"description":"Only what reached this campaign of the customer's: its own exclusions, and those from every campaign whose keys name a contact its playbook took in, each with the removals from that playbook alone. Every exclusion of the customer's when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionsPage"}}}},"404":{"description":"The customer holds no such campaign."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/exclusions/{exclusion_id}":{"get":{"tags":["internal-customers"],"summary":"Get Customer Exclusion Internal","description":"Read where an exclusion from every campaign of the customer's stands, from Postgres.\n\n`status` is the request's: `pending` until the worker takes it, `in_progress` while it\napplies it, `success` once the keys are in the client-exclusion lists and the records off,\n`error` while it retries after a failure, `error` and `attempts` saying which and how often.\n`removals` holds each contact the keys name in each of the customer's playbooks, with what\nbecame of its CRM `lemlist_sequence` (`crm`) and its Lemlist leads (`lemlist`), `pending`\nuntil that step is settled; a removal's own `status` and `attempts` say the same as the\nrequest's. A removal in `error` keeps being retried, a customer with no Lemlist key for\ninstance, until someone fixes the cause. The request is settled once it and every removal\nare `success`. An exclusion of another customer's, or of a campaign, is a 404.","operationId":"get_customer_exclusion_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"exclusion_id","in":"path","required":true,"schema":{"type":"integer","title":"Exclusion Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/customers/{sf_account_id}/lemlist-api/{lemlist_path}":{"get":{"tags":["internal-lemlist"],"summary":"GET a Lemlist API path with the customer's key","operationId":"lemlist_proxy_get","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"lemlist_path","in":"path","required":true,"schema":{"type":"string","description":"The path under Lemlist's API, `/api/` excluded.","title":"Lemlist Path"},"description":"The path under Lemlist's API, `/api/` excluded."}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-lemlist"],"summary":"POST a Lemlist API path with the customer's key","operationId":"lemlist_proxy_post","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"lemlist_path","in":"path","required":true,"schema":{"type":"string","description":"The path under Lemlist's API, `/api/` excluded.","title":"Lemlist Path"},"description":"The path under Lemlist's API, `/api/` excluded."}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["internal-lemlist"],"summary":"PUT a Lemlist API path with the customer's key","operationId":"lemlist_proxy_put","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"lemlist_path","in":"path","required":true,"schema":{"type":"string","description":"The path under Lemlist's API, `/api/` excluded.","title":"Lemlist Path"},"description":"The path under Lemlist's API, `/api/` excluded."}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-lemlist"],"summary":"PATCH a Lemlist API path with the customer's key","operationId":"lemlist_proxy_patch","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"lemlist_path","in":"path","required":true,"schema":{"type":"string","description":"The path under Lemlist's API, `/api/` excluded.","title":"Lemlist Path"},"description":"The path under Lemlist's API, `/api/` excluded."}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-lemlist"],"summary":"DELETE a Lemlist API path with the customer's key","operationId":"lemlist_proxy_delete","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"lemlist_path","in":"path","required":true,"schema":{"type":"string","description":"The path under Lemlist's API, `/api/` excluded.","title":"Lemlist Path"},"description":"The path under Lemlist's API, `/api/` excluded."}],"responses":{"200":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audiences/{sf_account_id}":{"post":{"tags":["internal-audiences"],"summary":"Create Audience Internal","description":"Create an audience via internal API.\n\nThe payload's ``audience_source`` picks between ``people_list`` (atomic\nlist + audience creation), ``filters`` (audience from search filters) and\n``records`` (an audience whose members are the rows passed in, read back on\n``GET .../{audience_id}/records``).\nThe change log records the caller, the person it names in its header or the\ncaller itself, and how ai-agents was reached (`get_machine_author`).","operationId":"create_audience_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalAudienceCreationPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCreateAudienceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-audiences"],"summary":"Get Audiences Internal","description":"List a customer's audiences one page at a time, as `GET /api/v1/audiences` does.","operationId":"get_audiences_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|created_at)(,-?(name|created_at))*$","description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-created_at","title":"Sort"},"description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"audience_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AudienceType"},{"type":"null"}],"title":"Audience Type"}},{"name":"is_deleted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only deleted audiences when true, only those not deleted when false.","title":"Is Deleted"},"description":"Only deleted audiences when true, only those not deleted when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these audiences.","title":"Id"},"description":"Repeat to read only these audiences."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudiencesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audiences/{sf_account_id}/{audience_id}":{"patch":{"tags":["internal-audiences"],"summary":"Patch Audience Internal","description":"Replace an audience's configuration via internal API.\n\n`expected_revision` is the `revision` the configuration was read at; an audience saved\nsince answers 409. A records audience takes a new name or intent only: a change to its\ntype, table mode or filters is a 400.\n\nThe change log records the caller, and the person it names in its header\nor the caller itself, as ``create_audience_internal`` does. A change to what the audience\nselects is logged on the open strategy campaigns built on it, as the same author, with the\npayload's `comment`: `strategy_campaign_events` lists what was logged.","operationId":"patch_audience_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalAudiencePatchPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPatchAudienceResponse"}}}},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceRevisionConflict"}}},"description":"Conflict"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-audiences"],"summary":"Get Audience Internal","description":"Get a single audience's configuration (filters, type, table_mode) via internal API.","operationId":"get_audience_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAudienceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audiences/{sf_account_id}/{audience_id}/records":{"get":{"tags":["internal-audiences"],"summary":"Get Audience Records Internal","description":"List a profile audience's active records one page at a time, in the order it gained them.\n\nAs `GET /api/v1/audiences/{audience_id}/records` does: read from Postgres, never searched,\nthe records its last refresh stored, or those of an audience built from uploaded records\nwith the display, `email`, `phone` and `extra_data` stored from its rows. `include=full`\nadds the whole search row of a member of its sample, its first 50 records. A company\naudience is a 409.","operationId":"get_audience_records_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"audience_id","in":"path","required":true,"schema":{"type":"integer","title":"Audience Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"const":"full","type":"string"},"description":"Parts to add to each record: `full`.","default":[],"title":"Include"},"description":"Parts to add to each record: `full`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AudienceRecordsPage"}}}},"409":{"description":"The audience is of another kind.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder_v2/{sf_account_id}/profile/search":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Profile Search","operationId":"internal_profile_search","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalProfileSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProfileSearchResponseV2"},"title":"Response Internal Profile Search"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder_v2/{sf_account_id}/profile/search/count":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Profile Search Count","operationId":"internal_profile_search_count","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultsCount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder_v2/{sf_account_id}/profile/search/distribution":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Profile Search Distribution","description":"Break the profiles a search matches down by the requested fields, spending no credit.","operationId":"internal_profile_search_distribution","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSearchDistributionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileSearchDistribution"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder_v2/{sf_account_id}/company/search":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Company Search","operationId":"internal_company_search","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCompanySearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanySearchResponseV2"},"title":"Response Internal Company Search"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder_v2/{sf_account_id}/company/search/count":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Company Search Count","operationId":"internal_company_search_count","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResultsCount"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder_v2/{sf_account_id}/company/search/distribution":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Company Search Distribution","description":"Break the companies a search matches down by the requested fields, spending no credit.","operationId":"internal_company_search_distribution","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchDistributionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchDistribution"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder_v2/{sf_account_id}/enrichable":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Enrichable Company Keys","description":"Resolve a search's enrichable company keys, without enriching them.\n\nThe read half of the public ``/enrich`` trigger, for ai-agents: it owns enrichment and\nthe credit accounting that goes with it, we own the definition of \"enrichable\". So it\nasks who qualifies and runs the job itself, rather than us calling back into it — which\nwould make a request that started in ai-agents round-trip through here and back.\n\nSame use case as the public trigger, so the keys returned here are exactly the ones that\nroute would have enriched, and both stay tied to the count the UI shows.","operationId":"internal_enrichable_company_keys","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanySearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrichableKeysResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder_v2/company/lookup":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Company Lookup","description":"Find companies by LinkedIn universal name or id, or by domain, best match first.\n\nA LinkedIn universal name or id names at most one company; a domain can name thousands, hence\n`limit` and `match_count`. No match is an empty list, not an error.","operationId":"internal_company_lookup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyLookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/audience_builder_v2/profile/lookup":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Profile Lookup","description":"Find a profile, and its company, by LinkedIn public identifier.\n\nNo match is a null profile, not an error.","operationId":"internal_profile_lookup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileLookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/audience_builder_v2/profile/lookup/bulk":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Profile Bulk Lookup","description":"Find profiles, and their companies, by LinkedIn public identifier, many at once.\n\nThe single lookup's rule in a few queries for the whole list. One result per identifier, in\nthe order sent; no match is a null profile, not an error.","operationId":"internal_profile_bulk_lookup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileBulkLookupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileBulkLookupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/audience_builder_v2/profile/find":{"post":{"tags":["internal-audience-builder-v2"],"summary":"Internal Profile Find","description":"Find the profiles carrying a first and last name at a company, by domain or by name.\n\nA name at a company is usually one profile but not always, hence `limit` and `match_count`.\nNo match is an empty list, not an error.","operationId":"internal_profile_find","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileFindRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileFindResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/lists/{sf_account_id}/company":{"get":{"tags":["internal-lists"],"summary":"Get Company Lists Internal","description":"List the customer's company lists one page at a time.\n\n`q` searches the list's name. The list is in `sort` order, then by id; on the default list\n(`type=default`) the customer's own lists come before the library's, each in that order. A\ncursor is valid only with the filters, `sort` and `q` of the page it came from.","operationId":"get_company_lists_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|created_at)(,-?(name|created_at))*$","description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-created_at","title":"Sort"},"description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"type","in":"query","required":false,"schema":{"enum":["default","management","scala-lib"],"type":"string","description":"`default` for the customer's own lists, then the library's; `management` for the customer's own; `scala-lib` for the library's.","default":"default","title":"Type"},"description":"`default` for the customer's own lists, then the library's; `management` for the customer's own; `scala-lib` for the library's."},{"name":"is_used","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the lists some audience uses when true, only those none uses when false, as `audience_count` counts them.","title":"Is Used"},"description":"Only the lists some audience uses when true, only those none uses when false, as `audience_count` counts them."},{"name":"excluded_by_default","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the lists every search of the customer's excludes when true, only the others when false.","title":"Excluded By Default"},"description":"Only the lists every search of the customer's excludes when true, only the others when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these lists.","title":"Id"},"description":"Repeat to read only these lists."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/lists/{sf_account_id}/people":{"get":{"tags":["internal-lists"],"summary":"Get People Lists Internal","description":"List the customer's people lists one page at a time.\n\n`q` searches the list's name. The list is in `sort` order, then by id; on the default list\n(`type=default`) the customer's own lists come before the library's, each in that order. A\ncursor is valid only with the filters, `sort` and `q` of the page it came from.","operationId":"get_people_lists_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|created_at)(,-?(name|created_at))*$","description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-created_at","title":"Sort"},"description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"type","in":"query","required":false,"schema":{"enum":["default","management","scala-lib"],"type":"string","description":"`default` for the customer's own lists, then the library's; `management` for the customer's own; `scala-lib` for the library's.","default":"default","title":"Type"},"description":"`default` for the customer's own lists, then the library's; `management` for the customer's own; `scala-lib` for the library's."},{"name":"is_used","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the lists some audience uses when true, only those none uses when false, as `audience_count` counts them.","title":"Is Used"},"description":"Only the lists some audience uses when true, only those none uses when false, as `audience_count` counts them."},{"name":"excluded_by_default","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the lists every search of the customer's excludes when true, only the others when false.","title":"Excluded By Default"},"description":"Only the lists every search of the customer's excludes when true, only the others when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these lists.","title":"Id"},"description":"Repeat to read only these lists."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeopleListsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/lists/people":{"post":{"tags":["internal-lists"],"summary":"Create People List From Internal","description":"Create a people list via internal API.","operationId":"create_people_list_from_internal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPeopleListPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PeopleListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/lists/people/{list_id}/append":{"post":{"tags":["internal-lists"],"summary":"Append People List Rows From Internal","description":"Append rows to a people list, which holds each tuple of identifiers once.\n\nA row whose identifiers the list holds replaces that row's `extra_data`; one it holds as\nsent changes nothing, so sending the same rows again adds none.","operationId":"append_people_list_rows_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalAppendPeopleListRowsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRowsAppended"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/lists/company":{"post":{"tags":["internal-lists"],"summary":"Create Company List From Internal","description":"Create a company list via internal API.","operationId":"create_company_list_from_internal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCompanyListPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListEntity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/lists/company/{list_id}/append":{"post":{"tags":["internal-lists"],"summary":"Append Company List Rows From Internal","description":"Append rows to a company list, which holds each tuple of identifiers once.\n\nA row whose identifiers the list holds replaces that row's `extra_data`; one it holds as\nsent changes nothing, so sending the same rows again adds none.","operationId":"append_company_list_rows_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalAppendCompanyListRowsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListRowsAppended"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/lists/company/{list_id}/remove":{"post":{"tags":["internal-lists"],"summary":"Remove Company List Rows From Internal","description":"Remove rows from a company list via internal API.","operationId":"remove_company_list_rows_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalRemoveListRowsPayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/lists/people/{list_id}/remove":{"post":{"tags":["internal-lists"],"summary":"Remove People List Rows From Internal","description":"Remove rows from a people list via internal API.","operationId":"remove_people_list_rows_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"integer","title":"List Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalRemoveListRowsPayload"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/personas/{sf_account_id}":{"get":{"tags":["internal-personas"],"summary":"Get Persona List From Internal","description":"Get all the customer's personas (library + own) via internal API.","operationId":"get_persona_list_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PersonaResponse"},"title":"Response Get Persona List From Internal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-personas"],"summary":"Create Persona From Internal","description":"Create a persona of the customer's, authored by the person the caller names, if any.\n\nThe library is written through `/internal/api/v1/persona-library` alone.","operationId":"create_persona_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaCreationPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePersonaOutput"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/personas/{sf_account_id}/{persona_id}":{"get":{"tags":["internal-personas"],"summary":"Get Persona From Internal","description":"Get a single persona (library + own) via internal API.","operationId":"get_persona_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"integer","title":"Persona Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-personas"],"summary":"Patch Persona From Internal","description":"Replace a customer's persona's name and filters. The person is logged, not stored.","operationId":"patch_persona_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"integer","title":"Persona Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaPatchPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-personas"],"summary":"Delete Persona From Internal","description":"Delete a customer's persona nothing names, or 400. The person is logged.","operationId":"delete_persona_from_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"integer","title":"Persona Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/persona-library":{"get":{"tags":["internal-personas"],"summary":"Get Persona Library Internal","description":"List the library's personas with their usage counts, deletion guard and author.","operationId":"get_persona_library_internal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/LibraryPersonaResponse"},"type":"array","title":"Response Get Persona Library Internal"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]},"post":{"tags":["internal-personas"],"summary":"Create Library Persona Internal","description":"Add a persona to the library, authored by the person the caller names.\n\nWho may edit the library is the caller's decision: scala-app records the person.","operationId":"create_library_persona_internal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryPersonaPayload"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryPersonaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/persona-library/{persona_id}":{"patch":{"tags":["internal-personas"],"summary":"Update Library Persona Internal","description":"Replace a library persona's name and filters. The person is logged, not stored.","operationId":"update_library_persona_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"integer","title":"Persona Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryPersonaPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LibraryPersonaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-personas"],"summary":"Delete Library Persona Internal","description":"Delete a library persona nothing names, or 409 (see `deletable`). The person is logged.","operationId":"delete_library_persona_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"persona_id","in":"path","required":true,"schema":{"type":"integer","title":"Persona Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/intents":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Intents Internal","description":"List the campaign strategy intent taxonomy: its live intents, or every one.\n\nThe taxonomy is global rather than per customer, so this endpoint takes no\n``sf_account_id``.","operationId":"get_strategy_intents_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"include_retired","in":"query","required":false,"schema":{"type":"boolean","description":"List retired intents too, to name the key a campaign or audience still holds. Never offer one: no campaign or audience is given a retired key.","default":false,"title":"Include Retired"},"description":"List retired intents too, to name the key a campaign or audience still holds. Never offer one: no campaign or audience is given a retired key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StrategyIntentResponse"},"title":"Response Get Strategy Intents Internal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/taxonomy":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Taxonomy Internal","description":"Read the whole taxonomy as of one revision.\n\nEach live intent's content and variables, and every live copy token: what the copy and\nstrategy agents write from. ``revision`` changes with every write, so a reader caches on it.","operationId":"get_strategy_taxonomy_internal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyTaxonomyResponse"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/strategy/taxonomy/revisions":{"post":{"tags":["internal-strategy"],"summary":"Revise Strategy Taxonomy Internal","description":"Change intents and tokens as one revision: every change applies, or none.\n\nEach change creates, updates, retires or restores one intent or token. An update names\nthe fields it changes and keeps the others; a list it names, an intent's `required`,\n`recommended` or `copy_paths`, is replaced whole. A retired entry keeps its row and its\nkey, which campaigns and audiences go on holding; no read but this write's offers it.\n\nThe taxonomy the changes leave is checked as a whole, and a 400 names every rule it\nbreaks: an intent's copy paths wider than its required tokens allow, a live intent using a\nretired token, two intents with one label, two tokens at one position, `generic` retired\nor without guidance. A `base_revision` the taxonomy has moved on from answers 409.","operationId":"revise_strategy_taxonomy_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseStrategyTaxonomyPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyTaxonomyRevisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-strategy"],"summary":"Get Strategy Taxonomy Revisions Internal","description":"List the taxonomy's revisions newest first, one page at a time, without their changes.","operationId":"get_strategy_taxonomy_revisions_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyTaxonomyRevisionsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/taxonomy/revisions/{revision_id}":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Taxonomy Revision Internal","description":"One revision with every change it made, each entry's record before and after.","operationId":"get_strategy_taxonomy_revision_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"integer","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyTaxonomyRevisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/events":{"get":{"tags":["internal-strategy"],"summary":"List Strategy Events Internal","description":"List the event library one page at a time: trade shows, conferences, summits, industry days.\n\nThe library is the same for every customer, and holds past editions until their next one\nis dated: `from_date` keeps what is still to come. An event without sectors is for every\nsector, so a `sector` filter keeps it. `q` searches the name, edition, city and\naudience. The list is in `sort` order, then by id; an event without dates sorts last, and\n`name` sorts ignoring case and accents. A cursor is valid only with the filters, `sort`\nand `q` of the page it came from. `revision` is what a write names as its base.","operationId":"list_strategy_events_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(starts_on|name)(,-?(starts_on|name))*$","description":"Comma-separated keys among `starts_on`, `name`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"starts_on","title":"Sort"},"description":"Comma-separated keys among `starts_on`, `name`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"persona","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/StrategyEventPersona"},"description":"Repeat to keep the events any of these buyer families takes part in.","title":"Persona"},"description":"Repeat to keep the events any of these buyer families takes part in."},{"name":"sector","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/StrategyEventSector"},"description":"Repeat to keep the events with participants from any of these sectors.","title":"Sector"},"description":"Repeat to keep the events with participants from any of these sectors."},{"name":"from_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Keep the events not over by this day. An event without dates is left out.","title":"From Date"},"description":"Keep the events not over by this day. An event without dates is left out."},{"name":"to_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Keep the events started by this day. An event without dates is left out.","title":"To Date"},"description":"Keep the events started by this day. An event without dates is left out."},{"name":"include_retired","in":"query","required":false,"schema":{"type":"boolean","description":"Also list the events the library no longer offers.","default":false,"title":"Include Retired"},"description":"Also list the events the library no longer offers."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyEventsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/events/revisions":{"post":{"tags":["internal-strategy"],"summary":"Revise Strategy Events Internal","description":"Change events as one revision: every change applies, or none.\n\nEach change creates, updates, retires or restores one event. An update names the fields\nit changes and keeps the others; a list it names, `personas`, `sectors` or `sources`, is\nreplaced whole. A retired event keeps its row and its key, and only a read asking for\nretired events returns it. A field a change cannot hold, such as an end before the start or\nan unknown family, is a 422 at its place in the payload. A 400 names every change that\ncannot apply to the library: an unknown key, one already taken, an update that would leave\nan event invalid or that changes nothing. A `base_revision` the library has moved on from\nanswers 409.","operationId":"revise_strategy_events_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseStrategyEventsPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyEventRevisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-strategy"],"summary":"Get Strategy Event Revisions Internal","description":"List the library's revisions newest first, one page at a time, without their changes.","operationId":"get_strategy_event_revisions_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},{"type":"null"}],"description":"Only the revisions that changed this event.","title":"Key"},"description":"Only the revisions that changed this event."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyEventRevisionsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/events/revisions/{revision_id}":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Event Revision Internal","description":"One revision with every change it made, each event's record before and after.","operationId":"get_strategy_event_revision_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"integer","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyEventRevisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/events/{key}":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Event Internal","description":"Read one event by its key, retired or not, and the library's revision it was read at.","operationId":"get_strategy_event_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyEventDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/copy-samples":{"get":{"tags":["internal-strategy"],"summary":"List Strategy Copy Samples Internal","description":"List Scalability's best copies one page at a time, without their sequences.\n\nThey are the same for every customer: campaigns the agency wrote for its clients, kept for\nthe writers of the next ones. A customer's own samples are listed under\n`/customer-copy-samples/{sf_account_id}`, never here. `intent` keeps the samples naming that\nintent; an intent no sample names has none. The list is in the order the samples were\nadded. A cursor is valid only with the filters of the page it came from.\n`revision` is what a write names as its base.","operationId":"list_strategy_copy_samples_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$"},{"type":"null"}],"description":"Keep the samples naming this intent.","title":"Intent"},"description":"Keep the samples naming this intent."},{"name":"include_retired","in":"query","required":false,"schema":{"type":"boolean","description":"Also list the samples the library no longer offers.","default":false,"title":"Include Retired"},"description":"Also list the samples the library no longer offers."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCopySamplesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/copy-samples/revisions":{"post":{"tags":["internal-strategy"],"summary":"Revise Strategy Copy Samples Internal","description":"Change the agency's part of the library as one revision: every change applies, or none.\n\nA change updates the library's descriptions, or creates, updates, retires or restores one\nbest copy; a customer's sample is out of its reach. An update names the fields it changes\nand keeps the others; a list it names, a sample's `intents` or `sequences`, is replaced\nwhole. A retired sample keeps its row and its key, and only a read asking for retired ones\nreturns it. A field a change cannot hold, such as a subject on a LinkedIn message, is a 422\nat its place in the payload. A 400 names every change that cannot apply, and every rule the\nlibrary it leaves breaks: an unknown or taken key, an intent that is not live. A\n`base_revision` the library has moved on from answers 409, whoever moved it: a customer's\nsamples share the library's revision.","operationId":"revise_strategy_copy_samples_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseStrategyCopySamplesPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCopySampleRevisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-strategy"],"summary":"Get Strategy Copy Sample Revisions Internal","description":"List the agency's revisions newest first, one page at a time, without their changes.\n\nThose that changed the best copies or the library's own row: a customer's samples have a\nhistory of their own, under `/customer-copy-samples/{sf_account_id}/revisions`.","operationId":"get_strategy_copy_sample_revisions_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only the revisions that changed the sample or the former set of this key, or `library` for the library's description.","title":"Key"},"description":"Only the revisions that changed the sample or the former set of this key, or `library` for the library's description."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCopySampleRevisionsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/copy-samples/revisions/{revision_id}":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Copy Sample Revision Internal","description":"One of the agency's revisions with every change it made, each row's record before and after.\n\nA customer's revision is a 404 here.","operationId":"get_strategy_copy_sample_revision_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"integer","title":"Revision Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCopySampleRevisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/copy-samples/{key}":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Copy Sample Internal","description":"Read one best copy by its key, retired or not, and the revision it was read at.\n\nIt comes with its sequences step by step and the library's description, which every\nbest copy is read with. How to write for one of its intents is that intent's guidance.","operationId":"get_strategy_copy_sample_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCopySampleDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/customer-copy-samples/{sf_account_id}":{"get":{"tags":["internal-strategy"],"summary":"List Customer Copy Samples Internal","description":"List the customer's own copy samples one page at a time, without their sequences.\n\nCopies discussed with the customer, mostly at onboarding: their facts are the customer's\nown, unlike the best copies'. `proposed` ones have not been agreed with the customer yet.\nThe list is in the order the samples were added. A cursor is valid only with the customer\nand the filters of the page it came from. `revision` is what a write names as its base.","operationId":"list_customer_copy_samples_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"intent","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$"},{"type":"null"}],"description":"Keep the samples naming this intent.","title":"Intent"},"description":"Keep the samples naming this intent."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomerCopySampleStatus"},{"type":"null"}],"description":"Keep the samples in this status.","title":"Status"},"description":"Keep the samples in this status."},{"name":"include_retired","in":"query","required":false,"schema":{"type":"boolean","description":"Also list the samples the customer no longer uses.","default":false,"title":"Include Retired"},"description":"Also list the samples the customer no longer uses."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCopySamplesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/customer-copy-samples/{sf_account_id}/revisions":{"post":{"tags":["internal-strategy"],"summary":"Revise Customer Copy Samples Internal","description":"Change the customer's samples as one revision: every change applies, or none.\n\nA change creates, updates, retires or restores one of the customer's samples, and reaches\nno other customer's and no best copy. An update names the fields it changes and keeps the\nothers; a list it names, `intents`, `variables` or `sequences`, is replaced whole. A field a\nchange cannot hold is a 422 at its place in the payload. A 400 names every change that\ncannot apply, and every rule the samples it leaves break: an unknown key, or one the\ncustomer already uses; an intent that is not live; Liquid that does not parse; a variable\nthe copy reads that is neither a live token, a Lemlist variable nor listed in `variables`,\nand a listed one the copy does not read or a token or Lemlist fills. The library has one\nrevision for every writer, so a `base_revision` it has moved on from answers 409, whoever\nmoved it.","operationId":"revise_customer_copy_samples_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseCustomerCopySamplesPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCopySampleRevisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-strategy"],"summary":"Get Customer Copy Sample Revisions Internal","description":"List the customer's revisions newest first, one page at a time, without their changes.","operationId":"get_customer_copy_sample_revisions_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only the revisions that changed the sample of this key.","title":"Key"},"description":"Only the revisions that changed the sample of this key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCopySampleRevisionsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/customer-copy-samples/{sf_account_id}/revisions/{revision_id}":{"get":{"tags":["internal-strategy"],"summary":"Get Customer Copy Sample Revision Internal","description":"One of the customer's revisions with every change it made, before and after.\n\nAnother customer's revision, or the agency's, is a 404.","operationId":"get_customer_copy_sample_revision_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"revision_id","in":"path","required":true,"schema":{"type":"integer","title":"Revision Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCopySampleRevisionDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/customer-copy-samples/{sf_account_id}/{key}":{"get":{"tags":["internal-strategy"],"summary":"Get Customer Copy Sample Internal","description":"Read one of the customer's samples by its key, retired or not, and its revision.\n\nIt comes with its sequences step by step, its variables, and the library's\n`customer_description`, which every customer sample is read with. How to write for one of\nits intents is that intent's guidance.","operationId":"get_customer_copy_sample_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCopySampleDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}":{"post":{"tags":["internal-strategy"],"summary":"Propose Strategy Campaign Internal","description":"Propose a campaign, with its audience and inactive campaign playbook or without them.\n\nIt enters review at `idea_review`, or at `audience_review` with `idea_accepted`.","operationId":"propose_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposeStrategyCampaignPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-strategy"],"summary":"Get Strategy Campaigns Internal","description":"List a customer's campaigns by planned launch date, then id, one page at a time.\n\nRepeat `status` or `intent` to filter on several; none means all. `planned_launch_from`\nand `planned_launch_to` are inclusive. An unknown query parameter is a 422, and so is a\ncursor sent with other filters, or for another customer, than the page it came from.","operationId":"get_strategy_campaigns_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/StrategyCampaignStatus"},"title":"Status"}},{"name":"intent","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Intent"}},{"name":"planned_launch_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive: campaigns launching on this day or later.","title":"Planned Launch From"},"description":"Inclusive: campaigns launching on this day or later."},{"name":"planned_launch_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive: campaigns launching on this day or earlier. A month ends on its last day, not on its 1st.","title":"Planned Launch To"},"description":"Inclusive: campaigns launching on this day or earlier. A month ends on its last day, not on its 1st."},{"name":"has_open_suggestion","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"`true` keeps the campaigns with an open suggestion, `false` those without; absent, both.","title":"Has Open Suggestion"},"description":"`true` keeps the campaigns with an open suggestion, `false` those without; absent, both."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}":{"patch":{"tags":["internal-strategy"],"summary":"Revise Strategy Campaign Internal","description":"Revise a campaign still open, or attach its audience and playbook.","operationId":"revise_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviseStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-strategy"],"summary":"Get Strategy Campaign Internal","description":"One campaign with its action log, oldest first.","operationId":"get_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/adopt":{"post":{"tags":["internal-strategy"],"summary":"Adopt Strategy Campaign Internal","description":"Attach a campaign playbook built outside the workflow, which supersedes the campaign's.\n\nIts audience and copy replace the campaign's and the steps reviewing them are skipped:\nto `external_review` when the playbook is published (active, queued for Lemlist or in it),\nto `copy_review` when it is not, whose validation activates it. Allowed at any step before\nthe copy's validation. Nothing is done to the playbook or to Lemlist, and the event is\n`adopted`.","operationId":"adopt_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/validate":{"post":{"tags":["internal-strategy"],"summary":"Validate Strategy Campaign Internal","description":"Validate the step the campaign is at, moving it to the next one.\n\n`expected_event_id` is the campaign's `last_event_id` as the decision was taken on it; a\ncampaign that has changed since answers 409.\n\nThe idea moves the campaign to `audience_review`, the audience to `copy_review` and the\ncopy to `external_review`; the audience and the copy must be attached first. The\nclient's validation, at `external_review`, leaves it there until the first send. Once its\nreview was reopened, it also resumes what the reopening paused, Lemlist first: if Lemlist\nfails, the answer is a 502 and nothing is recorded.","operationId":"validate_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/send-back":{"post":{"tags":["internal-strategy"],"summary":"Send Back Strategy Campaign Internal","description":"Send the campaign back to `to` with a comment; it and every later step are reviewed again.\n\n`expected_event_id` is the campaign's `last_event_id` as the decision was taken on it; a\ncampaign that has changed since answers 409.","operationId":"send_back_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendBackStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/rework-unanswered":{"post":{"tags":["internal-strategy"],"summary":"Rework Unanswered Strategy Campaign Internal","description":"Log that a rework of the campaign's send-back ended without answering it.\n\nThe event is `rework_unanswered`, with the comment, at the step the campaign was sent back\nto. The status, the asset and the validated flags stay as they are, and the send-back stays\nopen while it is the newest event: an edit of the asset is logged `reworked`. Only right\nafter the send-back: `expected_event_id` is its id, and anything since answers 409. It\nwakes nobody.","operationId":"rework_unanswered_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReworkUnansweredStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/refuse":{"post":{"tags":["internal-strategy"],"summary":"Refuse Strategy Campaign Internal","description":"Refuse the idea with a comment, closing the campaign.\n\nThe agent re-proposes it as a new campaign whose `replaces_id` names this one. A refusal\nmade by mistake is undone with `unrefuse`.\n`expected_event_id` is the campaign's `last_event_id` as the decision was taken on it; a\ncampaign that has changed since answers 409.","operationId":"refuse_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefuseStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/unrefuse":{"post":{"tags":["internal-strategy"],"summary":"Unrefuse Strategy Campaign Internal","description":"Undo a refusal made by mistake, with a comment saying why.\n\nThe campaign goes back to the step it was refused at, its validated flags as they were.\nRefused at `external_review`, its playbook is activated again and the Lemlist campaigns the\nrefusal paused are resumed; a draft one is left as it is. A campaign proposed to replace it\nis not checked: whether both should run is the caller's decision. A campaign that is not\nrefused answers 409, and so does one that has changed since `expected_event_id`, the\ncampaign's `last_event_id` as the decision was taken on it.","operationId":"unrefuse_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnrefuseStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/reopen":{"post":{"tags":["internal-strategy"],"summary":"Reopen Strategy Campaign Internal","description":"Reopen a client review already validated, before the first send, with a comment saying why.\n\nThe campaign stays at `external_review`, `client_validated` cleared and\n`client_review_reopened` set, for the client to validate again or refuse. Every Lemlist\ncampaign of its playbook is paused first: if Lemlist fails, the answer is a 502, nothing is\nrecorded, and what was paused runs again. One that has sent, which the first-send poll had\nnot recorded yet, is started again and answers 409: its review is over. Then the playbook\nis turned off, so nothing reaches the CRM or Lemlist until the client's validation, which\nresumes both. A review not validated, a campaign at another status, a customer with no\nLemlist key and a campaign that has changed since `expected_event_id`, its `last_event_id`\nas the decision was taken on it, answer 409. Nobody is woken.","operationId":"reopen_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReopenStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/retire":{"post":{"tags":["internal-strategy"],"summary":"Retire Strategy Campaign Internal","description":"Withdraw a campaign in review or paused with a comment, without refusing its idea.\n\nThe campaign closes; a re-proposal is a new campaign whose `replaces_id` may name this\none. At `external_review` that includes a campaign the client validated, before its first\nsend: its playbook is turned off and its running Lemlist campaigns are paused, a pause Lemlist\nrefuses being logged. A running campaign cannot be retired: it is sending, which this does not\nstop; pause it first. A paused one's Lemlist campaigns stay paused, and its open suggestion\nis closed. `expected_event_id` is the campaign's `last_event_id` as the decision was taken on\nit; a campaign that has changed since answers 409.","operationId":"retire_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetireStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/pause":{"post":{"tags":["internal-strategy"],"summary":"Pause Strategy Campaign Internal","description":"Pause a running campaign, in Lemlist and here.\n\nEvery Lemlist campaign of its playbook is paused first: if Lemlist fails, the answer is a\n502 and nothing is recorded, and calling again pauses what is left. Then the campaign is\n`paused`, its playbook turned off so no new contact reaches the CRM or Lemlist, and its\nopen `pause` suggestion, if any, is `done` by whoever paused it. A campaign that is not\nrunning answers 409, and so does a customer with no Lemlist key. Nobody is woken.","operationId":"pause_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/resume":{"post":{"tags":["internal-strategy"],"summary":"Resume Strategy Campaign Internal","description":"Resume a paused campaign, in Lemlist and here, back to `running`.\n\nEach Lemlist campaign of its playbook that Lemlist reports paused is started first; a draft\nor an ended one is left as it is. If Lemlist fails, the answer is a 502 and nothing is\nrecorded, and calling again starts what is left. Then the campaign is `running`, its\nplaybook turned on again, and its open `resume` suggestion, if any, is `done` by whoever\nresumed it. A campaign that is not paused answers 409, and so does a customer with no\nLemlist key.","operationId":"resume_strategy_campaign_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeStrategyCampaignPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/exclusions":{"post":{"tags":["internal-strategy"],"summary":"Exclude Strategy Campaign Contacts Internal","description":"Take contacts out of the campaign: by `profile_key`, or every contact of a `company_key`.\n\nThe exclusion is queued and the worker applies it after this answer, usually within seconds,\nlonger while a refresh of the audience is running: the keys join the audience's exclusions,\nso its search drops them and no later push carries them, and the audience's `revision` moves\non, which a writer that read it before sees as a 409. Once the campaign is live\n(`external_review`, `running`, `paused`), each of its contacts the keys name is then taken\nout of the CRM, by clearing its `lemlist_sequence`, which takes it out of the CRM list\nLemlist imports from, and out of the playbook's Lemlist campaigns, retrying until both are\ndone. A refused or retired campaign, or one with no audience yet, answers 409.\n`GET …/exclusions/{exclusion_id}` reads where it stands.","operationId":"exclude_strategy_campaign_contacts_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExcludeStrategyCampaignContactsPayload"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionQueuedResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/exclusions/{exclusion_id}":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Campaign Exclusion Internal","description":"Read where an exclusion from the campaign stands, from Postgres.\n\n`status` is the request's: `pending` until the worker takes it, `in_progress` while it\napplies it, `success` once the audience excludes the keys and its records are off, `error`\nwhile it retries after a failure, `error` and `attempts` saying which and how often: keys\nthe audience's filters no longer take, for instance, fail every attempt. `removals` holds\neach contact the keys name in the campaign's playbook, with what became of its CRM\n`lemlist_sequence` (`crm`) and its Lemlist leads (`lemlist`), `pending` until that step is\nsettled; a removal's own `status` and `attempts` say the same as the request's. A campaign\nnot live when the worker applied the request queued none, though a removal an earlier\nexclusion queued on its playbook for one of the contacts still shows: removals are found by\nthe request's keys, and a record has one removal, whichever exclusion queued it. A removal\nin `error` keeps being\nretried, a customer with no Lemlist key for instance, until someone fixes the cause. The\nrequest is settled once it and every removal are `success`. An exclusion of another\ncampaign's, or from every campaign of the customer's, is a 404.","operationId":"get_strategy_campaign_exclusion_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"exclusion_id","in":"path","required":true,"schema":{"type":"integer","title":"Exclusion Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns":{"get":{"tags":["internal-strategy"],"summary":"Get Portfolio Strategy Campaigns Internal","description":"List several customers' campaigns by planned launch date, then id, one page at a time.\n\nEach row names its customer. Repeat `sf_account_id` for each customer, at least one and at most\n`MAX_PORTFOLIO_CUSTOMERS`. An id naming no active customer is returned in\n`unknown_sf_account_ids` rather than failing the request. The other filters are those of a\nsingle customer's list. A cursor is valid only with the filters, `sf_account_id` included,\nof the page it came from.","operationId":"get_portfolio_strategy_campaigns_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/StrategyCampaignStatus"},"title":"Status"}},{"name":"intent","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"title":"Intent"}},{"name":"planned_launch_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive: campaigns launching on this day or later.","title":"Planned Launch From"},"description":"Inclusive: campaigns launching on this day or later."},{"name":"planned_launch_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive: campaigns launching on this day or earlier. A month ends on its last day, not on its 1st.","title":"Planned Launch To"},"description":"Inclusive: campaigns launching on this day or earlier. A month ends on its last day, not on its 1st."},{"name":"has_open_suggestion","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"`true` keeps the campaigns with an open suggestion, `false` those without; absent, both.","title":"Has Open Suggestion"},"description":"`true` keeps the campaigns with an open suggestion, `false` those without; absent, both."},{"name":"sf_account_id","in":"query","required":true,"schema":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":500,"title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyPortfolioCampaignsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/audience":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Campaign Audience Internal","description":"Summarize the campaign's contacts as its audience's last refresh stored them.\n\nRead from Postgres, never searched: where they come from (`source`), the playbook's records\nonce the campaign is live, the audience's active records before, and how many there are.\n`snapshot.state` says whether they are of the audience's current revision (`ready`,\n`too_large`) or of an older one while its refresh runs (`pending`) or after it failed\n(`failed`). An audience built from uploaded records is never refreshed: its records are the\nrows it was created with, always `ready`, with no `counts`, `revision` or `refreshed_at`.\n`GET …/records` lists the contacts.","operationId":"get_strategy_campaign_audience_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignAudienceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/records":{"get":{"tags":["internal-strategy"],"summary":"Get Strategy Campaign Records Internal","description":"List the campaign's contacts one page at a time, from where they are now (`source`).\n\nRead from Postgres, never searched: the records its playbook took once the campaign is live\n(`external_review`, `running`, `paused`), in the order the playbook took them, each with\nwhere it is in the playbook; its audience's active records before, in the order the\naudience gained them. A cursor is valid only on the source, audience and playbook it was\nissued for, which each page names. `include=scala_vars` adds what the playbook's variables\nresolved to: each record's own once live, before for the members of the audience's sample\nalone, its first 50 records. `include=full` adds the whole search row of a sample member.\n`GET …/audience` says how current the stored records are, and how many there are.","operationId":"get_strategy_campaign_records_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecordInclude"},"description":"Parts to add to each record: `scala_vars`, `full`.","default":[],"title":"Include"},"description":"Parts to add to each record: `scala_vars`, `full`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignRecordsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/comments":{"get":{"tags":["internal-strategy"],"summary":"List Strategy Campaign Comments Internal","description":"List a campaign's comment threads, newest first, each with its replies, oldest first.\n\nEvery comment is one the customer reads: none is an internal note.","operationId":"list_strategy_campaign_comments_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignThreadsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-strategy"],"summary":"Write Strategy Campaign Comment Internal","description":"Open a thread on the campaign or one of its Lemlist steps, or answer one.\n\nAnswers with the thread it is in. A campaign that never reached `audience_review` was never\nshown to the customer and answers 409. A step names one of the\ncampaign's `lemlist_campaigns` and a step of its sequence in Lemlist; the step itself is\nnot checked against Lemlist. Until the copy's validation publishes it, a thread is on the\ncampaign as a whole, and a step is a 400.","operationId":"write_strategy_campaign_comment_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteStrategyCampaignCommentPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/comments/{comment_id}/resolve":{"post":{"tags":["internal-strategy"],"summary":"Resolve Strategy Campaign Comment Internal","description":"Mark the thread rooted at `comment_id` handled. One already handled records nothing.","operationId":"resolve_strategy_campaign_comment_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/comments/{comment_id}/reopen":{"post":{"tags":["internal-strategy"],"summary":"Reopen Strategy Campaign Comment Internal","description":"Reopen the handled thread rooted at `comment_id`. One already open records nothing.","operationId":"reopen_strategy_campaign_comment_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/comments/{comment_id}":{"delete":{"tags":["internal-strategy"],"summary":"Delete Strategy Campaign Comment Internal","description":"Delete a comment, with its thread's events. One already gone is not an error.\n\nA comment some reply answers is not deleted (409): the replies are other people's words.\nOffering it only to its author is the front end's concern.","operationId":"delete_strategy_campaign_comment_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"integer","title":"Comment Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/comments/{sf_account_id}":{"get":{"tags":["internal-strategy"],"summary":"List Customer Strategy Comments Internal","description":"List the comment threads on every campaign of the customer, newest first.\n\nEach names its campaign. A cursor is valid only with the `since` of the page it came from.","operationId":"list_customer_strategy_comments_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive: only the threads active at this time or later, opened, answered, resolved or reopened. Every thread when omitted.","title":"Since"},"description":"Inclusive: only the threads active at this time or later, opened, answered, resolved or reopened. Every thread when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignThreadsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/reviews":{"post":{"tags":["internal-strategy"],"summary":"Write Strategy Campaign Review Internal","description":"Store the strategic agent's review of a campaign, as its event `reviewed_event_id` left it.\n\nAny status: a review of a closed campaign is still a record. An event of another campaign\nanswers 400. A review sent again under the same `run_id` is answered with the one stored,\nand one stored under that run on another campaign answers 409.","operationId":"write_strategy_campaign_review_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteStrategyCampaignReviewPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-strategy"],"summary":"List Strategy Campaign Reviews Internal","description":"List the strategic agent's reviews of a campaign, newest first.\n\nInternal, like the `rationale`: a review cites other customers' figures, so a front end\nshowing campaigns to clients never passes one on.","operationId":"list_strategy_campaign_reviews_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignReviewsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/suggestions":{"post":{"tags":["internal-strategy"],"summary":"File Strategy Campaign Suggestion Internal","description":"File a suggestion on a campaign: `pause` a running one, or `resume` a paused one.\n\nNothing accepts it: pausing or resuming the campaign through its own route settles it\n`done`, whoever does it. A campaign not in the status the suggestion is for answers 409, and\nso does one with an open suggestion already, or a customer with three open. A replacement,\non a pause only, is one of the customer's campaigns still in review.","operationId":"file_strategy_campaign_suggestion_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileStrategyCampaignSuggestionPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignSuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/campaigns/{sf_account_id}/{campaign_id}/suggestions/{suggestion_id}/dismiss":{"post":{"tags":["internal-strategy"],"summary":"Dismiss Strategy Campaign Suggestion Internal","description":"Turn an open suggestion down, saying why; the strategic agent reads the reason.\n\nOne already settled answers 409.","operationId":"dismiss_strategy_campaign_suggestion_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"integer","title":"Suggestion Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissStrategyCampaignSuggestionPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignSuggestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/suggestions/{sf_account_id}":{"get":{"tags":["internal-strategy"],"summary":"List Customer Strategy Suggestions Internal","description":"List the suggestions on every campaign of the customer, newest first.\n\nEach names its campaign. `status=dismissed&resolved_since=…` is what was turned down lately,\nwith each reason. A cursor is valid only with the filters of the page it came from.","operationId":"list_customer_strategy_suggestions_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/StrategySuggestionStatus"},"description":"Repeat to keep several; none keeps every status.","title":"Status"},"description":"Repeat to keep several; none keeps every status."},{"name":"resolved_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Inclusive: only the suggestions settled at this time or later, which leaves out every open one. Every suggestion when omitted.","title":"Resolved Since"},"description":"Inclusive: only the suggestions settled at this time or later, which leaves out every open one. Every suggestion when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StrategyCampaignSuggestionsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/strategy/lemlist-campaigns/intents":{"get":{"tags":["internal-strategy"],"summary":"Get Lemlist Campaign Intents Internal","description":"List the intent each Lemlist campaign pushed from a playbook was built for, by page.\n\nAcross every customer, inactive ones included, since the history of a campaign is still\ntrue once its customer has left, by Salesforce account id then Lemlist campaign id. The\nintent is the strategy campaign's when one is built on the playbook, which the row then\nnames with its status, else the playbook's audience's; a campaign with neither is absent.","operationId":"get_lemlist_campaign_intents_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LemlistCampaignIntentsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits":{"get":{"tags":["internal-credits"],"summary":"List Credit Balances Internal","description":"List every customer's balance one page at a time, inactive ones included.\n\nA customer whose credits were never written is listed at zero, unenforced. Each carries the\nreservations it was refused for insufficient credits over the last 30 days in Paris, today\nincluded, and when the last ever was. An inactive customer keeps what it holds, though its\nown credits routes answer 404. `q` searches the customer's name and Salesforce account id.\nThe list is in `sort` order, then by customer, which `sf_account_id` names; `name` sorts\nignoring case and accents. Balances are read live, so one that moves between two pages can\nmove across the cursor: shown twice, or not at all. A cursor is valid only with the filters,\n`sort` and `q` of the page it came from.","operationId":"list_credit_balances_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|sf_account_id|available|reserved|enabled)(,-?(name|sf_account_id|available|reserved|enabled))*$","description":"Comma-separated keys among `name`, `sf_account_id`, `available`, `reserved`, `enabled`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"name","title":"Sort"},"description":"Comma-separated keys among `name`, `sf_account_id`, `available`, `reserved`, `enabled`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the active customers when true, only the inactive ones when false.","title":"Is Active"},"description":"Only the active customers when true, only the inactive ones when false."},{"name":"enabled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only the customers whose credits are enforced when true, only those whose are not when false.","title":"Enabled"},"description":"Only the customers whose credits are enforced when true, only those whose are not when false."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerCreditBalancesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}":{"get":{"tags":["internal-credits"],"summary":"Get Credit Balance Internal","description":"Get the customer's total, reserved and available credits, and whether they are enforced.","operationId":"get_credit_balance_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceResponse"}}}},"404":{"description":"No active customer has this account id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/ledger":{"get":{"tags":["internal-credits"],"summary":"List Credit Ledger Internal","description":"List the customer's ledger by page, newest first by the time of each movement, then id.\n\n`from` and `to` keep the movements of those days, in Europe/Paris, both included. `kind`\nkeeps the movements of those kinds, such as `grant` and `adjust` for what people granted or\ntook back. A cursor is valid only with the `from`, `to` and `kind` of the page it came from.","operationId":"list_credit_ledger_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the range, included; the earliest day when left out.","title":"From"},"description":"The first day of the range, included; the earliest day when left out."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the range, included; the latest day when left out.","title":"To"},"description":"The last day of the range, included; the latest day when left out."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"kind","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/LedgerKind"},"description":"Only the entries of one of these kinds; all when none.","title":"Kind"},"description":"Only the entries of one of these kinds; all when none."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditLedgerPage"}}}},"404":{"description":"No active customer has this account id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/refusals":{"get":{"tags":["internal-credits"],"summary":"List Credit Refusals Internal","description":"List the reservations refused for insufficient credits, newest first, by page.\n\nA refused reservation holds nothing and writes nothing to the ledger, so this is its only\nrecord. A caller retrying a key it was refused counts once. `from` and `to` keep the\nrefusals of those days, in Europe/Paris, both included. A cursor is valid only with the\n`from` and `to` of the page it came from.","operationId":"list_credit_refusals_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The first day of the range, included; the earliest day when left out.","title":"From"},"description":"The first day of the range, included; the earliest day when left out."},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"The last day of the range, included; the latest day when left out.","title":"To"},"description":"The last day of the range, included; the latest day when left out."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditRefusalsPage"}}}},"404":{"description":"No active customer has this account id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/usage/daily":{"get":{"tags":["internal-credits"],"summary":"List Daily Usage Internal","description":"List what each operation consumed on each day from `from` to `to`, both included.\n\nDays are Europe/Paris's. Only the days and operations with consumption appear, ordered by\nday, then operation. Grants and adjustments are not consumption; refunds, which only history\nimported from ai-agents holds, are taken off. A debit recorded while enforcement was off\ncounts, as consumption tracked without moving the balance.","operationId":"list_daily_usage_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date","description":"The first day, in Europe/Paris, included.","title":"From"},"description":"The first day, in Europe/Paris, included."},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date","description":"The last day, in Europe/Paris, included.","title":"To"},"description":"The last day, in Europe/Paris, included."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditDailyUsageResponse"},"title":"Response List Daily Usage Internal"}}}},"404":{"description":"No active customer has this account id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/reservations":{"post":{"tags":["internal-credits"],"summary":"Reserve Credits Internal","description":"Hold up to `amount` credits until the reservation is settled or released.","operationId":"reserve_credits_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReserveCreditsPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReservationResponse"}}}},"404":{"description":"No active customer has this account id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"400":{"description":"A caller acting for people did not name its person in its own header, named it in a malformed one, or sent a body `actor` as well.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"200":{"description":"Replayed: this idempotency key already made it, with the same request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReservationResponse"}}}},"402":{"description":"Enforcement is on and the available credits do not cover it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientCredits"}}}},"409":{"description":"The key was used for another reservation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/reservations/{idempotency_key}/settle":{"post":{"tags":["internal-credits"],"summary":"Settle Reservation Internal","description":"Debit what was delivered and release the rest. Replaying it changes nothing.","operationId":"settle_reservation_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"idempotency_key","in":"path","required":true,"schema":{"type":"string","title":"Idempotency Key"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettleReservationPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReservationResponse"}}}},"404":{"description":"No active customer has this account id, or this caller holds no such reservation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"409":{"description":"Already closed with another outcome.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/reservations/{idempotency_key}/release":{"post":{"tags":["internal-credits"],"summary":"Release Reservation Internal","description":"Release everything held, debiting nothing. Replaying it changes nothing.","operationId":"release_reservation_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"idempotency_key","in":"path","required":true,"schema":{"type":"string","title":"Idempotency Key"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditReservationResponse"}}}},"404":{"description":"No active customer has this account id, or this caller holds no such reservation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"409":{"description":"Already closed with another outcome.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/allocations":{"post":{"tags":["internal-credits"],"summary":"Create Allocation Internal","description":"Grant credits, or take them back with a negative adjustment.","operationId":"create_allocation_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAllocationPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAllocationResponse"}}}},"404":{"description":"No active customer has this account id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"400":{"description":"A caller acting for people did not name its person in its own header, named it in a malformed one, or sent a body `actor` as well.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"200":{"description":"Replayed: this idempotency key already made it, with the same request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAllocationResponse"}}}},"409":{"description":"The key was used for another allocation, or a negative adjustment exceeds the available credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/enabled":{"put":{"tags":["internal-credits"],"summary":"Set Credits Enabled Internal","description":"Turn enforcement on or off. Only reservations made afterwards see the change.","operationId":"set_credits_enabled_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCreditsEnabledPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceResponse"}}}},"404":{"description":"No active customer has this account id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"400":{"description":"A caller acting for people did not name its person in its own header, named it in a malformed one, or sent a body `actor` as well.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/credits/{sf_account_id}/enforcement":{"get":{"tags":["internal-credits"],"summary":"List Enforcement Events Internal","description":"List who turned enforcement on or off and when, newest first, by page.","operationId":"list_enforcement_events_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditEnforcementEventsPage"}}}},"404":{"description":"No active customer has this account id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsRefusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/edges/workspace":{"get":{"tags":["internal-edges"],"summary":"Get Edges Workspace","description":"Get the workspace: credits left and the maximum, the period they renew at, and seats.","operationId":"get_edges_workspace","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesWorkspace"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/edges/workspace/consumption":{"get":{"tags":["internal-edges"],"summary":"Get Edges Workspace Consumption","description":"Get the credits used over the current period, and what each action spent of them.","operationId":"get_edges_workspace_consumption","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesWorkspaceConsumption"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/edges/identities":{"get":{"tags":["internal-edges"],"summary":"List Edges Identities","description":"List every identity, with its LinkedIn account and that account's limits, in Edges' order.\n\nThe account says whether it is connected (`status`) and its licence (`level`). The limits\ncover the Sales Navigator people search and the people extraction, and reflect the\naccount's ramp-up. Edges evaluates them live, so they are read at most once every 15\nminutes, whichever pod answers, and `fetched_at` says when.","operationId":"list_edges_identities","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/EdgesIdentityWithLimits"},"type":"array","title":"Response List Edges Identities"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/edges/runs":{"get":{"tags":["internal-edges"],"summary":"List Edges Runs","description":"List the workspace's runs, whoever launched them, newest first, one page at a time.\n\nEdges pages them by position and does not count them. A run that changes status between two\npages of a status-filtered list moves every later one: one can then be shown twice, or not\nat all. A cursor is valid only with the `status` of the page it came from.","operationId":"list_edges_runs","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Always false: this list cannot be counted.","const":false,"default":false,"title":"With Total Count"},"description":"Always false: this list cannot be counted."},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EdgesRunStatus"},"description":"Only the runs in one of these statuses; all when none.","title":"Status"},"description":"Only the runs in one of these statuses; all when none."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRunsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/edges/schedules":{"get":{"tags":["internal-edges"],"summary":"List Edges Schedules","description":"List the workspace's schedules, newest first, one page at a time.\n\nPaged and uncounted as the runs are, with the same caveat for a status that changes.","operationId":"list_edges_schedules","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Always false: this list cannot be counted.","const":false,"default":false,"title":"With Total Count"},"description":"Always false: this list cannot be counted."},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EdgesScheduleStatus"},"description":"Only the schedules in one of these statuses; all when none.","title":"Status"},"description":"Only the schedules in one of these statuses; all when none."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesSchedulesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/edges/refreshes/estimate":{"post":{"tags":["internal-edges"],"summary":"Estimate Edges Refresh","description":"Count what a refresh of a Sales Navigator search would find and spend, launching nothing.\n\nEdges counts the search's results, which spends a tenth of a credit. The days are read off\nthe accounts' limits, as the identities route serves them: what they have left today, then\ntheir full limit each day after.","operationId":"estimate_edges_refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateEdgesRefreshPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshEstimateResponse"}}}},"409":{"description":"No connected Sales Navigator account (`no_sales_navigator_account`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshConflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/edges/refreshes/split":{"post":{"tags":["internal-edges"],"summary":"Split Edges Search","description":"Cut a search over Edges' 2,500 results into sub-searches under it, launching nothing.\n\nThe search is cut by company headcount band: those it includes, or every band. A band still\nover the cap is cut by industry, on the industries the search includes, when it includes two\nor more. Each search counted spends a tenth of a credit, at most 20 a call; a sub-search the\nestimates left cannot cut further is served still over the cap. A URL whose filters cannot\nbe read, such as a saved search's, is refused at `search_url`.","operationId":"split_edges_search","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SplitEdgesSearchPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesSplitSearchResponse"}}}},"409":{"description":"No connected Sales Navigator account (`no_sales_navigator_account`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshConflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/edges/refreshes":{"post":{"tags":["internal-edges"],"summary":"Launch Edges Refresh","description":"Launch a refresh: search, leave out the profiles enriched recently, enrich the rest.\n\nOnly the search is launched here, on every connected Sales Navigator account. Edges calls back\nonce it has finished, and the enrichment follows from there; read the refresh to follow it.\nA search Edges refuses still leaves its refresh, skipped, with the reason.","operationId":"launch_edges_refresh","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchEdgesRefreshPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshResponse"}}}},"200":{"description":"The refresh this idempotency key launched before; nothing launched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshResponse"}}}},"409":{"description":"No connected Sales Navigator account (`no_sales_navigator_account`), or the key was used for another refresh (`idempotency_key_reused`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshConflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-edges"],"summary":"List Edges Refreshes","description":"List the refreshes launched, by hand or by a schedule, newest first, one page at a time.","operationId":"list_edges_refreshes","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"schedule_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only the refreshes this schedule launched; all when omitted.","title":"Schedule Id"},"description":"Only the refreshes this schedule launched; all when omitted."},{"name":"group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"Only the refreshes of this group; all when omitted.","title":"Group Id"},"description":"Only the refreshes of this group; all when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/edges/warehouse-refreshes/count":{"post":{"tags":["internal-edges"],"summary":"Count Edges Warehouse Refresh","description":"Count the profiles a warehouse query selects, launching nothing.\n\nThe query runs on the warehouse, not on Edges, so it spends no credit: `edges:read` is\nenough. A refresh of them spends a credit per profile extracted, at most `max_limit`.","operationId":"count_edges_warehouse_refresh","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/FrequentlyContactedWarehouseQuery"},{"$ref":"#/components/schemas/RecentlyContactedWarehouseQuery"}],"title":"Payload","discriminator":{"propertyName":"preset","mapping":{"frequently_contacted":"#/components/schemas/FrequentlyContactedWarehouseQuery","recently_contacted":"#/components/schemas/RecentlyContactedWarehouseQuery"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WarehouseRefreshCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/edges/warehouse-refreshes":{"post":{"tags":["internal-edges"],"summary":"Launch Edges Warehouse Refresh","description":"Launch a refresh of the first `limit` profiles a warehouse query selects, with no search.\n\nThe profiles scala-app launched an enrichment of within `skip_enriched_within_days` are left\nout, and the rest are selected now and enriched by the worker, as a search's are once it has\ncalled back: the refresh starts `preparing`. It is listed with the others, by\n`GET /refreshes`. Never scheduled: each launch is a person's decision to spend the credits.","operationId":"launch_edges_warehouse_refresh","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/LaunchFrequentlyContactedRefreshPayload"},{"$ref":"#/components/schemas/LaunchRecentlyContactedRefreshPayload"}],"title":"Payload","discriminator":{"propertyName":"preset","mapping":{"frequently_contacted":"#/components/schemas/LaunchFrequentlyContactedRefreshPayload","recently_contacted":"#/components/schemas/LaunchRecentlyContactedRefreshPayload"}}}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshResponse"}}}},"200":{"description":"The refresh this idempotency key launched before; nothing launched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshResponse"}}}},"409":{"description":"No connected Sales Navigator account (`no_sales_navigator_account`), or the key was used for another refresh (`idempotency_key_reused`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshConflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/edges/refreshes/{refresh_id}":{"get":{"tags":["internal-edges"],"summary":"Get Edges Refresh","description":"Get one refresh: where it stands, its two runs, and how many profiles each step took.","operationId":"get_edges_refresh","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"refresh_id","in":"path","required":true,"schema":{"type":"integer","title":"Refresh Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshResponse"}}}},"404":{"description":"No such refresh."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/edges/refreshes/{refresh_id}/similar":{"get":{"tags":["internal-edges"],"summary":"List Similar Edges Searches","description":"List the refreshes and schedules whose search is like this one's, to spot overlaps.\n\nTwo searches are alike when at most one filter type has other values in one than in the\nother, a type only one of them has included. A value is compared by its Sales Navigator id,\nor by its text, ignoring case, when it has none. A refresh whose filters could not be read\nhas none alike.","operationId":"list_similar_edges_searches","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"refresh_id","in":"path","required":true,"schema":{"type":"integer","title":"Refresh Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesSimilarSearchesResponse"}}}},"404":{"description":"No such refresh."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/edges/refresh-schedules":{"post":{"tags":["internal-edges"],"summary":"Create Edges Refresh Schedule","description":"Schedule a refresh to launch every week or every month, and launch it now if asked.\n\nEach fire launches the refresh the launch route would, named after the schedule and\nlisted under it, as the scheduler (`system`). With `run_now`, the first refresh is launched\nnow as the caller, listed under the schedule too; a launch that fails leaves the schedule\ncreated, linked to the refresh that says why, as a fire's does. Sent again under the same\n`idempotency_key`, it answers the schedule it made, 200. Who created it is logged, as every\nchange of its status is.","operationId":"create_edges_refresh_schedule","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEdgesRefreshSchedulePayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshScheduleResponse"}}}},"200":{"description":"The idempotency key's schedule, made by an earlier call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshScheduleResponse"}}}},"404":{"description":"No customer has `sf_account_id`."},"409":{"description":"The key was used for a schedule with other parameters (`idempotency_key_reused`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshConflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-edges"],"summary":"List Edges Refresh Schedules","description":"List the refresh schedules, newest first, one page at a time.","operationId":"list_edges_refresh_schedules","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"status","in":"query","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/EdgesRefreshScheduleStatus"},"description":"Only the schedules in one of these statuses; all when none.","title":"Status"},"description":"Only the schedules in one of these statuses; all when none."},{"name":"sf_account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only the schedules run for this client; all when omitted.","title":"Sf Account Id"},"description":"Only the schedules run for this client; all when omitted."},{"name":"group_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}],"description":"Only the schedules of this group; all when omitted.","title":"Group Id"},"description":"Only the schedules of this group; all when omitted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshSchedulesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/edges/refresh-schedules/disable-for-customer":{"post":{"tags":["internal-edges"],"summary":"Disable Customer Edges Refresh Schedules","description":"Disable every schedule run for a client, active or paused, in one transaction.\n\nFor a client who churns. Disabling is final: none of them can be resumed after.","operationId":"disable_customer_edges_refresh_schedules","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableCustomerEdgesRefreshSchedulesPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisabledEdgesRefreshSchedulesResponse"}}}},"404":{"description":"No customer has `sf_account_id`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/edges/refresh-schedules/{schedule_id}":{"get":{"tags":["internal-edges"],"summary":"Get Edges Refresh Schedule","description":"Get one refresh schedule: what it launches, when next, and what it last launched.","operationId":"get_edges_refresh_schedule","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshScheduleResponse"}}}},"404":{"description":"No such refresh schedule."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-edges"],"summary":"Update Edges Refresh Schedule","description":"Pause, resume or disable a refresh schedule.\n\nResuming runs it next at its first fire after now, skipping those missed while it\nwas paused. Asking for the status it already has answers it unchanged and logs nothing.","operationId":"update_edges_refresh_schedule","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEdgesRefreshSchedulePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshScheduleResponse"}}}},"404":{"description":"No such refresh schedule."},"409":{"description":"The schedule is disabled, which is final (`schedule_disabled`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshConflict"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/edges/refresh-schedules/{schedule_id}/events":{"get":{"tags":["internal-edges"],"summary":"List Edges Refresh Schedule Events","description":"List who created, paused, resumed or disabled a refresh schedule, and when, newest first.","operationId":"list_edges_refresh_schedule_events","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"integer","title":"Schedule Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EdgesRefreshScheduleEventsPage"}}}},"404":{"description":"No such refresh schedule."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}":{"get":{"tags":["internal-playbooks"],"summary":"Get Playbooks Internal","description":"List a customer's playbooks one page at a time, as `GET /api/v1/playbooks` does.","operationId":"get_playbooks_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^-?(name|created_at)(,-?(name|created_at))*$","description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction.","default":"-created_at","title":"Sort"},"description":"Comma-separated keys among `name`, `created_at`, each prefixed with `-` to sort from the largest value and named at most once: `-created_at,name`. Ties are broken by the next key, then by id; a missing value sorts last in either direction."},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches.","title":"Q"},"description":"Words that must each appear, ignoring case and accents, in one of the fields the route searches."},{"name":"workflow_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkflowType"},{"type":"null"}],"title":"Workflow Type"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only active playbooks when true, only paused ones when false.","title":"Is Active"},"description":"Only active playbooks when true, only paused ones when false."},{"name":"is_deleted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Only archived playbooks when true, only those not archived when false.","title":"Is Deleted"},"description":"Only archived playbooks when true, only those not archived when false."},{"name":"id","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"},"maxItems":100,"description":"Repeat to read only these playbooks.","title":"Id"},"description":"Repeat to read only these playbooks."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybooksPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-playbooks"],"summary":"Create Playbook Internal","description":"Create a people list, audience, and V3 playbook in one call.\n\nWhen campaign sequences are supplied they are persisted on\n``PlaybookCampaignInfo`` and pushed to Lemlist asynchronously by a\nbackground worker after commit.","operationId":"create_playbook_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCreatePlaybookPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCreatePlaybookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/{playbook_id}":{"get":{"tags":["internal-playbooks"],"summary":"Get Playbook Internal","description":"Read one of the customer's playbooks as the list describes it, deleted or not.","operationId":"get_playbook_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookResponse"}}}},"404":{"description":"`Playbook {playbook_id} not found`: no playbook of this customer's list has this id. None exists, it is another customer's, or its audience is not a profile audience. An unknown or inactive customer is `Customer not found`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/{playbook_id}/campaign-info":{"get":{"tags":["internal-playbooks"],"summary":"Get Playbook Campaign Info Internal","description":"Get playbook campaign info via internal API.","operationId":"get_playbook_campaign_info_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookCampaignInfoSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/{playbook_id}/copy":{"get":{"tags":["internal-playbooks"],"summary":"Get Playbook Copy Internal","description":"Read a V3/V4 campaign playbook's copy: both sequences, as `PUT …/copy` takes them.\n\nActive or not, so a proposal's inactive playbook can be reviewed. A deleted playbook is\na 404, as is one with no campaign info. For a playbook published to Lemlist, it is the\ncopy as it was published: Lemlist holds the copy from then on, and an edit made there is\nnot read back.","operationId":"get_playbook_copy_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalPlaybookCopyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["internal-playbooks"],"summary":"Update Playbook Copy Internal","description":"Rewrite the copy of a V3/V4 campaign playbook not yet published to Lemlist.\n\nBoth sequences, and its variables if given: ``scala_vars`` and ``write_mappings`` replace\nwhat is stored when given, and keep it when left out. The copy stays in scala-app, and\nnothing leaves it.\n\nA strategy campaign built on the playbook and at `copy_review` logs the replacement as\n`revised`, or `reworked` when it answers the copy's send-back, as the caller and the\nperson it names: `strategy_campaign_event` is that event, null when none was logged.\n\nA playbook queued for Lemlist once, or with campaigns there, answers 409 whatever the\nchange: Lemlist holds its copy from then on, and it is edited there, so that an edit made\nin Lemlist is never overwritten from here.","operationId":"update_playbook_copy_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalUpdatePlaybookCopyPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalUpdatePlaybookCopyResponse"}}}},"409":{"description":"The playbook is published to Lemlist, whose copy it is from then on: it is edited there. `detail` says so in words that can be relayed as they are."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/{playbook_id}/progress":{"get":{"tags":["internal-playbooks"],"summary":"Get Playbook Progress Internal","description":"Get per-phase playbook processing progress via internal API.\n\nMirrors the public ``GET /{playbook_id}/progress`` for service callers\n(ai-agents). Reports enrichment / copy / matching / push_to_crm /\ntask_creation status. Every workflow runs ``MATCHING -> READY_TO_PUSH ->\nPUSH_TO_CRM`` with nothing between, so no phase waits on a person.","operationId":"get_playbook_progress_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPlaybookProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/scala-vars/resolve":{"post":{"tags":["internal-playbooks"],"summary":"Resolve Scala Vars Internal","description":"Resolve scala-var declarations for a profile set, without a playbook.\n\nRead-only and stateless despite the POST: the profile-key list and the\ndeclarations are both too large for a query string.\n\nai-agents calls this from the HPP chat preview, which runs before the\ncampaign is published and so has no playbook to read declarations from. It\nsends the same declaration list it will later publish, so the preview and\nthe eventual ``REQUEST_HPP_COPY`` batch resolve identical input through\nthis same service. The back office previews a campaign's copy on the\ncontacts its audience's last refresh stored, with the playbook's\ndeclarations and language and the audience's filters.\n\nThe profiles are hydrated as the send path hydrates them, projected to the\ncolumns the declarations read. A declared path with no warehouse column is\na 400: the preview would otherwise show an empty value the send fills.","operationId":"resolve_scala_vars_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveScalaVarsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveScalaVarsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/scala-vars/search":{"post":{"tags":["internal-playbooks"],"summary":"Search Scala Vars Internal","description":"Search profiles and resolve scala-var declarations against the hits, in one call.\n\nThe sibling of ``scala-vars/resolve`` for a caller that has an audience rather than a\nset of profile keys: the copy preview samples a search for the contacts it offers, and\nused to run that search here and then call the resolve endpoint, which searched the\nsame profiles a second time to hydrate the columns the mapper reads.\n\nRead-only and stateless despite the POST, and bounded by ``sample_size`` the way the\nresolve endpoint is bounded by the length of its key list.","operationId":"search_scala_vars_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchScalaVarsPayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchScalaVarsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/hpp":{"post":{"tags":["internal-playbooks"],"summary":"Create Hpp Playbook Internal","description":"Create or reuse an audience and create a V4 HPP playbook.\n\nV4 playbooks differ from V3 only in that ai-agents embeds ``{{tag}}``\nplaceholders into the step bodies/subjects — the rest of the flow is\nshared. Per-record copy generation runs in ai-agents\n(scheduler-driven) and the generated text is written to the CRM custom\nfields named by those tags.\n\nCampaign sequences are persisted on ``PlaybookCampaignInfo`` and pushed\nto Lemlist asynchronously by a background worker after commit.","operationId":"create_hpp_playbook_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCreateHppPlaybookPayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCreateHppPlaybookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/{playbook_id}/crm-lists/retry":{"post":{"tags":["internal-playbooks"],"summary":"Retry Playbook Crm Lists Internal","description":"Create the campaign playbook's missing CRM lists again.\n\nThe same retry as the app's, `POST /api/v1/playbooks/{playbook_id}/crm-lists/retry`. A list\nalready stored is left as it is. A CRM that refuses again is not an HTTP error: the response\nis the campaign info, whose `crm_list_error` then says why, in words that can be relayed as\nthey are.","operationId":"retry_playbook_crm_lists_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookCampaignInfoSchema"}}}},"400":{"description":"The playbook is inactive, deleted, or not a campaign playbook."},"404":{"description":"No playbook of this customer has this id, the customer is unknown, or the playbook has no campaign info. `detail` says which."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/playbooks/{sf_account_id}/{playbook_id}/retry-failed-records":{"post":{"tags":["internal-playbooks"],"summary":"Retry Failed Playbook Records Internal","description":"Send the playbook's failed records back to the step their workflow retries from.\n\nThe same retry as the app's, `POST /api/v1/playbooks/{playbook_id}/retry-failed-records`:\nonly the records that failed are sent back, and `retried_count` is how many, 0 when none\nhad failed.","operationId":"retry_failed_playbook_records_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"playbook_id","in":"path","required":true,"schema":{"type":"integer","title":"Playbook Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryFailedRecordsResult"}}}},"400":{"description":"The playbook is inactive or deleted."},"404":{"description":"No playbook of this customer has this id, or the customer is unknown."},"409":{"description":"The playbook's workflow retries no failed records."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/campaigns/default-sequences":{"get":{"tags":["internal-campaigns"],"summary":"Get Default Campaign Sequences Internal","description":"Read the pair of sequences a new campaign starts from, without copy.\n\nEvery step that carries a message is named and says what it is for, and the caller\nwrites the words. A clone publishes the message of the step it names, at its own gap.\n\nAlways the pair: a caller creating a campaign holds both, and a contact runs one or\nthe other depending on whether it has an email address. This is a campaign's starting\npoint, read when it is created; what it publishes afterwards is the layout it holds.","operationId":"get_default_campaign_sequences_internal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSequences"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/crm/{sf_account_id}/segments":{"get":{"tags":["internal-crm"],"summary":"Get Crm Segments Internal","description":"List CRM segments for a customer via internal API.","operationId":"get_crm_segments_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CRMSegmentSchema"},"title":"Response Get Crm Segments Internal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-crm"],"summary":"Create Crm Segment Internal","description":"Save a CRM segment from a filter tree.\n\nRefuses an empty filter, a field the customer's catalog does not have, and a contact\nsegment that names an account or opportunity field. Unless ``excluded_by_default`` is\nsent, the segment excludes nothing until an audience lists its id; sent true, every search\nof the customer's excludes it from then on.","operationId":"create_crm_segment_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCRMSegmentCreatePayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCRMSegmentResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/integration":{"get":{"tags":["internal-crm"],"summary":"Get Crm Integration Internal","description":"Get the customer's CRM provider, connection status and UI instance URL.","operationId":"get_crm_integration_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCrmIntegrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/users":{"get":{"tags":["internal-crm"],"summary":"Get Crm Users Internal","description":"List the active users of the customer's CRM, which the CRM is asked for on each call.\n\nA customer with no CRM connection is a 409, and so is the CRM refusing the call, its 404\nincluded: here a 404 means the ``sf_account_id`` resolved to no customer, and the CRM's\nown 401 or 403 passed on would read as the caller's. A rate limit stays a 429.","operationId":"get_crm_users_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrmUser"},"title":"Response Get Crm Users Internal"}}}},"409":{"description":"The customer has no CRM connection, or the CRM refused the call.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/fields/{record_type}":{"get":{"tags":["internal-crm"],"summary":"Get Crm Fields Internal","description":"List the CRM field catalog for one record type.","operationId":"get_crm_fields_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"record_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CRMRecordType"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrmFieldResponse"},"title":"Response Get Crm Fields Internal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/fields/read-mappings/{record_type}":{"get":{"tags":["internal-crm"],"summary":"Get Crm Read Mappings Internal","description":"List which CRM fields feed each Scala field on import, for one record type.","operationId":"get_crm_read_mappings_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"record_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/CRMRecordType"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ContactFieldReadMappings"},{"$ref":"#/components/schemas/AccountFieldReadMappings"},{"$ref":"#/components/schemas/OpportunityFieldReadMappings"}],"title":"Response Get Crm Read Mappings Internal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/fields/default":{"post":{"tags":["internal-crm"],"summary":"Provision Default Crm Fields Internal","description":"Provision the platform's default CRM fields, and re-read the catalog they land in.","operationId":"provision_default_crm_fields_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCreationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/fields/provision":{"post":{"tags":["internal-crm"],"summary":"Provision Platform Crm Fields Internal","description":"Provision the platform's own CRM columns, and re-read the catalog they land in.","operationId":"provision_platform_crm_fields_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformFieldsWanted"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldCreationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/fields/refresh":{"post":{"tags":["internal-crm"],"summary":"Refresh Crm Fields Internal","description":"Re-read the customer's CRM field catalog, creating nothing.","operationId":"refresh_crm_fields_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/contacts/{crm_contact_id}/scala-status":{"patch":{"tags":["internal-crm"],"summary":"Update Scala Status Internal","description":"Write a Scala status back onto one CRM contact.\n\nAnswers 404 when the CRM has no such contact, and 502 when the CRM otherwise\nrejects the write, rather than 204 regardless.","operationId":"update_scala_status_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"crm_contact_id","in":"path","required":true,"schema":{"type":"string","title":"Crm Contact Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"status","in":"query","required":true,"schema":{"$ref":"#/components/schemas/ScalaStatus"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/segments/{segment_id}":{"patch":{"tags":["internal-crm"],"summary":"Update Crm Segment Internal","description":"Rename a CRM segment and replace its filter, checked as a new segment's is.\n\nEvery audience that names the segment searches with the new filter from then on.\n``excluded_by_default``, when sent, also excludes the segment from every search of the\ncustomer's, named or not, or stops excluding it; absent, it is left as it is.","operationId":"update_crm_segment_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"segment_id","in":"path","required":true,"schema":{"type":"integer","title":"Segment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalCRMSegmentUpdatePayload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMSegmentSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-crm"],"summary":"Delete Crm Segment Internal","description":"Delete a CRM segment.\n\nA default segment, one every search excludes, and one an audience still names are\nrefused with 409, saying which.","operationId":"delete_crm_segment_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"segment_id","in":"path","required":true,"schema":{"type":"integer","title":"Segment Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/segments/{segment_id}/count":{"get":{"tags":["internal-crm"],"summary":"Get Crm Segment Count Internal","description":"Count the CRM records the segment matches, and how many of them match Scala's.","operationId":"get_crm_segment_count_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"segment_id","in":"path","required":true,"schema":{"type":"integer","title":"Segment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMSegmentCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/lists":{"post":{"tags":["internal-crm"],"summary":"Create Crm Filtered List Internal","description":"Create the filter as a list, list view or filter in the customer's CRM.\n\nNothing is created when the connected CRM cannot express the filter: a 422 then names\neach condition and why, at its place in the body. A customer with no CRM connection, a\nCRM that offers no lists at all and one that refuses the call are a 409.","operationId":"create_crm_filtered_list_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMFilteredListCreatePayload"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMFilteredListSchema"}}}},"409":{"description":"The customer has no CRM connection, or the CRM offers no lists or refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-crm"],"summary":"List Crm Filtered Lists Internal","description":"Return one page of the CRM's own lists of companies or people, in its order.\n\nEvery list, whoever made it: the platform's are the ones named with ``[SCALA]``. The CRM\npages them itself, so the list cannot be counted.","operationId":"list_crm_filtered_lists_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Always false: this list cannot be counted.","const":false,"default":false,"title":"With Total Count"},"description":"Always false: this list cannot be counted."},{"name":"type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/CRMSegmentType","description":"account lists companies; contact lists people."},"description":"account lists companies; contact lists people."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMFilteredListsPage"}}}},"409":{"description":"The customer has no CRM connection, or the CRM offers no lists or refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/crm/{sf_account_id}/lists/{list_id}":{"get":{"tags":["internal-crm"],"summary":"Get Crm Filtered List Internal","description":"Read one list of the CRM's, with its filter as the CRM stores it.\n\nA list of the other type, or none, is a 404.","operationId":"get_crm_filtered_list_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/CRMSegmentType"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CRMFilteredListDetailSchema"}}}},"404":{"description":"The CRM has no such list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"409":{"description":"The customer has no CRM connection, or the CRM offers no lists or refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-crm"],"summary":"Delete Crm Filtered List Internal","description":"Delete a list from the customer's CRM, if the platform created it and nothing uses it.\n\nA list not named with ``[SCALA]`` is the customer's own, and a playbook's list is where it\npushes its contacts: both are refused with 409, without calling the CRM's delete.","operationId":"delete_crm_filtered_list_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","title":"List Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"type","in":"query","required":true,"schema":{"$ref":"#/components/schemas/CRMSegmentType"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"The CRM has no such list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"409":{"description":"The customer has no CRM connection, or the CRM offers no lists or refused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/audience_builder/fields":{"get":{"tags":["internal-audience-builder"],"summary":"Get Fields Internal","description":"Get all possible values of enum-like fields via internal API.\n\nThe field value catalog is global (aggregated across all tenants and\nserver-cached), so this endpoint takes no ``sf_account_id``.","operationId":"get_fields_internal","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FieldsEntity"}}}}},"security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}]}},"/internal/api/v1/email/messages":{"get":{"tags":["internal-email"],"summary":"List All Messages","description":"Every customer's message summaries, each with its customer, newest first.\n\nThe filters of one customer's list, without ``mailbox_id``. A cursor from\n``next_cursor`` continues the same filters.","operationId":"list_all_messages","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"enum":["inbound","outbound"],"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"received_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received After"}},{"name":"received_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received Before"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GmailMessageLabel"}},{"type":"null"}],"description":"Repeat to keep messages classified as any of these labels.","title":"Label"},"description":"Repeat to keep messages classified as any of these labels."},{"name":"unlabelled","in":"query","required":false,"schema":{"type":"boolean","description":"Keep messages Clay has not labelled. With `label`, a message matches either.","default":false,"title":"Unlabelled"},"description":"Keep messages Clay has not labelled. With `label`, a message matches either."},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Order"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerMessagePage"}}}},"503":{"description":"The mail store could not be read. Retry after the Retry-After delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/email/{sf_account_id}/mailboxes":{"get":{"tags":["internal-email"],"summary":"List Mailboxes","description":"List the customer's mailboxes.","operationId":"list_mailboxes","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailboxPage"}}}},"404":{"description":"Not in this customer's mail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"503":{"description":"The mail store could not be read. Retry after the Retry-After delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/email/{sf_account_id}/messages":{"get":{"tags":["internal-email"],"summary":"List Messages","description":"Message summaries, newest first unless ``order=asc``.\n\n``from`` is an address, or ``@domain`` for every sender at that domain. ``address``\nmatches any participant. ``received_after`` and ``received_before`` are inclusive.\nRepeat ``label`` to keep messages classified as any of those labels, and add\n``unlabelled=true`` to keep the messages Clay has not labelled as well.\nA cursor from ``next_cursor`` continues the same filters.","operationId":"list_messages","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"mailbox_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Mailbox Id"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"enum":["inbound","outbound"],"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"received_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received After"}},{"name":"received_before","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received Before"}},{"name":"label","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/GmailMessageLabel"}},{"type":"null"}],"description":"Repeat to keep messages classified as any of these labels.","title":"Label"},"description":"Repeat to keep messages classified as any of these labels."},{"name":"unlabelled","in":"query","required":false,"schema":{"type":"boolean","description":"Keep messages Clay has not labelled. With `label`, a message matches either.","default":false,"title":"Unlabelled"},"description":"Keep messages Clay has not labelled. With `label`, a message matches either."},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Order"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagePage"}}}},"404":{"description":"Not in this customer's mail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"503":{"description":"The mail store could not be read. Retry after the Retry-After delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/email/{sf_account_id}/messages/{message_id}":{"get":{"tags":["internal-email"],"summary":"Get Message","description":"One message, including its text and HTML.","operationId":"get_message","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDetail"}}}},"404":{"description":"Not in this customer's mail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"503":{"description":"The mail store could not be read. Retry after the Retry-After delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/email/{sf_account_id}/threads/{thread_id}":{"get":{"tags":["internal-email"],"summary":"Get Thread","description":"Every message in a thread, oldest first.\n\n``include=body`` adds each message's text and HTML. A thread\nof more than 100 messages refuses that and is read without it, one message at a time.","operationId":"get_thread","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"sf_account_id","in":"path","required":true,"schema":{"type":"string","title":"Sf Account Id"}},{"name":"include","in":"query","required":false,"schema":{"anyOf":[{"const":"body","type":"string"},{"type":"null"}],"title":"Include"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ThreadResponse"},{"$ref":"#/components/schemas/ThreadWithBodies"}],"title":"Response Get Thread"}}}},"404":{"description":"Not in this customer's mail.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"503":{"description":"The mail store could not be read. Retry after the Retry-After delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"409":{"description":"The thread is too long to read with its bodies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refusal"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/signals":{"get":{"tags":["internal-signals"],"summary":"List Signals Internal","description":"List warehouse signals for a company, a profile, or the union of both.\n\nA company key returns every signal for that company, including its people. A profile key\nreturns every signal for that profile, at every company. Both return the union, each row\nonce, so a person's events at other companies are included. Most recent first. No customer:\na signal names a company or a profile, not an account.","operationId":"list_signals_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"profile_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Give a profile_key, a company_key, or both. A company key matches every signal for that company. A profile key matches every signal for that profile. Both match the union, each row once.","title":"Profile Key"},"description":"Give a profile_key, a company_key, or both. A company key matches every signal for that company. A profile key matches every signal for that profile. Both match the union, each row once."},{"name":"company_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Give a profile_key, a company_key, or both. A company key matches every signal for that company. A profile key matches every signal for that profile. Both match the union, each row once.","title":"Company Key"},"description":"Give a profile_key, a company_key, or both. A company key matches every signal for that company. A profile key matches every signal for that profile. Both match the union, each row once."},{"name":"signal_types","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/SignalType"},"minItems":1},{"type":"null"}],"description":"Only these signal types. Omitted, every type.","title":"Signal Types"},"description":"Only these signal types. Omitted, every type."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/api/v1/signals/companies":{"get":{"tags":["internal-signals"],"summary":"List Signal Companies Internal","description":"List companies that have at least one warehouse signal of the given types.\n\nA company matches when it has a signal of any named type. With ``occurred_after``, only\nsignals at or after that time count. Most recent matching signal first. No customer: a\nsignal names a company, not an account.","operationId":"list_signal_companies_internal","security":[{"MachineAuth":[]},{"ApiKeyAuth":[]}],"parameters":[{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page.","title":"Cursor"},"description":"The previous page's `next_cursor`, sent with the same filters. Omitted, or empty, for the first page."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"At most this many items in the page.","default":50,"title":"Limit"},"description":"At most this many items in the page."},{"name":"with_total_count","in":"query","required":false,"schema":{"type":"boolean","description":"Count every item the query matches into `total_count`.","default":false,"title":"With Total Count"},"description":"Count every item the query matches into `total_count`."},{"name":"signal_types","in":"query","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/SignalType"},"minItems":1,"description":"Companies with a signal of any of these types.","title":"Signal Types"},"description":"Companies with a signal of any of these types."},{"name":"occurred_after","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only signals at or after this time. Omitted, every matching signal counts.","title":"Occurred After"},"description":"Only signals at or after this time. Omitted, every matching signal counts."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignalCompaniesPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountFieldReadMappings":{"properties":{"account_name":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Account Name","default":[]},"account_website":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Account Website","default":[]},"account_linkedin_url":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Account Linkedin Url","default":[]}},"type":"object","title":"AccountFieldReadMappings"},"ActionStep":{"properties":{"type":{"type":"string","enum":["linkedinVisit","linkedinLikeLastPost","linkedinWithdrawInvitation"],"title":"Type"},"wait_days":{"type":"integer","minimum":0.0,"title":"Wait Days"}},"type":"object","required":["type","wait_days"],"title":"ActionStep","description":"A step that acts on the prospect without saying anything, so carries no copy."},"ActorNamespace":{"type":"string","enum":["kinde_user","hub_user","kinde_org_api_key","machine","system"],"title":"ActorNamespace","description":"Which id space an actor's id belongs to, as distinct from the machine that called.\n\nA namespace, not a role: whether a `kinde_user` is Scalability staff or a customer's user\nis their Kinde organization, which no column here repeats. ``(namespace, id)`` names one\nperson or key the way ``(iss, sub)`` does in OIDC."},"ActorResponse":{"properties":{"namespace":{"$ref":"#/components/schemas/ActorNamespace"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"}},"type":"object","required":["namespace","id","label"],"title":"ActorResponse","description":"Who an action was done by or for; the machine that sent it is answered apart."},"AddCRMReadMappingPayload":{"properties":{"crm_field_name":{"type":"string","title":"Crm Field Name"},"scalability_field":{"anyOf":[{"type":"string","enum":["account_name","account_website","account_linkedin_url"]},{"type":"string","enum":["contact_first_name","contact_last_name","contact_email","contact_linkedin_url","phone"]},{"type":"string","enum":["opportunity_amount","opportunity_is_won","opportunity_is_lost","opportunity_is_closed","opportunity_close_date","opportunity_creation_date","opportunity_name","opportunity_stage","opportunity_pipeline"]}],"title":"Scalability Field"},"object_type":{"type":"string","enum":["contact","account","opportunity","lead","call","email","meeting","note","postal_mail","task"],"title":"Object Type"}},"type":"object","required":["crm_field_name","scalability_field","object_type"],"title":"AddCRMReadMappingPayload"},"AddCRMWriteMappingPayload":{"properties":{"crm_field_id":{"type":"integer","title":"Crm Field Id"},"scalability_field":{"anyOf":[{"$ref":"#/components/schemas/EnrichmentField"},{"$ref":"#/components/schemas/NamedropField"},{"$ref":"#/components/schemas/AudienceBuilderField"},{"$ref":"#/components/schemas/PlaybookField"},{"$ref":"#/components/schemas/StaticField"},{"$ref":"#/components/schemas/MetricsField"},{"$ref":"#/components/schemas/ListColumnField"},{"$ref":"#/components/schemas/CustomColumnField"}],"title":"Scalability Field"},"format":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarsFormatType"},{"type":"null"}]},"overwrite_on_update":{"type":"boolean","title":"Overwrite On Update","default":true},"playbook_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playbook Id"}},"type":"object","required":["crm_field_id","scalability_field"],"title":"AddCRMWriteMappingPayload"},"AdoptStrategyCampaignPayload":{"properties":{"playbook_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Playbook Id","description":"A campaign playbook of the customer, built outside the workflow. Its audience and copy replace the campaign's, whatever they are."},"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"Why it is adopted, logged with the event."}},"additionalProperties":false,"type":"object","required":["playbook_id"],"title":"AdoptStrategyCampaignPayload"},"AgentOrigin":{"type":"string","enum":["mcp","chat","internal"],"title":"AgentOrigin","description":"How ai-agents was reached for a write, in its own words (its `ExecutionOrigin`).\n\nBeside the actor, not part of it: a person driving the agent is the same person through its\nMCP and through a chat, and the agent working alone is the machine either way."},"AllocationType":{"type":"string","enum":["subscription","top_up","adjustment"],"title":"AllocationType","description":"What granted an allocation, which is also the order it is consumed in (§6.4)."},"ArrayOperation":{"type":"string","enum":["add","remove"],"title":"ArrayOperation"},"AudienceBuilderField":{"properties":{"property":{"type":"string","title":"Property"},"namespace":{"type":"string","const":"audience_builder","title":"Namespace","default":"audience_builder"}},"type":"object","required":["property"],"title":"AudienceBuilderField"},"AudienceBuilderFieldScalaVarData":{"properties":{"audience_builder_field_key":{"type":"string","title":"Audience Builder Field Key"}},"type":"object","required":["audience_builder_field_key"],"title":"AudienceBuilderFieldScalaVarData"},"AudienceBuilderWriteFieldPayload":{"properties":{"namespace":{"type":"string","const":"audience_builder","title":"Namespace","default":"audience_builder"},"property":{"type":"string","title":"Property"}},"type":"object","required":["property"],"title":"AudienceBuilderWriteFieldPayload"},"AudienceCreationPayload":{"properties":{"name":{"type":"string","title":"Name"},"audience_type":{"$ref":"#/components/schemas/AudienceType"},"table_mode":{"$ref":"#/components/schemas/TableMode"},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"intent":{"anyOf":[{"type":"string","description":"A strategy intent key, as listed by the strategy intents route."},{"type":"null"}],"title":"Intent"}},"additionalProperties":false,"type":"object","required":["name","audience_type","table_mode","search_filters"],"title":"AudienceCreationPayload"},"AudienceEnrichmentPlaybookPayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active"},"is_requesting_phone_numbers":{"type":"boolean","title":"Is Requesting Phone Numbers","default":false},"workflow_type":{"type":"string","const":"audience_enrichment","title":"Workflow Type","default":"audience_enrichment"}},"additionalProperties":false,"type":"object","required":["is_active"],"title":"AudienceEnrichmentPlaybookPayload","description":"Enrich the audience, then mark each record DONE. No CRM matching or push."},"AudienceErrorType":{"type":"string","enum":["too_large","growing_too_fast","initially_too_large"],"title":"AudienceErrorType"},"AudiencePatchPayload":{"properties":{"name":{"type":"string","title":"Name"},"audience_type":{"$ref":"#/components/schemas/AudienceType"},"table_mode":{"$ref":"#/components/schemas/TableMode"},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"intent":{"anyOf":[{"type":"string","description":"A strategy intent key, as listed by the strategy intents route."},{"type":"null"}],"title":"Intent"},"expected_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Revision"}},"additionalProperties":false,"type":"object","required":["name","audience_type","table_mode","search_filters","expected_revision"],"title":"AudiencePatchPayload"},"AudienceRecordCompanyDisplay":{"properties":{"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"linkedin_industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Industry"},"employees_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employees Range"},"employees_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employees Count"},"company_location_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Location City"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"company_linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Linkedin Url"}},"type":"object","title":"AudienceRecordCompanyDisplay"},"AudienceRecordProfileDisplay":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"position_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Title"},"position_seniority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Seniority"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"tenure_length_total_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tenure Length Total Month"}},"type":"object","title":"AudienceRecordProfileDisplay"},"AudienceRecordsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StoredRecord"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"AudienceRecordsPage"},"AudienceRevisionConflict":{"properties":{"detail":{"type":"string","title":"Detail"},"current_revision":{"type":"integer","title":"Current Revision"}},"type":"object","required":["detail","current_revision"],"title":"AudienceRevisionConflict","description":"A PATCH's 409: the audience has been saved since the revision the write was read at."},"AudienceSnapshot":{"properties":{"state":{"$ref":"#/components/schemas/AudienceSnapshotState"},"revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision","description":"The audience revision the counts and records were stored from; null before the first refresh that stores it, and always on an audience built from uploaded records, which is never refreshed."},"refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refreshed At"},"counts":{"anyOf":[{"$ref":"#/components/schemas/SearchResultsCount"},{"type":"null"}]},"guardrail":{"anyOf":[{"$ref":"#/components/schemas/AudienceErrorType"},{"type":"null"}],"description":"The size guardrail the last refresh tripped, when it tripped one."},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Failed At","description":"When the refresh of the current revision failed, in state `failed`."},"record_count":{"type":"integer","title":"Record Count","description":"The audience's active records."}},"type":"object","required":["state","revision","refreshed_at","counts","guardrail","failed_at","record_count"],"title":"AudienceSnapshot"},"AudienceSnapshotState":{"type":"string","enum":["ready","pending","failed","too_large"],"title":"AudienceSnapshotState","description":"How what an audience's last refresh stored relates to the audience as it is now.\n\n`ready`: stored from the audience's current revision. `pending`: from an older one, while\nthe refresh of the current one runs. `failed`: that refresh raised; the hourly tick retries\nit. `too_large`: from the current revision, but over the size guardrail, so the records are\nthose of the last refresh under it, if any."},"AudienceSourceExisting":{"properties":{"source_type":{"type":"string","const":"audience_id","title":"Source Type","default":"audience_id"},"audience_id":{"type":"integer","title":"Audience Id"}},"type":"object","required":["audience_id"],"title":"AudienceSourceExisting","description":"Reuse an existing audience by ID."},"AudienceSourceFilters":{"properties":{"audience_name":{"type":"string","title":"Audience Name"},"audience_type":{"$ref":"#/components/schemas/AudienceType","default":"profile"},"table_mode":{"$ref":"#/components/schemas/TableMode","default":"new"},"intent":{"anyOf":[{"type":"string","description":"A strategy intent key, as listed by the strategy intents route."},{"type":"null"}],"title":"Intent"},"source_type":{"type":"string","const":"filters","title":"Source Type","default":"filters"},"search_filters":{"$ref":"#/components/schemas/SearchFilter"}},"type":"object","required":["audience_name","search_filters"],"title":"AudienceSourceFilters","description":"Audience sourcing via search filters."},"AudienceSourceKind":{"type":"string","enum":["search","records"],"title":"AudienceSourceKind","description":"Where an audience's members come from.\n\n``search`` audiences are materialized from the warehouse. ``records`` audiences are\nthe members passed in at creation and are never refreshed."},"AudienceSourcePeopleList":{"properties":{"audience_name":{"type":"string","title":"Audience Name"},"audience_type":{"$ref":"#/components/schemas/AudienceType","default":"profile"},"table_mode":{"$ref":"#/components/schemas/TableMode","default":"new"},"intent":{"anyOf":[{"type":"string","description":"A strategy intent key, as listed by the strategy intents route."},{"type":"null"}],"title":"Intent"},"source_type":{"type":"string","const":"people_list","title":"Source Type","default":"people_list"},"people_list_name":{"type":"string","title":"People List Name"},"people_list_data":{"items":{"$ref":"#/components/schemas/PeopleListDataItem"},"type":"array","title":"People List Data"},"people_list_type":{"type":"string","enum":["profile_id","sales_navigator_id","linkedin_public_identifier","profile_key"],"title":"People List Type"}},"type":"object","required":["audience_name","people_list_name","people_list_data","people_list_type"],"title":"AudienceSourcePeopleList","description":"Audience sourcing via people list upload."},"AudienceSourceRecords":{"properties":{"source_type":{"type":"string","const":"records","title":"Source Type","default":"records"},"audience_name":{"type":"string","title":"Audience Name"},"rows":{"items":{"$ref":"#/components/schemas/CsvPlaybookRowPayload"},"type":"array","maxItems":10000,"minItems":1,"title":"Rows"}},"additionalProperties":false,"type":"object","required":["audience_name","rows"],"title":"AudienceSourceRecords","description":"Members are the rows passed in, not a warehouse search."},"AudienceType":{"type":"string","enum":["profile","company"],"title":"AudienceType"},"AudiencesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GetAudiencesResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"AudiencesPage"},"BranchStep":{"properties":{"type":{"type":"string","const":"conditional","title":"Type","default":"conditional"},"condition":{"type":"string","enum":["emailsOpened","emailsClicked","emailsUnsubscribed","meetingBooked","linkedinInviteAccepted","linkedinNetworkCheck","hasWhatsappAccount"],"title":"Condition"},"wait":{"type":"string","enum":["waitUntil","within"],"title":"Wait","default":"within"},"wait_days":{"type":"integer","minimum":0.0,"title":"Wait Days"},"matched":{"items":{"oneOf":[{"$ref":"#/components/schemas/SequenceStep"},{"$ref":"#/components/schemas/ActionStep"},{"$ref":"#/components/schemas/CloneStep"},{"$ref":"#/components/schemas/BranchStep"},{"$ref":"#/components/schemas/HandoffStep"}],"discriminator":{"propertyName":"type","mapping":{"clone":"#/components/schemas/CloneStep","conditional":"#/components/schemas/BranchStep","email":"#/components/schemas/SequenceStep","linkedinInvite":"#/components/schemas/SequenceStep","linkedinLikeLastPost":"#/components/schemas/ActionStep","linkedinSend":"#/components/schemas/SequenceStep","linkedinVisit":"#/components/schemas/ActionStep","linkedinWithdrawInvitation":"#/components/schemas/ActionStep","sendToAnotherCampaign":"#/components/schemas/HandoffStep"}}},"type":"array","title":"Matched"},"fallback":{"items":{"oneOf":[{"$ref":"#/components/schemas/SequenceStep"},{"$ref":"#/components/schemas/ActionStep"},{"$ref":"#/components/schemas/CloneStep"},{"$ref":"#/components/schemas/BranchStep"},{"$ref":"#/components/schemas/HandoffStep"}],"discriminator":{"propertyName":"type","mapping":{"clone":"#/components/schemas/CloneStep","conditional":"#/components/schemas/BranchStep","email":"#/components/schemas/SequenceStep","linkedinInvite":"#/components/schemas/SequenceStep","linkedinLikeLastPost":"#/components/schemas/ActionStep","linkedinSend":"#/components/schemas/SequenceStep","linkedinVisit":"#/components/schemas/ActionStep","linkedinWithdrawInvitation":"#/components/schemas/ActionStep","sendToAnotherCampaign":"#/components/schemas/HandoffStep"}}},"type":"array","title":"Fallback"}},"type":"object","required":["type","condition","wait","wait_days","matched","fallback"],"title":"BranchStep","description":"A branch point, carrying the two sequences it routes into.\n\nThe branches converge: a step placed after a branch point belongs to the sequence the\nbranches were cut from, so every path through them arrives at it, and an empty\n``matched`` is not a dead end."},"CRMConditionGroupSchema-Input":{"properties":{"logical_operator":{"$ref":"#/components/schemas/CRMFilterLogicalOperator"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/CRMConditionGroupSchema-Input"},{"$ref":"#/components/schemas/CRMConditionSchema"}]},"type":"array","title":"Conditions","default":[]}},"additionalProperties":false,"type":"object","required":["logical_operator"],"title":"CRMConditionGroupSchema"},"CRMConditionGroupSchema-Output":{"properties":{"logical_operator":{"$ref":"#/components/schemas/CRMFilterLogicalOperator"},"conditions":{"items":{"anyOf":[{"$ref":"#/components/schemas/CRMConditionGroupSchema-Output"},{"$ref":"#/components/schemas/CRMConditionSchema"}]},"type":"array","title":"Conditions","default":[]}},"additionalProperties":false,"type":"object","required":["logical_operator"],"title":"CRMConditionGroupSchema"},"CRMConditionSchema":{"properties":{"object":{"type":"string","enum":["account","contact","opportunity"],"title":"Object"},"field":{"type":"string","title":"Field"},"field_type":{"$ref":"#/components/schemas/CRMNormalizedType"},"operator":{"$ref":"#/components/schemas/CRMFilterOperator"},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"},{"type":"boolean"},{"items":{"type":"string"},"type":"array"},{"items":{"type":"integer"},"type":"array"},{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Value"}},"additionalProperties":false,"type":"object","required":["object","field","field_type","operator"],"title":"CRMConditionSchema"},"CRMFilterLogicalOperator":{"type":"string","enum":["and","or"],"title":"CRMFilterLogicalOperator"},"CRMFilterOperator":{"type":"string","enum":["equals","not_equals","in","not_in","contains","contains_any","between","gt","gte","lt","lte","is_null","is_not_null","last_month","last_3_months","last_6_months","last_9_months","last_12_months"],"title":"CRMFilterOperator"},"CRMFilteredListCreatePayload":{"properties":{"name":{"type":"string","minLength":1,"title":"Name","description":"List name. Stored with a [SCALA] prefix."},"filter":{"$ref":"#/components/schemas/CRMConditionGroupSchema-Input"},"type":{"$ref":"#/components/schemas/CRMSegmentType","description":"account creates a company list; contact creates a person list."}},"additionalProperties":false,"type":"object","required":["name","filter","type"],"title":"CRMFilteredListCreatePayload","description":"A native CRM list or view built from the same filter a segment stores."},"CRMFilteredListDetailSchema":{"properties":{"list_id":{"type":"string","title":"List Id"},"name":{"type":"string","title":"Name"},"crm_object":{"type":"string","title":"Crm Object","description":"What it lists, in the CRM's terms, such as Account."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Definition","description":"The filter as the CRM stores it, untranslated: HubSpot's processingType and filterBranch, Salesforce's filteredByInfo and filterLogicString, Pipedrive's conditions."}},"additionalProperties":false,"type":"object","required":["list_id","name","crm_object","definition"],"title":"CRMFilteredListDetailSchema"},"CRMFilteredListSchema":{"properties":{"list_id":{"type":"string","title":"List Id"},"name":{"type":"string","title":"Name"},"crm_object":{"type":"string","title":"Crm Object","description":"What it lists, in the CRM's terms, such as Account."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"additionalProperties":false,"type":"object","required":["list_id","name","crm_object"],"title":"CRMFilteredListSchema","description":"A list, list view or filter in the customer's CRM."},"CRMFilteredListsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CRMFilteredListSchema"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CRMFilteredListsPage"},"CRMListSchema":{"properties":{"list_id":{"type":"string","title":"List Id"},"name":{"type":"string","title":"Name"}},"additionalProperties":false,"type":"object","required":["list_id","name"],"title":"CRMListSchema"},"CRMListTemplateSchema":{"properties":{"list_id":{"type":"string","title":"List Id"},"name":{"type":"string","title":"Name"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"additionalProperties":false,"type":"object","required":["list_id","name"],"title":"CRMListTemplateSchema"},"CRMListTemplateUpdatePayload":{"properties":{"list_id":{"type":"string","title":"List Id"}},"additionalProperties":false,"type":"object","required":["list_id"],"title":"CRMListTemplateUpdatePayload"},"CRMListsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CRMListSchema"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CRMListsPage"},"CRMMatchBreakdownMatchedAccount":{"properties":{"kind":{"type":"string","const":"matched_account","title":"Kind"},"crm_id":{"type":"string","title":"Crm Id"},"company_key":{"type":"string","title":"Company Key"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"scala_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scala Domain"},"matched_on":{"items":{"type":"string"},"type":"array","title":"Matched On","default":[]},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"},"account_linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Linkedin Url"},"account_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Website"}},"additionalProperties":false,"type":"object","required":["kind","crm_id","company_key"],"title":"CRMMatchBreakdownMatchedAccount","description":"Scala company row matched to a CRM account."},"CRMMatchBreakdownMatchedContact":{"properties":{"kind":{"type":"string","const":"matched_contact","title":"Kind"},"crm_id":{"type":"string","title":"Crm Id"},"profile_key":{"type":"string","title":"Profile Key"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"matched_on":{"items":{"type":"string"},"type":"array","title":"Matched On","default":[]},"contact_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact First Name"},"contact_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Last Name"},"contact_linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Linkedin Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"}},"additionalProperties":false,"type":"object","required":["kind","crm_id","profile_key"],"title":"CRMMatchBreakdownMatchedContact","description":"Scala profile row matched to a CRM contact."},"CRMMatchBreakdownUnmatched":{"properties":{"kind":{"type":"string","const":"unmatched","title":"Kind"},"crm_id":{"type":"string","title":"Crm Id"},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name"},"account_linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Linkedin Url"},"account_website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Website"},"contact_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact First Name"},"contact_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Last Name"},"contact_linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Linkedin Url"},"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email"}},"additionalProperties":false,"type":"object","required":["kind","crm_id"],"title":"CRMMatchBreakdownUnmatched","description":"CRM object in segment with no Scala match."},"CRMMatchingAccountResponseV2":{"properties":{"company_key":{"type":"string","title":"Company Key"},"tenant_id":{"type":"string","title":"Tenant Id"},"crm_id":{"type":"string","title":"Crm Id"},"last_imported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Imported At"},"crm_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Crm Data"},"opportunities":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Opportunities"}},"type":"object","required":["company_key","tenant_id","crm_id"],"title":"CRMMatchingAccountResponseV2"},"CRMMatchingContactResponseV2":{"properties":{"profile_key":{"type":"string","title":"Profile Key"},"tenant_id":{"type":"string","title":"Tenant Id"},"crm_id":{"type":"string","title":"Crm Id"},"last_imported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Imported At"},"crm_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Crm Data"}},"type":"object","required":["profile_key","tenant_id","crm_id"],"title":"CRMMatchingContactResponseV2"},"CRMNormalizedType":{"type":"string","enum":["unknown","bool","date","datetime","email","enum","number","phone","reference","string","time","url"],"title":"CRMNormalizedType"},"CRMProvider":{"type":"string","enum":["hubspot","salesforce","pipedrive","attio"],"title":"CRMProvider"},"CRMPushSettingsSchema":{"properties":{"contact_reassign":{"type":"boolean","title":"Contact Reassign"},"account_update":{"type":"boolean","title":"Account Update"}},"type":"object","required":["contact_reassign","account_update"],"title":"CRMPushSettingsSchema","description":"Schema for CRM push settings."},"CRMPushSettingsUpdateAccountUpdateSchema":{"properties":{"account_update":{"type":"boolean","title":"Account Update"}},"type":"object","required":["account_update"],"title":"CRMPushSettingsUpdateAccountUpdateSchema","description":"Schema for updating account update setting for a customer."},"CRMPushSettingsUpdateContactReassignSchema":{"properties":{"contact_reassign":{"type":"boolean","title":"Contact Reassign"}},"type":"object","required":["contact_reassign"],"title":"CRMPushSettingsUpdateContactReassignSchema","description":"Schema for updating contact reassign setting for a customer."},"CRMRecordType":{"type":"string","enum":["contact","account","opportunity","lead"],"title":"CRMRecordType"},"CRMSegmentCountResponse":{"properties":{"crm_count":{"type":"integer","title":"Crm Count"},"scala_count":{"type":"integer","title":"Scala Count"},"unmatched_crm_count":{"type":"integer","title":"Unmatched Crm Count"}},"type":"object","required":["crm_count","scala_count","unmatched_crm_count"],"title":"CRMSegmentCountResponse"},"CRMSegmentCreatePayload":{"properties":{"name":{"type":"string","title":"Name"},"filter":{"anyOf":[{"$ref":"#/components/schemas/CRMConditionGroupSchema-Input"},{"type":"null"}]},"type":{"$ref":"#/components/schemas/CRMSegmentType"},"excluded_by_default":{"type":"boolean","title":"Excluded By Default","description":"Whether every search of the customer's excludes the segment, whether it names the segment or not. A segment with no filter cannot be.","default":false}},"additionalProperties":false,"type":"object","required":["name","filter","type"],"title":"CRMSegmentCreatePayload"},"CRMSegmentMatchBreakdownPage":{"properties":{"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/CRMMatchBreakdownMatchedAccount"},{"$ref":"#/components/schemas/CRMMatchBreakdownMatchedContact"},{"$ref":"#/components/schemas/CRMMatchBreakdownUnmatched"}],"discriminator":{"propertyName":"kind","mapping":{"matched_account":"#/components/schemas/CRMMatchBreakdownMatchedAccount","matched_contact":"#/components/schemas/CRMMatchBreakdownMatchedContact","unmatched":"#/components/schemas/CRMMatchBreakdownUnmatched"}}},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."},"tab":{"type":"string","enum":["matched","unmatched"],"title":"Tab"},"segment_type":{"$ref":"#/components/schemas/CRMSegmentType"}},"type":"object","required":["items","next_cursor","total_count","tab","segment_type"],"title":"CRMSegmentMatchBreakdownPage","description":"A page of a CRM segment's records, matched to Scala's or not.\n\nEvery item is of one kind, set by the tab and the segment type: a matched account, a matched\ncontact, or an unmatched record of either."},"CRMSegmentSchema":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"filter":{"anyOf":[{"$ref":"#/components/schemas/CRMConditionGroupSchema-Output"},{"type":"null"}]},"is_default":{"type":"boolean","title":"Is Default"},"type":{"$ref":"#/components/schemas/CRMSegmentType"},"created_by_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By Id"},"excluded_by_default":{"type":"boolean","title":"Excluded By Default"},"audience_count":{"type":"integer","title":"Audience Count","default":0}},"type":"object","required":["id","name","filter","is_default","type","created_by_id","excluded_by_default"],"title":"CRMSegmentSchema"},"CRMSegmentType":{"type":"string","enum":["account","contact"],"title":"CRMSegmentType"},"CRMSegmentUpdatePayload":{"properties":{"name":{"type":"string","title":"Name"},"filter":{"anyOf":[{"$ref":"#/components/schemas/CRMConditionGroupSchema-Input"},{"type":"null"}]},"excluded_by_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Excluded By Default","description":"Whether every search of the customer's excludes the segment, whether it names the segment or not. Left as it is when absent."}},"additionalProperties":false,"type":"object","required":["name","filter"],"title":"CRMSegmentUpdatePayload"},"CampaignBuildState":{"type":"string","enum":["BUILDING","BUILT"],"title":"CampaignBuildState","description":"How far scala-app got building a Lemlist campaign it created.\n\nThe row is written as soon as Lemlist creates the campaign, before its steps are posted,\nbecause Lemlist cannot delete a campaign: a build that fails halfway leaves the campaign\nthere, and only the row lets a retry finish it instead of creating another."},"CampaignCreateResponse":{"properties":{"message":{"type":"string","title":"Message"},"campaign_id":{"type":"integer","title":"Campaign Id"},"tool_id":{"type":"string","title":"Tool Id"},"playbook_id":{"type":"integer","title":"Playbook Id"}},"type":"object","required":["message","campaign_id","tool_id","playbook_id"],"title":"CampaignCreateResponse"},"CampaignMetricsEntity":{"properties":{"team_id":{"type":"string","title":"Team Id"},"campaign_id":{"type":"string","title":"Campaign Id"},"campaign_name":{"type":"string","title":"Campaign Name"},"campaign_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Status"},"campaign_launch_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Campaign Launch Date"},"nb_companies":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nb Companies"},"nb_people_contacted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nb People Contacted"},"nb_people_interested":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nb People Interested"},"nb_people_who_replied":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nb People Who Replied"},"total_leads":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Leads"}},"type":"object","required":["team_id","campaign_id","campaign_name"],"title":"CampaignMetricsEntity"},"CampaignMetricsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CampaignMetricsEntity"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."},"earliest_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Earliest Start Date","description":"The earliest launch date of any of the team's campaigns, whatever the filters and the page; null when none has been launched."}},"type":"object","required":["items","next_cursor","total_count","earliest_start_date"],"title":"CampaignMetricsPage"},"CampaignPlaybookPayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active"},"is_requesting_phone_numbers":{"type":"boolean","title":"Is Requesting Phone Numbers","default":false},"workflow_type":{"type":"string","const":"campaign_v2","title":"Workflow Type","default":"campaign_v2"},"campaign_info":{"$ref":"#/components/schemas/PlaybookCampaignInfoPayload"}},"additionalProperties":false,"type":"object","required":["is_active","campaign_info"],"title":"CampaignPlaybookPayload","description":"A campaign playbook as the public routes create it: V1, and with no copy.\n\nA V3 or V4 playbook's copy is written by ai-agents, which creates it through the internal\nroutes (:class:`InternalCampaignPlaybookPayload`) after parsing it as the Liquid Lemlist\nreads, and scala-app stores that copy as it arrives. A public create taking copy would\nqueue it for Lemlist unchecked, so ``extra=\"forbid\"`` answers a body carrying sequences\nwith a 422."},"CampaignScalaVarData":{"anyOf":[{"$ref":"#/components/schemas/AudienceBuilderFieldScalaVarData"},{"$ref":"#/components/schemas/NamedropScalaVarData"}]},"CampaignScalaVarsFormatType":{"type":"string","enum":["one","two_or","two_and","three_or","three_and","raw","month","year","month_and_year","month_auto_year","time_ago","months_since"],"title":"CampaignScalaVarsFormatType","description":"Format types for campaign variables."},"CampaignScalaVarsPayload":{"properties":{"key":{"type":"string","title":"Key","description":"The key of the CRM field where the Scala variable is stored. When push_to_crm is false there is no CRM field, so this is a synthetic name identifying the value in the resolved map."},"type":{"$ref":"#/components/schemas/CampaignScalaVarsType"},"data":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarData"},{"type":"null"}]},"format_type":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarsFormatType"},{"type":"null"}]},"push_to_crm":{"type":"boolean","title":"Push To Crm","description":"Whether the resolved value is written to the customer's CRM. False for data a campaign needs but the CRM must not hold, such as HPP's name-drop peer: the rewriter bakes it into prose, so no placeholder ever reads it back.","default":true}},"type":"object","required":["key","type","data"],"title":"CampaignScalaVarsPayload"},"CampaignScalaVarsSchema":{"properties":{"key":{"type":"string","title":"Key","description":"The key of the CRM field where the Scala variable is stored. When push_to_crm is false there is no CRM field, so this is a synthetic name identifying the value in the resolved map."},"type":{"$ref":"#/components/schemas/CampaignScalaVarsType"},"data":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarData"},{"type":"null"}]},"format_type":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarsFormatType"},{"type":"null"}]},"push_to_crm":{"type":"boolean","title":"Push To Crm","description":"Whether the resolved value is written to the customer's CRM. False for data a campaign needs but the CRM must not hold, such as HPP's name-drop peer: the rewriter bakes it into prose, so no placeholder ever reads it back.","default":true},"id":{"type":"integer","title":"Id"}},"type":"object","required":["key","type","data","id"],"title":"CampaignScalaVarsSchema"},"CampaignScalaVarsType":{"type":"string","enum":["audience_builder_field","custom","namedrop"],"title":"CampaignScalaVarsType"},"CampaignSequence":{"properties":{"id":{"type":"string","title":"Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"conditional_step_index":{"type":"integer","title":"Conditional Step Index"},"level":{"type":"integer","title":"Level"},"steps":{"items":{"$ref":"#/components/schemas/CampaignSequenceStep"},"type":"array","title":"Steps"}},"type":"object","required":["id","conditional_step_index","level","steps"],"title":"CampaignSequence"},"CampaignSequenceStep":{"properties":{"id":{"type":"string","title":"Id"},"delay":{"type":"integer","title":"Delay"},"email_template_id":{"type":"string","title":"Email Template Id"},"manual":{"type":"boolean","title":"Manual"},"index":{"type":"integer","title":"Index"},"sequence_id":{"type":"string","title":"Sequence Id"},"sequence_step":{"type":"integer","title":"Sequence Step"},"type":{"$ref":"#/components/schemas/CampaignStepType"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"conditions":{"anyOf":[{"items":{"$ref":"#/components/schemas/CampaignStepCondition"},"type":"array"},{"type":"null"}],"title":"Conditions"},"send_to_another_campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Send To Another Campaign Id"}},"type":"object","required":["id","delay","email_template_id","manual","index","sequence_id","sequence_step","type"],"title":"CampaignSequenceStep","description":"Campaign sequence step in gateway interface."},"CampaignSequences":{"properties":{"cross_canal_steps":{"items":{"oneOf":[{"$ref":"#/components/schemas/SequenceStep"},{"$ref":"#/components/schemas/ActionStep"},{"$ref":"#/components/schemas/CloneStep"},{"$ref":"#/components/schemas/BranchStep"},{"$ref":"#/components/schemas/HandoffStep"}],"discriminator":{"propertyName":"type","mapping":{"clone":"#/components/schemas/CloneStep","conditional":"#/components/schemas/BranchStep","email":"#/components/schemas/SequenceStep","linkedinInvite":"#/components/schemas/SequenceStep","linkedinLikeLastPost":"#/components/schemas/ActionStep","linkedinSend":"#/components/schemas/SequenceStep","linkedinVisit":"#/components/schemas/ActionStep","linkedinWithdrawInvitation":"#/components/schemas/ActionStep","sendToAnotherCampaign":"#/components/schemas/HandoffStep"}}},"type":"array","title":"Cross Canal Steps"},"linkedin_only_steps":{"items":{"oneOf":[{"$ref":"#/components/schemas/SequenceStep"},{"$ref":"#/components/schemas/ActionStep"},{"$ref":"#/components/schemas/CloneStep"},{"$ref":"#/components/schemas/BranchStep"},{"$ref":"#/components/schemas/HandoffStep"}],"discriminator":{"propertyName":"type","mapping":{"clone":"#/components/schemas/CloneStep","conditional":"#/components/schemas/BranchStep","email":"#/components/schemas/SequenceStep","linkedinInvite":"#/components/schemas/SequenceStep","linkedinLikeLastPost":"#/components/schemas/ActionStep","linkedinSend":"#/components/schemas/SequenceStep","linkedinVisit":"#/components/schemas/ActionStep","linkedinWithdrawInvitation":"#/components/schemas/ActionStep","sendToAnotherCampaign":"#/components/schemas/HandoffStep"}}},"type":"array","title":"Linkedin Only Steps"}},"type":"object","required":["cross_canal_steps","linkedin_only_steps"],"title":"CampaignSequences","description":"The two sequences a campaign publishes, as a layout."},"CampaignSequencesSchema":{"properties":{"sequences":{"items":{"$ref":"#/components/schemas/CampaignSequence"},"type":"array","title":"Sequences"},"name":{"type":"string","title":"Name"},"campaign_type":{"$ref":"#/components/schemas/CampaignType"},"id":{"type":"integer","title":"Id"},"tool_id":{"type":"string","title":"Tool Id"}},"type":"object","required":["sequences","name","campaign_type","id","tool_id"],"title":"CampaignSequencesSchema"},"CampaignStepCondition":{"properties":{"sequenceId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sequenceid"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"delay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay"},"fallback":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Fallback"},"delayType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delaytype"}},"type":"object","title":"CampaignStepCondition","description":"Campaign step condition in gateway interface."},"CampaignStepType":{"type":"string","enum":["email","linkedinInvite","linkedinSend","linkedinVisit","linkedinLikeLastPost","linkedinWithdrawInvitation","conditional","sendToAnotherCampaign"],"title":"CampaignStepType"},"CampaignType":{"type":"string","enum":["EMAIL","LINKEDIN"],"title":"CampaignType"},"CampaignVersion":{"type":"integer","enum":[0,1,2,3,4],"title":"CampaignVersion","description":"Which flow produced a playbook's campaign copy.\n\nEvery member stays readable even when nothing writes it any more: the value is\nstored as an integer on ``audiences_playbook_campaign_info.version``, and rows\nwritten by a retired flow keep theirs. ``V2`` is such a member, and the column\nstill defaults to ``V1``, so a row carrying ``V1`` may equally be one written by\na path that never set the field."},"ClientReferenceCreatePayload":{"properties":{"client_name":{"type":"string","maxLength":200,"minLength":1,"title":"Client Name","description":"The client as a copy names it. One reference per client and customer, compared ignoring case."},"website":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Website"},"scope":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Scope","description":"Where the client may be cited: a sector, a segment, a business unit. Null means everywhere."},"use":{"$ref":"#/components/schemas/ClientReferenceUse"},"claim":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Claim","description":"What may be said about the client: the use case, a testimonial without the person's name."},"proof":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Proof","description":"The figure that may go with it."},"status":{"$ref":"#/components/schemas/ClientReferenceStatus"}},"additionalProperties":false,"type":"object","required":["client_name","use","status"],"title":"ClientReferenceCreatePayload"},"ClientReferenceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"client_name":{"type":"string","title":"Client Name"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"scope":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scope","description":"Where the client may be cited: a sector, a segment, a business unit. Null means everywhere."},"use":{"$ref":"#/components/schemas/ClientReferenceUse"},"claim":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claim","description":"What may be said about the client: the use case, a testimonial without the person's name. A copy claims nothing beyond it and `proof`."},"proof":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proof","description":"The figure that may go with the claim."},"status":{"$ref":"#/components/schemas/ClientReferenceStatus"},"caller":{"$ref":"#/components/schemas/MachineCaller","description":"The machine that sent the last write."},"actor":{"$ref":"#/components/schemas/ActorResponse","description":"Who made the last write."},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","client_name","website","scope","use","claim","proof","status","caller","actor","agent_origin","created_at","updated_at"],"title":"ClientReferenceResponse"},"ClientReferenceStatus":{"type":"string","enum":["confirmed","to_validate"],"title":"ClientReferenceStatus","description":"Whether the customer agreed to the reference: `to_validate` waits for someone to confirm."},"ClientReferenceUpdatePayload":{"properties":{"client_name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Client Name","description":"Left as it is when absent or null."},"website":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Website","description":"Left as it is when absent; null or blank clears it."},"scope":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Scope","description":"Left as it is when absent; null or blank clears it."},"use":{"anyOf":[{"$ref":"#/components/schemas/ClientReferenceUse"},{"type":"null"}],"description":"Left as it is when absent or null."},"claim":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Claim","description":"Left as it is when absent; null or blank clears it."},"proof":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Proof","description":"Left as it is when absent; null or blank clears it."},"status":{"anyOf":[{"$ref":"#/components/schemas/ClientReferenceStatus"},{"type":"null"}],"description":"Left as it is when absent or null."}},"additionalProperties":false,"type":"object","title":"ClientReferenceUpdatePayload","description":"The fields to change; one left out keeps its value."},"ClientReferenceUse":{"type":"string","enum":["cite","logo_only","anonymized","lookalike_only","refused"],"title":"ClientReferenceUse","description":"How a copy may use a client of the customer's.\n\n`anonymized` names the client by what it is (« un client BTP ») and never by name.\n`lookalike_only` makes it a seed for finding similar prospects, never cited. `refused` is a\nclient who refused to be named, kept so nobody adds it again."},"ClientReferencesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ClientReferenceResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"ClientReferencesPage"},"CloneStep":{"properties":{"type":{"type":"string","const":"clone","title":"Type","default":"clone"},"clone_of":{"type":"string","pattern":"^(?:li_invite|(?:email|li_msg)_[1-9]\\d*)$","title":"Clone Of"},"wait_days":{"type":"integer","minimum":0.0,"title":"Wait Days"}},"type":"object","required":["type","clone_of","wait_days"],"title":"CloneStep","description":"Another placement of a message authored elsewhere in this sequence.\n\nA message that belongs on two branches has to sit on both, because a branch is a\nsequence of its own and a step is in one sequence. It is one message, written once:\nthe clone publishes the copy of the step it names, at its own gap. A prospect runs\none path through a branch, so the placements are alternatives and nobody receives it\ntwice."},"CompanyDistributionField":{"type":"string","enum":["linkedin_industry","gpt_industry","country_code","employees_range","last_funding_stage","is_hiring","gpt_client_focus","gpt_business_model","founded_year","in_crm"],"title":"CompanyDistributionField"},"CompanyFieldDistribution":{"properties":{"distinct":{"type":"integer","title":"Distinct","description":"How many distinct values the matched set has."},"top":{"items":{"$ref":"#/components/schemas/DistributionValue"},"type":"array","title":"Top","description":"The commonest values, at most `top_n`, most records first."},"other_count":{"type":"integer","title":"Other Count","description":"The records of the values past `top_n`, added up value by value: a record of a multi-valued field counts once per value."},"null_count":{"type":"integer","title":"Null Count","description":"Matched records with no value, an empty one included."},"field":{"$ref":"#/components/schemas/CompanyDistributionField"}},"type":"object","required":["distinct","top","other_count","null_count","field"],"title":"CompanyFieldDistribution"},"CompanyFieldsEntity":{"properties":{"company_apollo_business_model":{"items":{"type":"string"},"type":"array","title":"Company Apollo Business Model"},"company_apollo_client_focus":{"items":{"type":"string"},"type":"array","title":"Company Apollo Client Focus"},"company_apollo_end_buyer":{"items":{"type":"string"},"type":"array","title":"Company Apollo End Buyer"},"company_apollo_industry":{"items":{"type":"string"},"type":"array","title":"Company Apollo Industry"},"company_apollo_sales_product_led":{"items":{"type":"string"},"type":"array","title":"Company Apollo Sales Product Led"},"company_business_status":{"items":{"type":"string"},"type":"array","title":"Company Business Status"},"company_captain_data_type":{"items":{"type":"string"},"type":"array","title":"Company Captain Data Type"},"company_country_code":{"items":{"type":"string"},"type":"array","title":"Company Country Code"},"company_department_name":{"items":{"type":"string"},"type":"array","title":"Company Department Name"},"company_domain_email_provider":{"items":{"type":"string"},"type":"array","title":"Company Domain Email Provider"},"company_ecommerce_app_names":{"items":{"type":"string"},"type":"array","title":"Company Ecommerce App Names"},"company_ecommerce_platform":{"items":{"type":"string"},"type":"array","title":"Company Ecommerce Platform"},"company_ecommerce_platform_plan":{"items":{"type":"string"},"type":"array","title":"Company Ecommerce Platform Plan"},"company_ecommerce_technology_names":{"items":{"type":"string"},"type":"array","title":"Company Ecommerce Technology Names"},"company_employees_range":{"items":{"type":"string"},"type":"array","title":"Company Employees Range"},"company_linkedin_industry":{"items":{"type":"string"},"type":"array","title":"Company Linkedin Industry"},"company_region_name":{"items":{"type":"string"},"type":"array","title":"Company Region Name"},"company_last_funding_stage":{"items":{"type":"string"},"type":"array","title":"Company Last Funding Stage"},"static_tags":{"items":{"type":"string"},"type":"array","title":"Static Tags"}},"type":"object","required":["company_apollo_business_model","company_apollo_client_focus","company_apollo_end_buyer","company_apollo_industry","company_apollo_sales_product_led","company_business_status","company_captain_data_type","company_country_code","company_department_name","company_domain_email_provider","company_ecommerce_app_names","company_ecommerce_platform","company_ecommerce_platform_plan","company_ecommerce_technology_names","company_employees_range","company_linkedin_industry","company_region_name","company_last_funding_stage","static_tags"],"title":"CompanyFieldsEntity"},"CompanyListDataItem":{"properties":{"linkedin_universal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Universal Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"linkedin_company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Company Id"},"siren":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Siren"},"siret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Siret"},"company_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Key"},"extra_data":{"additionalProperties":{"type":"string"},"type":"object","title":"Extra Data","default":{}}},"type":"object","title":"CompanyListDataItem"},"CompanyListEntity":{"properties":{"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["domain","linkedin_universal_name","linkedin_company_id","siren","siret","company_key"],"title":"Type"},"customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customer Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"extra_column_names":{"items":{"type":"string"},"type":"array","title":"Extra Column Names"},"excluded_by_default":{"type":"boolean","title":"Excluded By Default","default":false},"role":{"anyOf":[{"$ref":"#/components/schemas/ListRole"},{"type":"null"}]}},"type":"object","required":["name","type","customer_id","user_id","created_at","updated_at","id","extra_column_names","excluded_by_default","role"],"title":"CompanyListEntity","description":"Business entity for CompanyList.\n\nThis entity represents the CompanyList domain object in the business layer,\nseparate from the ORM model. It contains only the core business data\nwithout ORM relationships."},"CompanyListResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["domain","linkedin_universal_name","linkedin_company_id","siren","siret","company_key"],"title":"Type"},"is_scala_lib":{"type":"boolean","title":"Is Scala Lib"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"audience_count":{"type":"integer","title":"Audience Count","description":"The audiences whose search includes or excludes the list, deleted ones included, each counted once: the customer's own, or every customer's on the library's list (`type=scala-lib`).","default":0},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"extra_column_names":{"items":{"type":"string"},"type":"array","title":"Extra Column Names","default":[]},"excluded_by_default":{"type":"boolean","title":"Excluded By Default","description":"Whether every search of the customer's excludes the list, whether it names the list or not."}},"type":"object","required":["id","name","type","is_scala_lib","user_id","created_by_email","created_at","excluded_by_default"],"title":"CompanyListResponse"},"CompanyListsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CompanyListResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CompanyListsPage"},"CompanyLookupRequest":{"properties":{"linkedin_universal_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Linkedin Universal Name"},"linkedin_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Linkedin Id","description":"LinkedIn's numeric company id, the one in `linkedin.com/company/<digits>`."},"domain":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Domain"},"limit":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Limit","description":"How many matches to return, best first. The default of 2 is the winner and its runner-up.","default":2}},"additionalProperties":false,"type":"object","title":"CompanyLookupRequest","description":"Exactly one key, matched exactly: normalizing it is the caller's job."},"CompanyLookupResponse":{"properties":{"match_count":{"type":"integer","title":"Match Count","description":"Every company the key matches, not only those returned."},"companies":{"items":{"$ref":"#/components/schemas/WarehouseCompany"},"type":"array","title":"Companies","description":"Most employees first, companies without a headcount last, then by company_key so a key always returns the same order."}},"type":"object","required":["match_count","companies"],"title":"CompanyLookupResponse"},"CompanyResponseV2":{"properties":{"company_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Key"},"gpt_business_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt Business Model"},"gpt_business_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt Business Status"},"gpt_client_focus":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt Client Focus"},"gpt_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt Description"},"gpt_end_buyer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt End Buyer"},"gpt_industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt Industry"},"gpt_ngo_tag":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt Ngo Tag"},"gpt_physical_store":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt Physical Store"},"gpt_sales_product_led":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gpt Sales Product Led"},"captain_data_specialties":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captain Data Specialties"},"captain_data_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captain Data Type"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"company_location_city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Location City"},"region_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region Name"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"employees_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employees Count"},"employees_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employees Range"},"event_manual_funding_last_funding_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Event Manual Funding Last Funding Amount"},"event_manual_funding_last_funding_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Event Manual Funding Last Funding At"},"last_funding_stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Funding Stage"},"last_sales":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Sales"},"last_profit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Profit"},"founded_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Founded Year"},"headcount_increased":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Headcount Increased"},"headcount_decreased":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Headcount Decreased"},"linkedin_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Linkedin Id"},"linkedin_industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Industry"},"linkedin_nb_days_since_last_extract":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Linkedin Nb Days Since Last Extract"},"linkedin_universal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Universal Name"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"cleaned_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleaned Name"},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code"},"wttj_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wttj Slug"},"is_hiring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hiring"},"company_ape_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Ape Code"},"siren":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Siren"},"siret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Siret"},"static_tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Static Tags"},"static_tags_array":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Static Tags Array"},"tools":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tools"},"domain_email_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain Email Provider"},"domain_email_provider_outbound_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Domain Email Provider Outbound Score"},"emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Emails"},"phone_numbers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Phone Numbers"},"ecommerce_platforms":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ecommerce Platforms"},"ecommerce_most_recently_published_product_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ecommerce Most Recently Published Product Title"},"website_traffic_repartition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website Traffic Repartition"},"website_total_non_domestic_traffic":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Website Total Non Domestic Traffic"},"website_estimated_monthly_visits_growth_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Website Estimated Monthly Visits Growth Rate"},"website_estimated_monthly_visits_max_value":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Website Estimated Monthly Visits Max Value"},"company_followers_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Followers Count"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"qf_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Qf Data"}},"type":"object","title":"CompanyResponseV2"},"CompanySearchBodyV2":{"properties":{"static_projection":{"anyOf":[{"$ref":"#/components/schemas/StaticCompanyProjectionRequest"},{"type":"null"}]},"dynamic_projection":{"anyOf":[{"$ref":"#/components/schemas/DynamicCompanyProjectionRequest"},{"type":"null"}]},"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"sample_size":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Sample Size"}},"type":"object","required":["search_filters","sample_size"],"title":"CompanySearchBodyV2","description":"Company search request with split static/dynamic projections."},"CompanySearchDistribution":{"properties":{"count":{"type":"integer","title":"Count","description":"Matched records, as the search's count reports them."},"in_crm_count":{"type":"integer","title":"In Crm Count","description":"Those of them already in the customer's CRM."},"distributions":{"items":{"$ref":"#/components/schemas/CompanyFieldDistribution"},"type":"array","title":"Distributions","description":"One per field, as requested."}},"type":"object","required":["count","in_crm_count","distributions"],"title":"CompanySearchDistribution","description":"The matched set of a search, broken down by field.\n\nExact, over the set the search's count counts: for a semantic search, the at most 10,000\ncompanies its semantic match resolves to. The records a Custom Data Point enrichment could\nadd are not in it, as they are not in the count's main total. A record of a multi-valued\nfield (a profile's `languages`) counts once under each of its values, so that field's\ncounts can add up to more than `count`."},"CompanySearchDistributionRequest":{"properties":{"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"fields":{"items":{"$ref":"#/components/schemas/CompanyDistributionField"},"type":"array","minItems":1,"title":"Fields","description":"The fields to break the matched set down by, each once. Every field is one more grouping of the matched set, so ask for the ones shown."},"top_n":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Top N","description":"The most values returned per field, the commonest first.","default":10}},"type":"object","required":["search_filters","fields"],"title":"CompanySearchDistributionRequest","description":"A company count's body, and the fields to break its matched set down by."},"CompanySearchExportBodyV2":{"properties":{"static_projection":{"anyOf":[{"$ref":"#/components/schemas/StaticCompanyProjectionRequest"},{"type":"null"}]},"dynamic_projection":{"anyOf":[{"$ref":"#/components/schemas/DynamicCompanyProjectionRequest"},{"type":"null"}]},"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"}},"type":"object","required":["search_filters"],"title":"CompanySearchExportBodyV2","description":"A company search body, for a CSV export."},"CompanySearchRequest":{"properties":{"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"}},"type":"object","required":["search_filters"],"title":"CompanySearchRequest"},"CompanySearchResponseV2":{"properties":{"company":{"$ref":"#/components/schemas/CompanyResponseV2"},"crm_matched_account":{"anyOf":[{"$ref":"#/components/schemas/CRMMatchingAccountResponseV2"},{"type":"null"}]},"computed_columns":{"$ref":"#/components/schemas/ComputedColumnsV2"}},"type":"object","required":["company","computed_columns"],"title":"CompanySearchResponseV2","description":"V2 company search response. Same shape as v1 for company search."},"ComputedColumnsV2":{"properties":{"linkedin_followed_pages_intersection":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Linkedin Followed Pages Intersection"},"company_tags_intersection":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Tags Intersection"},"company_technologies_intersection":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Technologies Intersection"},"matching_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Address"},"matching_job_sources":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Matching Job Sources"},"matching_job_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Job Title"},"matching_job_seniority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Job Seniority"},"matching_job_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Job Description"},"matching_job_posted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Matching Job Posted At"},"matching_job_accepts_remote":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Matching Job Accepts Remote"},"matching_job_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Job Url"},"matching_persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Persona"},"matching_past_experience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Past Experience"},"matching_education":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Matching Education"},"company_semantic_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Company Semantic Score"}},"type":"object","title":"ComputedColumnsV2"},"ContactCrmOutcome":{"type":"string","enum":["pending","cleared","gone","not_mapped","another_campaign","not_pushed"],"title":"ContactCrmOutcome","description":"What became of an excluded contact's CRM `lemlist_sequence`."},"ContactFieldReadMappings":{"properties":{"contact_first_name":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Contact First Name","default":[]},"contact_last_name":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Contact Last Name","default":[]},"contact_email":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Contact Email","default":[]},"contact_linkedin_url":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Contact Linkedin Url","default":[]},"phone":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Phone","default":[]}},"type":"object","title":"ContactFieldReadMappings"},"ContactLemlistOutcome":{"type":"string","enum":["pending","removed","not_found","not_pushed"],"title":"ContactLemlistOutcome","description":"What became of an excluded contact's leads in its playbook's Lemlist campaigns."},"ContactRemovalResponse":{"properties":{"playbook_id":{"type":"integer","title":"Playbook Id"},"profile_key":{"type":"string","title":"Profile Key"},"profile":{"anyOf":[{"$ref":"#/components/schemas/AudienceRecordProfileDisplay"},{"type":"null"}]},"company":{"anyOf":[{"$ref":"#/components/schemas/AudienceRecordCompanyDisplay"},{"type":"null"}]},"crm":{"$ref":"#/components/schemas/ContactCrmOutcome"},"lemlist":{"$ref":"#/components/schemas/ContactLemlistOutcome"},"status":{"$ref":"#/components/schemas/ExclusionProgress"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"attempts":{"type":"integer","title":"Attempts"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["playbook_id","profile_key","profile","company","crm","lemlist","status","error","attempts","updated_at"],"title":"ContactRemovalResponse","description":"One contact taken out of one playbook: its CRM `lemlist_sequence` and its Lemlist leads."},"CopySampleVariable":{"properties":{"name":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_-]*$","title":"Name","description":"As the copy spells it, `contractEnd` for `{{contractEnd}}`."},"description":{"type":"string","title":"Description","description":"What it holds: a column of the customer's CRM, a field of the audience, a value the SE types."}},"additionalProperties":false,"type":"object","required":["name","description"],"title":"CopySampleVariable","description":"A variable a customer sample's copy reads that no token and no Lemlist variable fills."},"CopySampleVariableResponse":{"properties":{"name":{"type":"string","title":"Name","description":"As the copy spells it, `contractEnd` for `{{contractEnd}}`."},"description":{"type":"string","title":"Description","description":"What it holds."}},"type":"object","required":["name","description"],"title":"CopySampleVariableResponse"},"CreateAllocationPayload":{"properties":{"idempotency_key":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","title":"Idempotency Key"},"type":{"$ref":"#/components/schemas/AllocationType"},"amount":{"type":"integer","title":"Amount","description":"Credits granted. Negative only for an adjustment, which takes them back."},"price_per_credit":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"},{"type":"null"}],"title":"Price Per Credit","description":"Euros per credit."},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"reason":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Reason"},"actor":{"anyOf":[{"$ref":"#/components/schemas/CreditActorPayload"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["idempotency_key","type","amount"],"title":"CreateAllocationPayload"},"CreateAudienceOutput":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"CreateAudienceOutput","description":"Result of a public create-audience execution."},"CreateCRMSegmentResult":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"filter":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Filter"},"is_default":{"type":"boolean","title":"Is Default"},"type":{"$ref":"#/components/schemas/CRMSegmentType"},"created_by_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By Id"},"excluded_by_default":{"type":"boolean","title":"Excluded By Default"},"audience_count":{"type":"integer","title":"Audience Count"}},"type":"object","required":["id","name","filter","is_default","type","created_by_id","excluded_by_default","audience_count"],"title":"CreateCRMSegmentResult","description":"Output of CreateCRMSegmentUseCase (persisted segment, API-neutral)."},"CreateCompanyListInput":{"properties":{"list_name":{"type":"string","title":"List Name"},"data":{"items":{"$ref":"#/components/schemas/CompanyListDataItem"},"type":"array","title":"Data"},"type":{"type":"string","enum":["domain","linkedin_universal_name","linkedin_company_id","siren","siret","company_key"],"title":"Type"},"is_scala_lib":{"type":"boolean","title":"Is Scala Lib","default":false}},"type":"object","required":["list_name","data","type"],"title":"CreateCompanyListInput"},"CreateConditionalStepPayload":{"properties":{"delay":{"type":"integer","title":"Delay"},"type":{"type":"string","const":"conditional","title":"Type"},"condition_key":{"type":"string","enum":["emailsOpened","emailsClicked","emailsUnsubscribed","meetingBooked","linkedinInviteAccepted","linkedinNetworkCheck","hasWhatsappAccount"],"title":"Condition Key"},"delay_type":{"type":"string","enum":["waitUntil","within"],"title":"Delay Type"},"matched":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array","title":"Matched","default":[]},"fallback":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array","title":"Fallback","default":[]}},"type":"object","required":["delay","type","condition_key","delay_type"],"title":"CreateConditionalStepPayload","description":"A branch point, carrying the two sequences it routes into.\n\nLemlist models a branch as a step that answers with one sequence id per outcome,\nso a campaign sequence is a tree and not a list. Nesting the branches here lets\nthe caller state the whole tree in one payload, and lets the publisher walk it\nwithout knowing what any particular campaign looks like.\n\n``matched`` runs when the condition holds, ``fallback`` when it does not. Either\nmay be empty: a branch that leads nowhere is a contact the campaign stops for."},"CreateCustomerCopySample":{"properties":{"kind":{"type":"string","const":"sample","title":"Kind"},"operation":{"type":"string","const":"create","title":"Operation"},"sample":{"$ref":"#/components/schemas/CustomerCopySampleRecord"}},"additionalProperties":false,"type":"object","required":["kind","operation","sample"],"title":"CreateCustomerCopySample"},"CreateEdgesRefreshSchedulePayload":{"properties":{"group_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Group Id","description":"The caller's group, such as the sub-searches of one split search, all launched with the same id. scala-app only stores it and lists by it."},"group_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Group Name","description":"What the back office calls the group; only with `group_id`."},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"What the back office calls the schedule, and every refresh it launches."},"search_url":{"type":"string","maxLength":8000,"pattern":"^https://([a-z]{2,3}\\.)?linkedin\\.com/sales/search/people.+","title":"Search Url","description":"A Sales Navigator people search URL: `https://www.linkedin.com/sales/search/people?…`."},"max_results":{"type":"integer","maximum":2500.0,"minimum":1.0,"title":"Max Results","description":"At most this many profiles from the search, up to Edges' 2,500 per URL.","default":2500},"skip_enriched_within_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Skip Enriched Within Days","description":"Leave out the profiles scala-app launched an enrichment of within this many days.","default":90},"cadence":{"oneOf":[{"$ref":"#/components/schemas/EdgesWeeklyCadence"},{"$ref":"#/components/schemas/EdgesMonthlyCadence"}],"title":"Cadence","description":"When it is launched: once a week or once a month, at an hour in UTC. The scheduler looks every 5 minutes, so a refresh starts up to 5 minutes after its hour.","discriminator":{"propertyName":"kind","mapping":{"monthly":"#/components/schemas/EdgesMonthlyCadence","weekly":"#/components/schemas/EdgesWeeklyCadence"}}},"sf_account_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Sf Account Id","description":"The client the schedule runs for, by Salesforce account id; a 404 when no customer has it. Disabling the client's schedules acts on it."},"run_now":{"type":"boolean","title":"Run Now","description":"Launch its first refresh now, as the caller, instead of waiting for its first fire; a fire less than a day after that refresh is skipped, since it would pay the same search again, unless the launch failed. The refresh is listed under the schedule.","default":false},"idempotency_key":{"type":"string","maxLength":200,"minLength":1,"title":"Idempotency Key","description":"The caller's name for this schedule. Sent again with the same parameters, `run_now` included, it answers the schedule it made, 200, launching its first run only if none was ever recorded and the schedule is still active; with other parameters, a 409 `idempotency_key_reused`."}},"type":"object","required":["name","search_url","cadence","idempotency_key"],"title":"CreateEdgesRefreshSchedulePayload","description":"A refresh to launch at each fire of its cadence, with the parameters of the launch route."},"CreateEmailStepPayload":{"properties":{"subject":{"type":"string","title":"Subject"},"message":{"type":"string","title":"Message"},"delay":{"type":"integer","title":"Delay"},"type":{"type":"string","const":"email","title":"Type"}},"type":"object","required":["subject","message","delay","type"],"title":"CreateEmailStepPayload"},"CreateIntent":{"properties":{"kind":{"type":"string","const":"intent","title":"Kind"},"operation":{"type":"string","const":"create","title":"Operation"},"intent":{"$ref":"#/components/schemas/StrategyIntentRecord"}},"additionalProperties":false,"type":"object","required":["kind","operation","intent"],"title":"CreateIntent"},"CreateLinkedinInvitationStepPayload":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"delay":{"type":"integer","title":"Delay"},"type":{"type":"string","const":"linkedinInvite","title":"Type"}},"type":"object","required":["delay","type"],"title":"CreateLinkedinInvitationStepPayload"},"CreateLinkedinLikeLastPostStepPayload":{"properties":{"delay":{"type":"integer","title":"Delay"},"type":{"type":"string","const":"linkedinLikeLastPost","title":"Type"}},"type":"object","required":["delay","type"],"title":"CreateLinkedinLikeLastPostStepPayload"},"CreateLinkedinSendStepPayload":{"properties":{"message":{"type":"string","title":"Message"},"delay":{"type":"integer","title":"Delay"},"type":{"type":"string","const":"linkedinSend","title":"Type"}},"type":"object","required":["message","delay","type"],"title":"CreateLinkedinSendStepPayload"},"CreateLinkedinVisitStepPayload":{"properties":{"delay":{"type":"integer","title":"Delay"},"type":{"type":"string","const":"linkedinVisit","title":"Type"}},"type":"object","required":["delay","type"],"title":"CreateLinkedinVisitStepPayload"},"CreateLinkedinWithdrawInvitationStepPayload":{"properties":{"delay":{"type":"integer","title":"Delay"},"type":{"type":"string","const":"linkedinWithdrawInvitation","title":"Type"}},"type":"object","required":["delay","type"],"title":"CreateLinkedinWithdrawInvitationStepPayload"},"CreateOrganizationPayload":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"sf_account_id":{"type":"string","title":"Sf Account Id"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"interested_slack_channel_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Interested Slack Channel Id"},"objection_slack_channel_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Objection Slack Channel Id"}},"type":"object","required":["name","sf_account_id"],"title":"CreateOrganizationPayload","description":"What n8n sends from a Salesforce account.\n\nText fields are normalized here rather than at each use site, so creation and a later\nre-post cannot disagree about whether a padded value is a change."},"CreatePeopleListPayload":{"properties":{"list_name":{"type":"string","title":"List Name"},"data":{"items":{"$ref":"#/components/schemas/PeopleListDataItem"},"type":"array","title":"Data"},"type":{"type":"string","enum":["profile_id","sales_navigator_id","linkedin_public_identifier","profile_key"],"title":"Type"},"is_scala_lib":{"type":"boolean","title":"Is Scala Lib","default":false}},"type":"object","required":["list_name","data","type"],"title":"CreatePeopleListPayload"},"CreatePersonaOutput":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","created_at","updated_at"],"title":"CreatePersonaOutput"},"CreatePlaybookPayload":{"properties":{"audience_source":{"oneOf":[{"$ref":"#/components/schemas/AudienceSourcePeopleList"},{"$ref":"#/components/schemas/AudienceSourceFilters"},{"$ref":"#/components/schemas/AudienceSourceExisting"},{"$ref":"#/components/schemas/AudienceSourceRecords"}],"title":"Audience Source","discriminator":{"propertyName":"source_type","mapping":{"audience_id":"#/components/schemas/AudienceSourceExisting","filters":"#/components/schemas/AudienceSourceFilters","people_list":"#/components/schemas/AudienceSourcePeopleList","records":"#/components/schemas/AudienceSourceRecords"}}},"playbook":{"oneOf":[{"$ref":"#/components/schemas/CampaignPlaybookPayload"},{"$ref":"#/components/schemas/TaskPlaybookPayload"},{"$ref":"#/components/schemas/EnrichmentPlaybookPayload"},{"$ref":"#/components/schemas/AudienceEnrichmentPlaybookPayload"}],"title":"Playbook","discriminator":{"propertyName":"workflow_type","mapping":{"audience_enrichment":"#/components/schemas/AudienceEnrichmentPlaybookPayload","campaign_v2":"#/components/schemas/CampaignPlaybookPayload","email_enrichment":"#/components/schemas/EnrichmentPlaybookPayload","tasks_v2":"#/components/schemas/TaskPlaybookPayload"}}}},"additionalProperties":false,"type":"object","required":["audience_source","playbook"],"title":"CreatePlaybookPayload","description":"Create an audience from a source and a playbook for it in one call."},"CreatePlaybookResponse":{"properties":{"id":{"type":"integer","title":"Id"},"audience_id":{"type":"integer","title":"Audience Id"},"is_active":{"type":"boolean","title":"Is Active"},"workflow_type":{"$ref":"#/components/schemas/WorkflowType"}},"type":"object","required":["id","audience_id","is_active","workflow_type"],"title":"CreatePlaybookResponse","description":"Response for the public create-playbook endpoint."},"CreateSendToAnotherCampaignStepPayload":{"properties":{"delay":{"type":"integer","title":"Delay"},"type":{"type":"string","const":"sendToAnotherCampaign","title":"Type"},"target_sequence":{"type":"string","const":"linkedin_only","title":"Target Sequence"}},"type":"object","required":["delay","type","target_sequence"],"title":"CreateSendToAnotherCampaignStepPayload","description":"Hand the contact over to the playbook's LinkedIn-only campaign.\n\nNamed by its sequence rather than by its Lemlist id, which the caller cannot know: the\npublisher builds that campaign first and puts its id in the step. Only as the last\nstep of the cross-canal sequence (:func:`refuse_misplaced_handoff`)."},"CreateStrategyCopySample":{"properties":{"kind":{"type":"string","const":"sample","title":"Kind"},"operation":{"type":"string","const":"create","title":"Operation"},"sample":{"$ref":"#/components/schemas/StrategyCopySampleRecord"}},"additionalProperties":false,"type":"object","required":["kind","operation","sample"],"title":"CreateStrategyCopySample"},"CreateStrategyEvent":{"properties":{"operation":{"type":"string","const":"create","title":"Operation"},"event":{"$ref":"#/components/schemas/StrategyEventRecord"}},"additionalProperties":false,"type":"object","required":["operation","event"],"title":"CreateStrategyEvent"},"CreateToken":{"properties":{"kind":{"type":"string","const":"token","title":"Kind"},"operation":{"type":"string","const":"create","title":"Operation"},"token":{"$ref":"#/components/schemas/StrategyTokenDraft"}},"additionalProperties":false,"type":"object","required":["kind","operation","token"],"title":"CreateToken"},"CreditActor":{"properties":{"namespace":{"$ref":"#/components/schemas/ActorNamespace"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"is_admin":{"type":"boolean","title":"Is Admin"}},"type":"object","required":["namespace","id","label","is_admin"],"title":"CreditActor"},"CreditActorPayload":{"properties":{"namespace":{"$ref":"#/components/schemas/ActorNamespace"},"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Id","description":"The Kinde user id for a user, the key's id for an API key."},"is_admin":{"type":"boolean","title":"Is Admin","default":false},"label":{"anyOf":[{"type":"string","maxLength":2048,"minLength":1},{"type":"null"}],"title":"Label","description":"How to show the actor, as the caller composes it: e.g. a user's email, or an API key's name with the characters Kinde shows of it. Kept as written, for display: `id` is what identifies them."}},"additionalProperties":false,"type":"object","required":["namespace"],"title":"CreditActorPayload","description":"Who a movement is done for, from a caller that does not act for people.\n\nA caller that does (`CALLER_PERSON_HEADER`) names its person in a header instead, and a\nbody `actor` from it is refused."},"CreditAllocationResponse":{"properties":{"id":{"type":"integer","title":"Id"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"type":{"$ref":"#/components/schemas/AllocationType"},"amount":{"type":"integer","title":"Amount"},"remaining":{"type":"integer","title":"Remaining"},"held":{"type":"integer","title":"Held"},"price_per_credit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Per Credit"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"caller":{"$ref":"#/components/schemas/MachineCaller"},"actor":{"$ref":"#/components/schemas/CreditActor"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","idempotency_key","type","amount","remaining","held","price_per_credit","expires_at","reason","caller","actor","created_at"],"title":"CreditAllocationResponse"},"CreditBalanceResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether a reservation that does not fit is refused."},"total":{"type":"integer","title":"Total"},"reserved":{"type":"integer","title":"Reserved"},"available":{"type":"integer","title":"Available"}},"type":"object","required":["enabled","total","reserved","available"],"title":"CreditBalanceResponse"},"CreditDailyUsageResponse":{"properties":{"day":{"type":"string","format":"date","title":"Day"},"op":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Op","description":"The operation, as its caller named it. None only on imported history."},"credits":{"type":"integer","title":"Credits","description":"What its debits took, less what refunds gave back."},"calls":{"type":"integer","title":"Calls","description":"The billed calls: one per reservation with a debit, however many allocations it drew on, and one per debit with no reservation (imported history, where a debit later refunded still counts: approximate there)."},"quantity":{"type":"integer","title":"Quantity","description":"What those reservations delivered, as their caller counts it. Imported history recorded none."}},"type":"object","required":["day","op","credits","calls","quantity"],"title":"CreditDailyUsageResponse","description":"What one operation consumed on one day, in Europe/Paris."},"CreditEnforcementEventResponse":{"properties":{"id":{"type":"integer","title":"Id"},"enabled":{"type":"boolean","title":"Enabled"},"caller":{"$ref":"#/components/schemas/MachineCaller"},"actor":{"$ref":"#/components/schemas/CreditActor"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","enabled","caller","actor","created_at"],"title":"CreditEnforcementEventResponse"},"CreditEnforcementEventsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreditEnforcementEventResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CreditEnforcementEventsPage"},"CreditLedgerEntryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"$ref":"#/components/schemas/LedgerKind"},"delta":{"type":"integer","title":"Delta"},"allocation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Allocation Id"},"reservation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Reservation Id"},"adjustment_allocation_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Adjustment Allocation Id"},"op":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Op"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}]},"actor":{"$ref":"#/components/schemas/CreditActor"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","delta","allocation_id","reservation_id","adjustment_allocation_id","op","note","caller","actor","created_at"],"title":"CreditLedgerEntryResponse"},"CreditLedgerPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreditLedgerEntryResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CreditLedgerPage"},"CreditRefusalResponse":{"properties":{"id":{"type":"integer","title":"Id"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"caller":{"$ref":"#/components/schemas/MachineCaller"},"op":{"type":"string","title":"Op"},"quantity":{"type":"integer","title":"Quantity"},"needed":{"type":"integer","title":"Needed","description":"The credits the reservation asked for."},"available":{"type":"integer","title":"Available","description":"The credits the customer had available then."},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"actor":{"$ref":"#/components/schemas/CreditActor"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","idempotency_key","caller","op","quantity","needed","available","metadata","actor","created_at"],"title":"CreditRefusalResponse","description":"A reservation refused because the customer's available credits did not cover it."},"CreditRefusalsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CreditRefusalResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CreditRefusalsPage"},"CreditReservationResponse":{"properties":{"idempotency_key":{"type":"string","title":"Idempotency Key"},"caller":{"$ref":"#/components/schemas/MachineCaller"},"op":{"type":"string","title":"Op"},"quantity":{"type":"integer","title":"Quantity"},"amount_reserved":{"type":"integer","title":"Amount Reserved"},"status":{"$ref":"#/components/schemas/ReservationStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"delivered_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivered Amount"},"delivered_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delivered Quantity"},"vendor_cost":{"anyOf":[{"items":{"$ref":"#/components/schemas/VendorCost-Output"},"type":"array"},{"type":"null"}],"title":"Vendor Cost"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"actor":{"$ref":"#/components/schemas/CreditActor"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"closed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Closed At"},"balance":{"anyOf":[{"$ref":"#/components/schemas/CreditBalanceResponse"},{"type":"null"}],"description":"On settle and release, the customer's balance once this reservation closed, so a caller can report what is left without a second request. A replay of an already closed reservation reports the balance as it stands now."}},"type":"object","required":["idempotency_key","caller","op","quantity","amount_reserved","status","expires_at","delivered_amount","delivered_quantity","vendor_cost","metadata","actor","created_at","closed_at"],"title":"CreditReservationResponse"},"CreditsRefusal":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"CreditsRefusal","description":"What a credits route answers when it refuses a request: why, in words."},"CrmFieldOptionResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"}},"type":"object","required":["key","label"],"title":"CrmFieldOptionResponse"},"CrmFieldReadMappingItem":{"properties":{"crm_field_name":{"type":"string","title":"Crm Field Name"},"priority":{"type":"integer","title":"Priority"}},"type":"object","required":["crm_field_name","priority"],"title":"CrmFieldReadMappingItem"},"CrmFieldResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"crm_object":{"type":"string","enum":["contact","account","opportunity","lead","call","email","meeting","note","postal_mail","task"],"title":"Crm Object"},"type":{"$ref":"#/components/schemas/CRMNormalizedType"},"is_unique":{"type":"boolean","title":"Is Unique"},"is_read_only":{"type":"boolean","title":"Is Read Only"},"is_multi_select":{"type":"boolean","title":"Is Multi Select","default":false},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/CrmFieldOptionResponse"},"type":"array"},{"type":"null"}],"title":"Options"},"is_scala_var_field":{"type":"boolean","title":"Is Scala Var Field","description":"Whether this is one of the platform's ScalaVar columns, provisioned to hold a campaign variable and cleared between campaigns. Writing to one cannot destroy the customer's data."},"is_hpp_field":{"type":"boolean","title":"Is Hpp Field","description":"Whether this is one of the platform's HPP columns, provisioned to hold one step's hyperpersonalized message for a contact. Writing to one cannot destroy the customer's data. A campaign's per-step slot belongs in one of these; a short campaign variable belongs in an `is_scala_var_field` column instead."},"written_by":{"items":{"$ref":"#/components/schemas/CrmFieldWriteSource"},"type":"array","title":"Written By","description":"The Scala fields the platform writes into this column for every contact, whatever campaign they are in. Empty means nothing does, so the column is free to write a value into. Non-empty means it already carries these values and the next push replaces whatever is there, so it is not a destination: use it as a source instead, spelling the column in the copy rather than writing to it. Each entry's `namespace` says where its value comes from, and `audience_builder` is the one a per-contact generation step can read at generation time."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","label","crm_object","type","is_unique","is_read_only","is_scala_var_field","is_hpp_field","written_by","created_at","updated_at"],"title":"CrmFieldResponse"},"CrmFieldWriteMappingEntry":{"properties":{"mapping_id":{"type":"integer","title":"Mapping Id"},"scalability_field":{"oneOf":[{"$ref":"#/components/schemas/EnrichmentWriteFieldPayload"},{"$ref":"#/components/schemas/NamedropWriteFieldPayload"},{"$ref":"#/components/schemas/AudienceBuilderWriteFieldPayload"},{"$ref":"#/components/schemas/StaticWriteFieldPayload"},{"$ref":"#/components/schemas/PlaybookWriteFieldPayload"},{"$ref":"#/components/schemas/MetricsWriteFieldPayload"},{"$ref":"#/components/schemas/ListWriteFieldPayload"},{"$ref":"#/components/schemas/CustomColumnWriteFieldPayload"}],"title":"Scalability Field","discriminator":{"propertyName":"namespace","mapping":{"audience_builder":"#/components/schemas/AudienceBuilderWriteFieldPayload","custom":"#/components/schemas/CustomColumnWriteFieldPayload","enrichment":"#/components/schemas/EnrichmentWriteFieldPayload","list":"#/components/schemas/ListWriteFieldPayload","metrics":"#/components/schemas/MetricsWriteFieldPayload","namedrop":"#/components/schemas/NamedropWriteFieldPayload","playbook":"#/components/schemas/PlaybookWriteFieldPayload","static":"#/components/schemas/StaticWriteFieldPayload"}}},"crm_field_name":{"type":"string","title":"Crm Field Name"},"format":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarsFormatType"},{"type":"null"}]},"overwrite_on_update":{"type":"boolean","title":"Overwrite On Update"},"playbook_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playbook Id"},"namespace":{"type":"string","enum":["enrichment","namedrop","audience_builder","playbook","static","metrics","list","custom"],"title":"Namespace","readOnly":true}},"type":"object","required":["mapping_id","scalability_field","crm_field_name","overwrite_on_update","namespace"],"title":"CrmFieldWriteMappingEntry"},"CrmFieldWriteSource":{"properties":{"namespace":{"type":"string","enum":["enrichment","namedrop","audience_builder","playbook","static","metrics","list","custom"],"title":"Namespace","description":"Where the value comes from. `audience_builder` is the one a per-contact generation step can read at generation time; the others are resolved at push."},"property":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Property","description":"The Scala field's property, where it has one. Null where the source names no property, such as a static value or a list column."}},"type":"object","required":["namespace"],"title":"CrmFieldWriteSource","description":"One Scala field the platform writes into a CRM column, on every push.\n\nFlattened to a namespace and a property rather than carrying the write mapping's own\ndiscriminated union: this is read across the service boundary to answer two questions,\nwhether the column is free to write into and whether its value can be fetched while\ngenerating per-contact copy, and both are answered by the namespace alone."},"CrmIntegrationResponse":{"properties":{"provider":{"$ref":"#/components/schemas/CRMProvider"},"is_connected":{"type":"boolean","title":"Is Connected"},"person_object":{"$ref":"#/components/schemas/CrmPersonObject"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"instance_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instance Url"}},"type":"object","required":["provider","is_connected","person_object"],"title":"CrmIntegrationResponse"},"CrmOAuthAuthorizeRequest":{"properties":{"provider":{"$ref":"#/components/schemas/CRMProvider"},"person_object":{"anyOf":[{"$ref":"#/components/schemas/CrmPersonObject"},{"type":"null"}]}},"type":"object","required":["provider"],"title":"CrmOAuthAuthorizeRequest"},"CrmOAuthAuthorizeResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CrmOAuthAuthorizeResponse"},"CrmPersonObject":{"type":"string","enum":["contact","lead"],"title":"CrmPersonObject"},"CrmUser":{"properties":{"id":{"type":"string","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["id"],"title":"CrmUser"},"CsvPlaybookRowPayload":{"properties":{"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"company_name":{"type":"string","title":"Company Name"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"},"email":{"type":"string","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"company_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Domain"},"company_linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Linkedin Url"},"extra_data":{"additionalProperties":{"type":"string"},"type":"object","title":"Extra Data","default":{}}},"additionalProperties":false,"type":"object","required":["company_name","email"],"title":"CsvPlaybookRowPayload"},"CustomColumnField":{"properties":{"column":{"type":"string","title":"Column"},"namespace":{"type":"string","const":"custom","title":"Namespace","default":"custom"}},"type":"object","required":["column"],"title":"CustomColumnField","description":"A column from a consultant CSV, either a standard field or an extra column."},"CustomColumnWriteFieldPayload":{"properties":{"namespace":{"type":"string","const":"custom","title":"Namespace","default":"custom"},"column":{"type":"string","minLength":1,"title":"Column"}},"type":"object","required":["column"],"title":"CustomColumnWriteFieldPayload"},"CustomDataPointFilter":{"properties":{"field_key":{"type":"string","title":"Field Key","description":"Key of the Custom Data Point field."},"sharing":{"type":"string","enum":["shared","specific"],"title":"Sharing","description":"`shared` for a field every customer shares, `specific` for one of the customer's own."},"filter_type":{"type":"string","enum":["toggle","select","multi-select","integer","decimal","time-period"],"title":"Filter Type","description":"Type of the field, which decides the value fields that apply."},"values":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Values","description":"select and multi-select: the values to match. A company matches when its value, or one of its values for a multi-select, is among them."},"boolean_value":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Boolean Value","description":"toggle: the value to match."},"min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min","description":"integer and decimal: inclusive minimum."},"max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max","description":"integer and decimal: inclusive maximum."},"months_ago_min":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Months Ago Min","description":"time-period: the most recent bound, in months before the day the search runs, so a saved audience keeps meaning 'the last 3 months'. 'In the last 3 months' is months_ago_max=3 alone; '3 to 6 months ago' is months_ago_min=3, months_ago_max=6."},"months_ago_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Months Ago Max","description":"time-period: the oldest bound, in months before the day the search runs."},"mode":{"type":"string","enum":["include","exclude"],"title":"Mode","description":"select and multi-select: `include` keeps the companies whose value matches, `exclude` those whose value does not. A company with no value matches neither.","default":"include"},"presence":{"type":"string","enum":["value","no_value","undetermined"],"title":"Presence","description":"`value` filters on the value fields. `no_value` keeps the companies enrichment found no value for, and applies to select, time-period, integer and decimal fields only: a toggle records no as false and a multi-select as an empty list. `undetermined` keeps the companies whose value enrichment could not determine. Neither takes a value field. Labelled 'Has value', 'No value found' and 'Could not determine' in the Audience Builder.","default":"value"}},"type":"object","required":["field_key","sharing","filter_type"],"title":"CustomDataPointFilter","description":"One filter on a Custom Data Point, a field enriched for the customer's companies.\n\n`field_key` and `sharing` name the field, and the value fields its `filter_type` takes give\nwhat to match. A company not enriched for the field yet matches no value: it counts as\nenrichable instead. `presence` filters on what enrichment concluded rather than on a value."},"CustomerAccountManagerUpdateOutput":{"properties":{"id":{"type":"integer","title":"Id"},"account_manager":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Manager"}},"type":"object","required":["id","account_manager"],"title":"CustomerAccountManagerUpdateOutput"},"CustomerAccountManagerUpdatePayload":{"properties":{"account_manager":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Manager"}},"type":"object","required":["account_manager"],"title":"CustomerAccountManagerUpdatePayload"},"CustomerContextCategory":{"type":"string","enum":["common","strategy","copy"],"title":"CustomerContextCategory","description":"What one part of a customer's context holds.\n\n`common` holds what applies to the customer whatever the work, the rules every agent\nfollows. `strategy` holds the customer's strategy: targeting, timing, offers, and the facts\nworth keeping about it, such as funding, key people or news. `copy` holds how the customer's\nmessages are written. Each of ai-agents' agents chooses which categories it reads."},"CustomerContextResponse":{"properties":{"category":{"$ref":"#/components/schemas/CustomerContextCategory"},"version":{"type":"integer","title":"Version"},"content":{"type":"string","title":"Content","description":"Markdown, as its writer left it; empty once cleared."},"caller":{"$ref":"#/components/schemas/MachineCaller"},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["category","version","content","caller","actor","agent_origin","created_at"],"title":"CustomerContextResponse"},"CustomerContextVersionsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerContextResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CustomerContextVersionsPage"},"CustomerContextWritePayload":{"properties":{"content":{"type":"string","maxLength":100000,"title":"Content","description":"The category's context in full, in Markdown; empty clears it."},"expected_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Expected Version","description":"The version the content was edited from, null when the category has never been written. Any other value than the newest version answers 409."}},"additionalProperties":false,"type":"object","required":["content","expected_version"],"title":"CustomerContextWritePayload"},"CustomerCopySampleDetailResponse":{"properties":{"key":{"type":"string","title":"Key"},"intents":{"items":{"type":"string"},"type":"array","title":"Intents","description":"The `strategy_intent` keys it is written for, sorted. How to write for an intent is that intent's guidance."},"name":{"type":"string","title":"Name","description":"The campaign's name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What is particular to it: what it targeted, how its sequences divide the prospects, and the defects it ships with."},"channels":{"items":{"$ref":"#/components/schemas/StrategyCopySampleStepType"},"type":"array","title":"Channels","description":"The step types its copy is written for, sorted."},"copy_steps":{"type":"integer","title":"Copy Steps","description":"How many of its steps hold a message for the prospect, across its sequences: an invitation sent bare holds none."},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At","description":"Set once the library no longer offers it; only a read asking for retired samples returns one."},"status":{"$ref":"#/components/schemas/CustomerCopySampleStatus","description":"`proposed` until the customer agrees to it, then `validated`."},"language":{"type":"string","title":"Language","description":"The language it is written in, ISO 639-1."},"formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}],"description":"Its register; null where the copy uses neither."},"lemlist_campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemlist Campaign Id","description":"The customer's Lemlist campaign it was drawn from, its `cam_…`; its copy may have changed since."},"sequences":{"items":{"$ref":"#/components/schemas/StrategyCopySampleSequenceResponse"},"type":"array","title":"Sequences","description":"One for most samples. When there are several, each prospect runs exactly one of them."},"variables":{"items":{"$ref":"#/components/schemas/CopySampleVariableResponse"},"type":"array","title":"Variables","description":"Every variable its copy reads that is neither a live `strategy_token` nor a Lemlist variable, sorted by name."},"customer_description":{"type":"string","title":"Customer Description","description":"What every customer sample is read with: that its facts are the customer's own, and what its status says."},"revision":{"type":"integer","title":"Revision","description":"The library's revision the sample was read at: what a write names as its `base_revision`."}},"type":"object","required":["key","intents","name","description","channels","copy_steps","updated_at","retired_at","status","language","formality","lemlist_campaign_id","sequences","variables","customer_description","revision"],"title":"CustomerCopySampleDetailResponse"},"CustomerCopySamplePatch":{"properties":{"intents":{"anyOf":[{"items":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$"},"type":"array","minItems":1},{"type":"null"}],"title":"Intents","description":"Replaces the whole list."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sequences":{"anyOf":[{"items":{"$ref":"#/components/schemas/StrategyCopySampleSequence"},"type":"array"},{"type":"null"}],"title":"Sequences","description":"Replaces every sequence."},"status":{"anyOf":[{"$ref":"#/components/schemas/CustomerCopySampleStatus"},{"type":"null"}]},"language":{"anyOf":[{"type":"string","pattern":"^\\w{2}$"},{"type":"null"}],"title":"Language"},"formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}]},"lemlist_campaign_id":{"anyOf":[{"type":"string","pattern":"^cam_[A-Za-z0-9]+$"},{"type":"null"}],"title":"Lemlist Campaign Id"},"variables":{"anyOf":[{"items":{"$ref":"#/components/schemas/CopySampleVariable"},"type":"array"},{"type":"null"}],"title":"Variables","description":"Replaces the whole list."}},"additionalProperties":false,"type":"object","title":"CustomerCopySamplePatch"},"CustomerCopySampleRecord":{"properties":{"key":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Key","description":"Unique among its owner's samples, never renamed: other services may store it."},"intents":{"items":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$"},"type":"array","minItems":1,"title":"Intents","description":"The live `strategy_intent` keys whose copy is written from it. An intent no sample names is written with none."},"name":{"type":"string","title":"Name","description":"The campaign's name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What is particular to it: what it targeted, how its sequences divide the prospects, and the defects it ships with."},"sequences":{"items":{"$ref":"#/components/schemas/StrategyCopySampleSequence"},"type":"array","minItems":1,"title":"Sequences","description":"One for most samples. When there are several, each prospect runs exactly one of them."},"status":{"$ref":"#/components/schemas/CustomerCopySampleStatus","description":"`proposed` until the customer agrees to it, then `validated`."},"language":{"type":"string","pattern":"^\\w{2}$","title":"Language","description":"The language it is written in, ISO 639-1."},"formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}],"description":"Its register, null where the copy uses neither."},"lemlist_campaign_id":{"anyOf":[{"type":"string","pattern":"^cam_[A-Za-z0-9]+$"},{"type":"null"}],"title":"Lemlist Campaign Id","description":"The customer's Lemlist campaign it was drawn from, its `cam_…`. The sample keeps its own copy: the campaign's may have changed since."},"variables":{"items":{"$ref":"#/components/schemas/CopySampleVariable"},"type":"array","title":"Variables","description":"Every variable its copy reads that is neither a live `strategy_token` nor a Lemlist variable, sorted by name, and none other.","default":[]}},"additionalProperties":false,"type":"object","required":["key","intents","name","sequences","status","language"],"title":"CustomerCopySampleRecord","description":"A customer sample's every field."},"CustomerCopySampleStatus":{"type":"string","enum":["proposed","validated"],"title":"CustomerCopySampleStatus","description":"Where a customer's sample stands with the customer."},"CustomerCopySampleSummaryResponse":{"properties":{"key":{"type":"string","title":"Key"},"intents":{"items":{"type":"string"},"type":"array","title":"Intents","description":"The `strategy_intent` keys it is written for, sorted. How to write for an intent is that intent's guidance."},"name":{"type":"string","title":"Name","description":"The campaign's name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What is particular to it: what it targeted, how its sequences divide the prospects, and the defects it ships with."},"channels":{"items":{"$ref":"#/components/schemas/StrategyCopySampleStepType"},"type":"array","title":"Channels","description":"The step types its copy is written for, sorted."},"copy_steps":{"type":"integer","title":"Copy Steps","description":"How many of its steps hold a message for the prospect, across its sequences: an invitation sent bare holds none."},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At","description":"Set once the library no longer offers it; only a read asking for retired samples returns one."},"status":{"$ref":"#/components/schemas/CustomerCopySampleStatus","description":"`proposed` until the customer agrees to it, then `validated`."},"language":{"type":"string","title":"Language","description":"The language it is written in, ISO 639-1."},"formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}],"description":"Its register; null where the copy uses neither."},"lemlist_campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemlist Campaign Id","description":"The customer's Lemlist campaign it was drawn from, its `cam_…`; its copy may have changed since."}},"type":"object","required":["key","intents","name","description","channels","copy_steps","updated_at","retired_at","status","language","formality","lemlist_campaign_id"],"title":"CustomerCopySampleSummaryResponse"},"CustomerCopySamplesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerCopySampleSummaryResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."},"revision":{"type":"integer","title":"Revision","description":"The library's revision the page was read at: what a write names as its `base_revision`."}},"type":"object","required":["items","next_cursor","total_count","revision"],"title":"CustomerCopySamplesPage"},"CustomerCreditBalanceResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether a reservation that does not fit is refused."},"total":{"type":"integer","title":"Total"},"reserved":{"type":"integer","title":"Reserved"},"available":{"type":"integer","title":"Available"},"sf_account_id":{"type":"string","title":"Sf Account Id"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"recent_refusals":{"type":"integer","title":"Recent Refusals","description":"Reservations refused for insufficient credits over the last 30 days in Paris, today included."},"last_refused_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Refused At","description":"When a reservation was last refused for insufficient credits, ever."}},"type":"object","required":["enabled","total","reserved","available","sf_account_id","name","is_active","recent_refusals","last_refused_at"],"title":"CustomerCreditBalanceResponse"},"CustomerCreditBalancesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerCreditBalanceResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CustomerCreditBalancesPage"},"CustomerCrmRecordUrlsOutput":{"properties":{"contact_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Url"},"account_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Url"}},"type":"object","required":["contact_url","account_url"],"title":"CustomerCrmRecordUrlsOutput"},"CustomerEventKind":{"type":"string","enum":["created","updated","activated","deactivated"],"title":"CustomerEventKind","description":"What a write did to a customer, as its event log records it."},"CustomerEventResponse":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"$ref":"#/components/schemas/CustomerEventKind"},"changes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Changes","description":"On `created`, the fields the customer was registered with; on `updated`, `[old, new]` for each field a re-registration, a rename, an offer or SQL target change, or a strategy-scan opt-in or opt-out moved; null on the other kinds."},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}],"description":"The machine that wrote the event; null when a signed-in Kinde user registered the customer through the tenant API."},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","changes","caller","actor","agent_origin","created_at"],"title":"CustomerEventResponse"},"CustomerEventsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerEventResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CustomerEventsPage"},"CustomerFormalityOutput":{"properties":{"sf_account_id":{"type":"string","title":"Sf Account Id"},"default_formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}]}},"type":"object","required":["sf_account_id","default_formality"],"title":"CustomerFormalityOutput"},"CustomerFormalityUpdatePayload":{"properties":{"default_formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}],"description":"The register ai-agents writes this customer's French copy in when the campaign names none: `vous` or `tu` for every contact. null clears it, and ai-agents then takes the register from the customer context, or per contact on HPP copy."}},"additionalProperties":false,"type":"object","required":["default_formality"],"title":"CustomerFormalityUpdatePayload"},"CustomerLanguageOutput":{"properties":{"sf_account_id":{"type":"string","title":"Sf Account Id"},"default_language":{"type":"string","title":"Default Language"}},"type":"object","required":["sf_account_id","default_language"],"title":"CustomerLanguageOutput"},"CustomerLanguageUpdatePayload":{"properties":{"default_language":{"type":"string","pattern":"^\\w{2}$","title":"Default Language","description":"ISO 639-1, case-insensitive and stored in lower case: the language ai-agents writes this customer's copy in when the campaign names none."}},"additionalProperties":false,"type":"object","required":["default_language"],"title":"CustomerLanguageUpdatePayload"},"CustomerLemlistUpdateOutput":{"properties":{"id":{"type":"integer","title":"Id"},"lemlist_team_id":{"type":"string","title":"Lemlist Team Id"},"has_lemlist_api_key":{"type":"boolean","title":"Has Lemlist Api Key"}},"type":"object","required":["id","lemlist_team_id","has_lemlist_api_key"],"title":"CustomerLemlistUpdateOutput"},"CustomerLemlistUpdatePayload":{"properties":{"lemlist_api_key":{"type":"string","minLength":1,"title":"Lemlist Api Key"},"lemlist_team_id":{"type":"string","minLength":1,"title":"Lemlist Team Id"}},"type":"object","required":["lemlist_api_key","lemlist_team_id"],"title":"CustomerLemlistUpdatePayload"},"CustomerMessagePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/CustomerMessageSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"CustomerMessagePage"},"CustomerMessageSummary":{"properties":{"id":{"type":"string","title":"Id"},"thread_id":{"type":"string","title":"Thread Id"},"mailbox":{"$ref":"#/components/schemas/MailboxRef"},"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction"},"subject":{"type":"string","title":"Subject"},"from":{"anyOf":[{"$ref":"#/components/schemas/EmailAddress"},{"type":"null"}]},"to":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"To"},"cc":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"Cc"},"snippet":{"type":"string","title":"Snippet"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"rfc_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc Message Id"},"in_reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In Reply To"},"label":{"anyOf":[{"$ref":"#/components/schemas/GmailMessageLabel"},{"type":"null"}],"description":"Clay's classification, or null until Clay has labelled the message."},"sub_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Label","description":"The label's subcategory, when Clay gave one."},"provider_refs":{"$ref":"#/components/schemas/ProviderRefs"},"customer":{"$ref":"#/components/schemas/CustomerRef"}},"type":"object","required":["id","thread_id","mailbox","direction","subject","from","to","cc","snippet","sent_at","received_at","rfc_message_id","in_reply_to","label","sub_label","provider_refs","customer"],"title":"CustomerMessageSummary"},"CustomerMetricsDaily":{"properties":{"customer_name":{"type":"string","title":"Customer Name"},"nb_companies":{"type":"integer","title":"Nb Companies"},"nb_linkedin_sent_events":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nb Linkedin Sent Events"},"nb_people_contacted":{"type":"integer","title":"Nb People Contacted"},"nb_people_contacted_by_email":{"type":"integer","title":"Nb People Contacted By Email"},"nb_people_contacted_other":{"type":"integer","title":"Nb People Contacted Other"},"nb_people_interested":{"type":"integer","title":"Nb People Interested"},"nb_people_interested_email":{"type":"integer","title":"Nb People Interested Email"},"nb_people_interested_linkedin":{"type":"integer","title":"Nb People Interested Linkedin"},"nb_people_interested_other":{"type":"integer","title":"Nb People Interested Other"},"nb_people_received_invite_linkedin":{"type":"integer","title":"Nb People Received Invite Linkedin"},"nb_people_received_visit_linkedin":{"type":"integer","title":"Nb People Received Visit Linkedin"},"nb_people_who_emitted_bad_timing_objection":{"type":"integer","title":"Nb People Who Emitted Bad Timing Objection"},"nb_people_who_emitted_competitors_objection":{"type":"integer","title":"Nb People Who Emitted Competitors Objection"},"nb_people_who_emitted_fwd_objection":{"type":"integer","title":"Nb People Who Emitted Fwd Objection"},"nb_people_who_emitted_internal_other_objection":{"type":"integer","title":"Nb People Who Emitted Internal Other Objection"},"nb_people_who_emitted_internal_process_objection":{"type":"integer","title":"Nb People Who Emitted Internal Process Objection"},"nb_people_who_emitted_wrong_persona_objection":{"type":"integer","title":"Nb People Who Emitted Wrong Persona Objection"},"nb_people_who_replied":{"type":"integer","title":"Nb People Who Replied"},"team_id":{"type":"string","title":"Team Id"},"extracted_day":{"type":"string","format":"date-time","title":"Extracted Day"},"nb_people_contacted_linkedin":{"type":"integer","title":"Nb People Contacted Linkedin"},"nb_people_contacted_interested_email_in_the_future":{"type":"integer","title":"Nb People Contacted Interested Email In The Future"},"nb_people_contacted_interested_linkedin_in_the_future":{"type":"integer","title":"Nb People Contacted Interested Linkedin In The Future"},"nb_people_contacted_who_replied_in_the_future":{"type":"integer","title":"Nb People Contacted Who Replied In The Future"},"nb_people_contacted_interested_in_the_future":{"type":"integer","title":"Nb People Contacted Interested In The Future"}},"type":"object","required":["customer_name","nb_companies","nb_people_contacted","nb_people_contacted_by_email","nb_people_contacted_other","nb_people_interested","nb_people_interested_email","nb_people_interested_linkedin","nb_people_interested_other","nb_people_received_invite_linkedin","nb_people_received_visit_linkedin","nb_people_who_emitted_bad_timing_objection","nb_people_who_emitted_competitors_objection","nb_people_who_emitted_fwd_objection","nb_people_who_emitted_internal_other_objection","nb_people_who_emitted_internal_process_objection","nb_people_who_emitted_wrong_persona_objection","nb_people_who_replied","team_id","extracted_day","nb_people_contacted_linkedin","nb_people_contacted_interested_email_in_the_future","nb_people_contacted_interested_linkedin_in_the_future","nb_people_contacted_who_replied_in_the_future","nb_people_contacted_interested_in_the_future"],"title":"CustomerMetricsDaily"},"CustomerMetricsMonthly":{"properties":{"customer_name":{"type":"string","title":"Customer Name"},"nb_companies":{"type":"integer","title":"Nb Companies"},"nb_linkedin_sent_events":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nb Linkedin Sent Events"},"nb_people_contacted":{"type":"integer","title":"Nb People Contacted"},"nb_people_contacted_by_email":{"type":"integer","title":"Nb People Contacted By Email"},"nb_people_contacted_other":{"type":"integer","title":"Nb People Contacted Other"},"nb_people_interested":{"type":"integer","title":"Nb People Interested"},"nb_people_interested_email":{"type":"integer","title":"Nb People Interested Email"},"nb_people_interested_linkedin":{"type":"integer","title":"Nb People Interested Linkedin"},"nb_people_interested_other":{"type":"integer","title":"Nb People Interested Other"},"nb_people_received_invite_linkedin":{"type":"integer","title":"Nb People Received Invite Linkedin"},"nb_people_received_visit_linkedin":{"type":"integer","title":"Nb People Received Visit Linkedin"},"nb_people_who_emitted_bad_timing_objection":{"type":"integer","title":"Nb People Who Emitted Bad Timing Objection"},"nb_people_who_emitted_competitors_objection":{"type":"integer","title":"Nb People Who Emitted Competitors Objection"},"nb_people_who_emitted_fwd_objection":{"type":"integer","title":"Nb People Who Emitted Fwd Objection"},"nb_people_who_emitted_internal_other_objection":{"type":"integer","title":"Nb People Who Emitted Internal Other Objection"},"nb_people_who_emitted_internal_process_objection":{"type":"integer","title":"Nb People Who Emitted Internal Process Objection"},"nb_people_who_emitted_wrong_persona_objection":{"type":"integer","title":"Nb People Who Emitted Wrong Persona Objection"},"nb_people_who_replied":{"type":"integer","title":"Nb People Who Replied"},"team_id":{"type":"string","title":"Team Id"},"extracted_month":{"type":"string","format":"date-time","title":"Extracted Month"},"nb_people_contacted_interested_in_the_future":{"type":"integer","title":"Nb People Contacted Interested In The Future"},"nb_people_who_replied_linkedin":{"type":"integer","title":"Nb People Who Replied Linkedin"},"nb_people_who_replied_email":{"type":"integer","title":"Nb People Who Replied Email"},"nb_people_contacted_interested_email_in_the_future":{"type":"integer","title":"Nb People Contacted Interested Email In The Future"},"nb_people_contacted_interested_linkedin_in_the_future":{"type":"integer","title":"Nb People Contacted Interested Linkedin In The Future"},"nb_people_contacted_who_replied_in_the_future":{"type":"integer","title":"Nb People Contacted Who Replied In The Future"}},"type":"object","required":["customer_name","nb_companies","nb_people_contacted","nb_people_contacted_by_email","nb_people_contacted_other","nb_people_interested","nb_people_interested_email","nb_people_interested_linkedin","nb_people_interested_other","nb_people_received_invite_linkedin","nb_people_received_visit_linkedin","nb_people_who_emitted_bad_timing_objection","nb_people_who_emitted_competitors_objection","nb_people_who_emitted_fwd_objection","nb_people_who_emitted_internal_other_objection","nb_people_who_emitted_internal_process_objection","nb_people_who_emitted_wrong_persona_objection","nb_people_who_replied","team_id","extracted_month","nb_people_contacted_interested_in_the_future","nb_people_who_replied_linkedin","nb_people_who_replied_email","nb_people_contacted_interested_email_in_the_future","nb_people_contacted_interested_linkedin_in_the_future","nb_people_contacted_who_replied_in_the_future"],"title":"CustomerMetricsMonthly"},"CustomerOffer":{"type":"string","enum":["performance","corporate","data"],"title":"CustomerOffer","description":"What a customer bought from Scalability."},"CustomerOfferOutput":{"properties":{"sf_account_id":{"type":"string","title":"Sf Account Id"},"offer":{"anyOf":[{"$ref":"#/components/schemas/CustomerOffer"},{"type":"null"}]},"sql_target_per_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sql Target Per Month"}},"type":"object","required":["sf_account_id","offer","sql_target_per_month"],"title":"CustomerOfferOutput"},"CustomerOfferUpdatePayload":{"properties":{"offer":{"anyOf":[{"$ref":"#/components/schemas/CustomerOffer"},{"type":"null"}]},"sql_target_per_month":{"anyOf":[{"type":"integer","maximum":2147483647.0,"minimum":0.0},{"type":"null"}],"title":"Sql Target Per Month","description":"SQL aimed at each month, the same every month."}},"additionalProperties":false,"type":"object","minProperties":1,"title":"CustomerOfferUpdatePayload","description":"The fields to change: one left out stays as it is, and `null` clears it."},"CustomerPortfolio":{"properties":{"customer_id":{"type":"integer","title":"Customer Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["customer_id","name"],"title":"CustomerPortfolio"},"CustomerRef":{"properties":{"sf_account_id":{"type":"string","title":"Sf Account Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["sf_account_id","name"],"title":"CustomerRef","description":"The customer whose mailbox stored a message."},"CustomerStrategyOutput":{"properties":{"sf_account_id":{"type":"string","title":"Sf Account Id"},"strategy_scan_enabled":{"type":"boolean","title":"Strategy Scan Enabled"}},"type":"object","required":["sf_account_id","strategy_scan_enabled"],"title":"CustomerStrategyOutput"},"CustomerStrategyUpdatePayload":{"properties":{"strategy_scan_enabled":{"type":"boolean","title":"Strategy Scan Enabled","description":"Whether ai-agents' daily strategy scan starts a run for this customer."}},"additionalProperties":false,"type":"object","required":["strategy_scan_enabled"],"title":"CustomerStrategyUpdatePayload"},"CustomerUpdatePayload":{"properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Name","description":"Stripped, and refused when blank. Kinde, ai-agents and the Hub are brought in line with it."},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Deactivating is destructive: the next drain deletes the customer's Kinde organization and every membership in it, and closes its Hub. Reactivating mints a new organization rather than restoring the old one."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website","description":"Stripped; a blank string clears it. ai-agents and the Hub are brought in line with it. A later closed-won re-post keeps it: Salesforce only fills a website the customer lacks."},"interested_forward_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interested Forward Email","description":"Where interested replies are forwarded, from the Scala mailbox. Stripped; a blank string clears it. Nothing else is told: no provisioning target holds it."},"objection_forward_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objection Forward Email","description":"Where objection replies are forwarded, from the Scala mailbox. Stripped; a blank string clears it. Nothing else is told: no provisioning target holds it."}},"additionalProperties":false,"type":"object","title":"CustomerUpdatePayload","description":"The customer fields a caller may change. One left out, or null, stays as it is."},"CustomersPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GetCustomersOutput"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"CustomersPage"},"DeleteCRMReadMappingPayload":{"properties":{"crm_field_name":{"type":"string","title":"Crm Field Name"},"scalability_field":{"anyOf":[{"type":"string","enum":["account_name","account_website","account_linkedin_url"]},{"type":"string","enum":["contact_first_name","contact_last_name","contact_email","contact_linkedin_url","phone"]},{"type":"string","enum":["opportunity_amount","opportunity_is_won","opportunity_is_lost","opportunity_is_closed","opportunity_close_date","opportunity_creation_date","opportunity_name","opportunity_stage","opportunity_pipeline"]}],"title":"Scalability Field"}},"type":"object","required":["crm_field_name","scalability_field"],"title":"DeleteCRMReadMappingPayload"},"DeleteCRMWriteMappingPayload":{"properties":{"mapping_id":{"type":"integer","title":"Mapping Id"}},"type":"object","required":["mapping_id"],"title":"DeleteCRMWriteMappingPayload"},"DisableCustomerEdgesRefreshSchedulesPayload":{"properties":{"sf_account_id":{"type":"string","minLength":1,"title":"Sf Account Id"}},"type":"object","required":["sf_account_id"],"title":"DisableCustomerEdgesRefreshSchedulesPayload"},"DisabledEdgesRefreshSchedulesResponse":{"properties":{"disabled_count":{"type":"integer","title":"Disabled Count","description":"The client's schedules this call disabled; those already disabled are left as they were and not counted."}},"type":"object","required":["disabled_count"],"title":"DisabledEdgesRefreshSchedulesResponse"},"DismissStrategyCampaignSuggestionPayload":{"properties":{"reason":{"type":"string","maxLength":4000,"minLength":1,"title":"Reason","description":"Why it is turned down. The strategic agent reads it before suggesting the same again."}},"additionalProperties":false,"type":"object","required":["reason"],"title":"DismissStrategyCampaignSuggestionPayload"},"DistributionValue":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"}],"title":"Value","description":"A value of the field in the matched set, or a bucket's label."},"count":{"type":"integer","title":"Count","description":"Matched records with this value."},"in_crm_count":{"type":"integer","title":"In Crm Count","description":"Those of them already in the customer's CRM."}},"type":"object","required":["value","count","in_crm_count"],"title":"DistributionValue"},"DomainAvailability":{"properties":{"is_available":{"type":"boolean","title":"Is Available"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"domain":{"type":"string","title":"Domain"},"active_period_in_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Period In Year"},"price":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Price"}},"type":"object","required":["is_available","domain"],"title":"DomainAvailability"},"DomainGeneratorPayload":{"properties":{"customer_name":{"type":"string","maxLength":255,"title":"Customer Name"},"prefixes":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Prefixes"},"suffixes":{"items":{"type":"string"},"type":"array","maxItems":50,"title":"Suffixes"}},"type":"object","required":["customer_name","prefixes","suffixes"],"title":"DomainGeneratorPayload"},"DuplicateListPayload":{"properties":{"name":{"type":"string","title":"Name"},"target_customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Customer Id"},"is_scala_lib":{"type":"boolean","title":"Is Scala Lib","default":false}},"type":"object","required":["name","target_customer_id"],"title":"DuplicateListPayload"},"DynamicCompanyProjectionRequest":{"properties":{"crm_data_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Crm Data Fields"},"qf_data_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/QfDataFieldRequest"},"type":"array"},{"type":"null"}],"title":"Qf Data Fields"}},"additionalProperties":false,"type":"object","title":"DynamicCompanyProjectionRequest"},"DynamicProfileProjectionRequest":{"properties":{"crm_data_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Crm Data Fields"},"qf_data_fields":{"anyOf":[{"items":{"$ref":"#/components/schemas/QfDataFieldRequest"},"type":"array"},{"type":"null"}],"title":"Qf Data Fields"}},"additionalProperties":false,"type":"object","title":"DynamicProfileProjectionRequest"},"EdgesActionAvailability":{"type":"string","enum":["available","unavailable","unreadable"],"title":"EdgesActionAvailability","description":"Whether an account can run one of the back office's actions, as far as Edges told."},"EdgesActionConsumption":{"properties":{"action_slug":{"type":"string","title":"Action Slug"},"credits_used":{"type":"number","title":"Credits Used"},"runs_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Runs Count"}},"type":"object","required":["action_slug","credits_used"],"title":"EdgesActionConsumption"},"EdgesCachedActionLimits":{"properties":{"identity_uid":{"type":"string","title":"Identity Uid"},"action_slug":{"type":"string","title":"Action Slug"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"},"standard_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Standard Level"},"limits":{"items":{"$ref":"#/components/schemas/EdgesLimit"},"type":"array","title":"Limits","default":[]},"fetched_at":{"type":"string","format":"date-time","title":"Fetched At","description":"When Edges evaluated these limits. They are read at most every 15 minutes."}},"type":"object","required":["identity_uid","action_slug","fetched_at"],"title":"EdgesCachedActionLimits","description":"An action's limits on one account, as Edges evaluated them at `fetched_at`."},"EdgesIdentityAction":{"properties":{"action_slug":{"type":"string","title":"Action Slug"},"availability":{"$ref":"#/components/schemas/EdgesActionAvailability"},"limits":{"anyOf":[{"$ref":"#/components/schemas/EdgesCachedActionLimits"},{"type":"null"}],"description":"The action's limits on the account; set only when `available`."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Why the limits could not be read; set only when `unreadable`."}},"type":"object","required":["action_slug","availability","limits","error"],"title":"EdgesIdentityAction","description":"One of the back office's actions on one account: whether it can run, and its limits."},"EdgesIdentityWithLimits":{"properties":{"uid":{"type":"string","title":"Uid","description":"The unique identifier of the identity"},"name":{"type":"string","title":"Name","description":"The name of the identity"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type","description":"`standard` or `engagement`."},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"is_active":{"type":"boolean","title":"Is Active","default":false},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"linkedin":{"anyOf":[{"$ref":"#/components/schemas/EdgesLinkedInAccount"},{"type":"null"}],"description":"The identity's LinkedIn account; null when it has none, or when `read_error` says it could not be read."},"read_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Read Error","description":"Why the identity's LinkedIn account could not be read. Set, `linkedin` is null and `actions` empty."},"actions":{"items":{"$ref":"#/components/schemas/EdgesIdentityAction"},"type":"array","title":"Actions","description":"One entry per action the back office runs, in the same order for every identity, when the account is usable (`VALID` or `LIMIT_REACHED`); empty otherwise."}},"type":"object","required":["uid","name","linkedin","read_error","actions"],"title":"EdgesIdentityWithLimits","description":"An identity, its LinkedIn account and that account's limits on the back office's actions."},"EdgesLimit":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At"},"max_limit":{"type":"number","title":"Max Limit"},"consumed":{"type":"number","title":"Consumed"},"has_reached_limit":{"type":"boolean","title":"Has Reached Limit"},"remaining":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Remaining"},"last_consumption_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Consumption At"},"first_consumption_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Consumption At"},"available_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Available At"}},"type":"object","required":["id","name","slug","max_limit","consumed","has_reached_limit"],"title":"EdgesLimit","description":"One of an action's limits on one account, over a 24-hour sliding window."},"EdgesLinkedInAccount":{"properties":{"uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Uid"},"identity_uid":{"type":"string","title":"Identity Uid"},"status":{"type":"string","title":"Status","description":"`VALID`, `INVALID`, `PENDING` or `LIMIT_REACHED`."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level","description":"The LinkedIn licence: `Classic`, `Sales Navigator`, `Premium` or `Recruiter Lite`."},"is_shared":{"type":"boolean","title":"Is Shared","default":false},"meta":{"anyOf":[{"$ref":"#/components/schemas/EdgesLinkedInAccountMeta"},{"type":"null"}]},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["identity_uid","status"],"title":"EdgesLinkedInAccount","description":"An identity's LinkedIn account: whether it is connected, and its licence.\n\nA subset of Edges' account model, in its names. Left out are the owner's contact details and\nhow the account authenticates, which nothing here reads."},"EdgesLinkedInAccountMeta":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","title":"EdgesLinkedInAccountMeta","description":"The part of Edges' account `meta` served on: no email or phone of the account's owner."},"EdgesMonthlyCadence":{"properties":{"kind":{"type":"string","const":"monthly","title":"Kind"},"day_of_month":{"type":"integer","maximum":28.0,"minimum":1.0,"title":"Day Of Month","description":"Up to the 28th, so it runs every month, February included."},"hour_utc":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour Utc","description":"The hour it is launched at, on the hour, in UTC."}},"type":"object","required":["kind","day_of_month","hour_utc"],"title":"EdgesMonthlyCadence"},"EdgesRefreshConflict":{"properties":{"code":{"$ref":"#/components/schemas/EdgesRefreshConflictCode"},"detail":{"type":"string","title":"Detail","description":"The reason in words, for a person: read `code`, not this."}},"type":"object","required":["code","detail"],"title":"EdgesRefreshConflict","description":"The 409 a refresh's estimate or launch answers: why, as a code and in words."},"EdgesRefreshConflictCode":{"type":"string","enum":["no_sales_navigator_account","idempotency_key_reused","schedule_disabled"],"title":"EdgesRefreshConflictCode","description":"Why a refresh or its schedule cannot be changed as asked, as the 409's `code`."},"EdgesRefreshCredits":{"properties":{"search":{"type":"integer","title":"Search","description":"One credit per profile the search returns."},"enrichment_at_most":{"type":"integer","title":"Enrichment At Most","description":"One per profile enriched. At most every profile found: those enriched recently are left out, which only the search tells."},"estimate":{"type":"number","title":"Estimate","description":"What this estimate itself spent."}},"type":"object","required":["search","enrichment_at_most","estimate"],"title":"EdgesRefreshCredits","description":"The credits a refresh spends, at Edges' published rates."},"EdgesRefreshEstimateResponse":{"properties":{"total_leads":{"type":"integer","title":"Total Leads","description":"Every result of the search, as Sales Navigator counts."},"results":{"type":"integer","title":"Results","description":"The profiles a refresh would take: at most `max_results`."},"credits":{"$ref":"#/components/schemas/EdgesRefreshCredits"},"search_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Search Days","description":"Days of the accounts' search limit the search takes, today's remainder first; null when no account has any."},"enrichment_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enrichment Days","description":"Days of the accounts' extraction limit the enrichment takes at most."},"days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days","description":"The longer of the two."},"identity_uids":{"items":{"type":"string"},"type":"array","title":"Identity Uids","description":"The Sales Navigator accounts a refresh runs on."}},"type":"object","required":["total_leads","results","credits","search_days","enrichment_days","days","identity_uids"],"title":"EdgesRefreshEstimateResponse","description":"What a refresh of a search would find and spend, and how long its accounts take."},"EdgesRefreshResponse":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"$ref":"#/components/schemas/EdgesRefreshStatus"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"schedule_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Schedule Id","description":"The schedule that launched it; null by hand."},"source":{"$ref":"#/components/schemas/EdgesRefreshSource","description":"Where its profiles come from: a Sales Navigator search, or a warehouse query, which runs no search and is never scheduled."},"search_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Url","description":"The search; null for a warehouse query."},"search_filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/SalesNavigatorFilter"},"type":"array"},{"type":"null"}],"title":"Search Filters","description":"The search's filters read off `search_url`, sorted by type then value, without what changes from one visit of the same search to the next (`sessionId`, `recentSearchParam`); null when the URL could not be read."},"warehouse_preset":{"anyOf":[{"$ref":"#/components/schemas/WarehousePreset"},{"type":"null"}],"description":"The warehouse query's preset; null for a search."},"warehouse_params":{"anyOf":[{"$ref":"#/components/schemas/FrequentlyContactedParams"},{"$ref":"#/components/schemas/RecentlyContactedParams"},{"type":"null"}],"title":"Warehouse Params","description":"The preset's parameters, every one, defaults included; null for a search."},"selected_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Selected Count","description":"The profiles the warehouse query selected, those enriched recently already left out; null for a search."},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"The group it was launched in, if any."},"group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Name"},"max_results":{"type":"integer","title":"Max Results","description":"The search's `max_results`, or the warehouse's `limit`."},"skip_enriched_within_days":{"type":"integer","title":"Skip Enriched Within Days"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"string","const":"system"}],"title":"Caller","description":"The machine that launched it; `system` for the scheduler, on a schedule."},"actor_namespace":{"$ref":"#/components/schemas/ActorNamespace"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id","description":"Who launched it, in `actor_namespace`."},"actor_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Label"},"search_run_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Run Uid","description":"Null when Edges refused the search."},"search_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Status","description":"The search's final `EdgesRunStatus`."},"search_finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Search Finished At"},"search_output_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Search Output Count","description":"The profiles the search returned."},"already_enriched_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Already Enriched Count","description":"The profiles left out, as enriched within `skip_enriched_within_days`."},"enrich_input_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enrich Input Count","description":"The profiles sent to be enriched."},"enrich_run_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enrich Run Uid"},"enrich_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Enrich Status","description":"The enrichment's final `EdgesRunStatus`."},"enrich_finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Enrich Finished At"},"skip_reason":{"anyOf":[{"$ref":"#/components/schemas/EdgesSkipReason"},{"type":"null"}],"description":"Why the refresh stopped before enriching anyone, when it did."},"attempts":{"type":"integer","title":"Attempts","description":"Attempts at launching the enrichment since it last worked."},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error","description":"Why the last attempt at a step failed."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","status","name","schedule_id","source","search_url","search_filters","warehouse_preset","warehouse_params","selected_count","group_id","group_name","max_results","skip_enriched_within_days","caller","actor_namespace","actor_id","actor_label","search_run_uid","search_status","search_finished_at","search_output_count","already_enriched_count","enrich_input_count","enrich_run_uid","enrich_status","enrich_finished_at","skip_reason","attempts","last_error","created_at","updated_at"],"title":"EdgesRefreshResponse","description":"One refresh: its search or warehouse query, the profiles it left out, and its enrichment."},"EdgesRefreshScheduleEventKind":{"type":"string","enum":["created","paused","resumed","disabled"],"title":"EdgesRefreshScheduleEventKind","description":"What a write did to a schedule, as its event log records it."},"EdgesRefreshScheduleEventResponse":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"$ref":"#/components/schemas/EdgesRefreshScheduleEventKind"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"string","const":"system"}],"title":"Caller"},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","kind","caller","actor","agent_origin","created_at"],"title":"EdgesRefreshScheduleEventResponse"},"EdgesRefreshScheduleEventsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EdgesRefreshScheduleEventResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"EdgesRefreshScheduleEventsPage"},"EdgesRefreshScheduleResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"$ref":"#/components/schemas/EdgesRefreshScheduleStatus"},"search_url":{"type":"string","title":"Search Url"},"search_filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/SalesNavigatorFilter"},"type":"array"},{"type":"null"}],"title":"Search Filters","description":"The search's filters read off `search_url`, sorted by type then value, without what changes from one visit of the same search to the next (`sessionId`, `recentSearchParam`); null when the URL could not be read."},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id","description":"The group it is in, which every refresh it launches is in too."},"group_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Name"},"max_results":{"type":"integer","title":"Max Results"},"skip_enriched_within_days":{"type":"integer","title":"Skip Enriched Within Days"},"cadence":{"oneOf":[{"$ref":"#/components/schemas/EdgesWeeklyCadence"},{"$ref":"#/components/schemas/EdgesMonthlyCadence"}],"title":"Cadence","description":"When it is launched: once a week or once a month, at an hour in UTC. The scheduler looks every 5 minutes, so a refresh starts up to 5 minutes after its hour.","discriminator":{"propertyName":"kind","mapping":{"monthly":"#/components/schemas/EdgesMonthlyCadence","weekly":"#/components/schemas/EdgesWeeklyCadence"}}},"sf_account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sf Account Id","description":"The client it runs for, if any."},"next_run_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Run At","description":"When the scheduler next launches it; null unless `active`."},"last_launched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Launched At","description":"When the scheduler last launched it, whether the launch worked or not."},"last_refresh_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Refresh Id","description":"The refresh its last launch made, failed or not; null only when that launch failed before storing one. Every refresh it launched is listed by `GET /refreshes?schedule_id=`."},"created_by_caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"string","const":"system"}],"title":"Created By Caller"},"created_by":{"$ref":"#/components/schemas/ActorResponse","description":"Who created it, from its `created` event."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","status","search_url","search_filters","group_id","group_name","max_results","skip_enriched_within_days","cadence","sf_account_id","next_run_at","last_launched_at","last_refresh_id","created_by_caller","created_by","created_at","updated_at"],"title":"EdgesRefreshScheduleResponse","description":"One refresh schedule: what it launches, when, and what it last launched."},"EdgesRefreshScheduleStatus":{"type":"string","enum":["active","paused","disabled"],"title":"EdgesRefreshScheduleStatus"},"EdgesRefreshSchedulesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EdgesRefreshScheduleResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"EdgesRefreshSchedulesPage"},"EdgesRefreshSource":{"type":"string","enum":["sales_navigator_search","warehouse_query"],"title":"EdgesRefreshSource","description":"Where a refresh's profiles come from."},"EdgesRefreshStatus":{"type":"string","enum":["searching","preparing","enriching","finished","skipped"],"title":"EdgesRefreshStatus","description":"Where a refresh stands, read off its row."},"EdgesRefreshesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EdgesRefreshResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"EdgesRefreshesPage"},"EdgesRun":{"properties":{"id":{"type":"integer","title":"Id"},"uid":{"type":"string","title":"Uid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"scheduled_run_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled Run Name"},"scheduled_run_uid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scheduled Run Uid"},"action_name":{"type":"string","title":"Action Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"One of `EdgesRunStatus`."},"execution_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Mode","description":"`LIVE` or `ASYNC`."},"retry_count":{"type":"integer","title":"Retry Count","default":0},"output_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Count"},"last_error":{"anyOf":[{"$ref":"#/components/schemas/EdgesRunError"},{"type":"null"}]},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","uid","action_name","created_at"],"title":"EdgesRun","description":"A run of an action, in the workspace, whoever launched it."},"EdgesRunError":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"EdgesRunError"},"EdgesRunStatus":{"type":"string","enum":["CREATED","INVALID","QUEUED","SCHEDULED","BLOCKED","STOPPED","RUNNING","FAILED","PARTIAL_SUCCEEDED","SUCCEEDED"],"title":"EdgesRunStatus"},"EdgesRunsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EdgesRun"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"EdgesRunsPage"},"EdgesSchedule":{"properties":{"uid":{"type":"string","title":"Uid"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"action_name":{"type":"string","title":"Action Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"One of `EdgesScheduleStatus`."},"cron":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cron"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"postponed_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Postponed Until"},"next_execution_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Execution At"},"last_executed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Executed At"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["uid","action_name"],"title":"EdgesSchedule","description":"A recurring run of an action, which Edges launches on its cron."},"EdgesScheduleStatus":{"type":"string","enum":["ACTIVE","CANCELLED","PAUSED","COMPLETED"],"title":"EdgesScheduleStatus"},"EdgesSchedulesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EdgesSchedule"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"EdgesSchedulesPage"},"EdgesSimilarSearch":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"search_url":{"type":"string","title":"Search Url"},"search_filters":{"items":{"$ref":"#/components/schemas/SalesNavigatorFilter"},"type":"array","title":"Search Filters"},"differing_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Differing Type","description":"The one filter type whose values differ, a type only one search has included; null when both searches have the same filters."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","search_url","search_filters","differing_type","created_at"],"title":"EdgesSimilarSearch","description":"A refresh or a schedule whose search differs from another's by one filter type at most."},"EdgesSimilarSearchesResponse":{"properties":{"search_filters":{"anyOf":[{"items":{"$ref":"#/components/schemas/SalesNavigatorFilter"},"type":"array"},{"type":"null"}],"title":"Search Filters","description":"The search's filters read off `search_url`, sorted by type then value, without what changes from one visit of the same search to the next (`sessionId`, `recentSearchParam`); null when the URL could not be read."},"refreshes":{"items":{"$ref":"#/components/schemas/EdgesSimilarSearch"},"type":"array","title":"Refreshes","description":"The refreshes launched by hand, newest first, at most 100. One launched by a schedule is that schedule's search, listed under `schedules`."},"schedules":{"items":{"$ref":"#/components/schemas/EdgesSimilarSearch"},"type":"array","title":"Schedules","description":"The schedules, newest first, at most 100, the refresh's own left out."}},"type":"object","required":["search_filters","refreshes","schedules"],"title":"EdgesSimilarSearchesResponse","description":"The searches like a refresh's, to spot those that overlap before they are merged."},"EdgesSkipReason":{"type":"string","enum":["search_failed","no_results","nothing_to_enrich"],"title":"EdgesSkipReason","description":"Why a refresh stopped before enriching anyone."},"EdgesSplitSearchResponse":{"properties":{"total_leads":{"type":"integer","title":"Total Leads","description":"Every result of the search, as Sales Navigator counts."},"max_results_per_search":{"type":"integer","title":"Max Results Per Search","description":"Edges' cap on one search: 2,500."},"over_cap":{"type":"boolean","title":"Over Cap","description":"The search finds more than the cap."},"sub_searches":{"items":{"$ref":"#/components/schemas/EdgesSubSearch"},"type":"array","title":"Sub Searches","description":"Empty when the search is under the cap, over it with nothing to cut it on (a single headcount band, and one industry at most), or when the estimates left could not count the first cut (`estimates_exhausted`)."},"sub_total_leads":{"type":"integer","title":"Sub Total Leads","description":"The sub-searches' `total_leads`, summed."},"uncovered_leads":{"type":"integer","title":"Uncovered Leads","description":"`total_leads` less `sub_total_leads`: the people no band takes, such as those whose company has no headcount, or Sales Navigator's counts drifting between two calls. Negative when the sub-searches count more. 0 without sub-searches."},"still_over_cap":{"type":"integer","title":"Still Over Cap","description":"How many sub-searches are still over the cap."},"estimates":{"type":"integer","title":"Estimates","description":"The searches Edges counted, at most 20."},"estimates_exhausted":{"type":"boolean","title":"Estimates Exhausted","description":"A cut was left untried for want of estimates. A narrower search, such as one with fewer industries, may be cut where this one was not."},"credits":{"type":"number","title":"Credits","description":"What this call spent: a tenth of a credit an estimate."}},"type":"object","required":["total_leads","max_results_per_search","over_cap","sub_searches","sub_total_leads","uncovered_leads","still_over_cap","estimates","estimates_exhausted","credits"],"title":"EdgesSplitSearchResponse","description":"A search over Edges' cap, cut into sub-searches under it, each counted."},"EdgesSplitStep":{"properties":{"type":{"type":"string","title":"Type","examples":["COMPANY_HEADCOUNT"]},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"type":"object","required":["type","id","text"],"title":"EdgesSplitStep","description":"The value a cut restricted one filter type to."},"EdgesSubSearch":{"properties":{"search_url":{"type":"string","title":"Search Url","description":"The sub-search, ready to launch as a refresh."},"search_filters":{"items":{"$ref":"#/components/schemas/SalesNavigatorFilter"},"type":"array","title":"Search Filters"},"split_on":{"items":{"$ref":"#/components/schemas/EdgesSplitStep"},"type":"array","title":"Split On","description":"What it adds to the search, in order: a company headcount band, then an industry when the band was still over the cap."},"total_leads":{"type":"integer","title":"Total Leads","description":"Every result of the sub-search, as Sales Navigator counts."},"over_cap":{"type":"boolean","title":"Over Cap","description":"It still finds more than Edges' 2,500: a refresh of it takes the first 2,500."}},"type":"object","required":["search_url","search_filters","split_on","total_leads","over_cap"],"title":"EdgesSubSearch","description":"One sub-search of a split search: the search with one or two more filters."},"EdgesWeeklyCadence":{"properties":{"kind":{"type":"string","const":"weekly","title":"Kind"},"weekday":{"$ref":"#/components/schemas/Weekday"},"hour_utc":{"type":"integer","maximum":23.0,"minimum":0.0,"title":"Hour Utc","description":"The hour it is launched at, on the hour, in UTC."}},"type":"object","required":["kind","weekday","hour_utc"],"title":"EdgesWeeklyCadence"},"EdgesWorkspace":{"properties":{"uid":{"type":"string","title":"Uid"},"name":{"type":"string","title":"Name"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"credits_left":{"type":"number","title":"Credits Left","default":0},"credits_max":{"type":"integer","title":"Credits Max","default":0},"credits_used":{"type":"number","title":"Credits Used","default":0},"current_month_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Month Start","description":"Start of the current credit period."},"current_month_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Month End","description":"End of the current credit period: when credits renew."},"identities_included":{"type":"integer","title":"Identities Included","default":0},"identities_synced":{"type":"integer","title":"Identities Synced","default":0},"identities_remaining":{"type":"integer","title":"Identities Remaining","default":0}},"type":"object","required":["uid","name"],"title":"EdgesWorkspace","description":"The workspace the API token belongs to: its credits, its period and its account seats."},"EdgesWorkspaceConsumption":{"properties":{"credits_left":{"type":"number","title":"Credits Left"},"credits_used":{"type":"number","title":"Credits Used"},"credits_max":{"type":"number","title":"Credits Max"},"current_month_start":{"type":"string","format":"date-time","title":"Current Month Start"},"current_month_end":{"type":"string","format":"date-time","title":"Current Month End"},"consumptions":{"anyOf":[{"items":{"$ref":"#/components/schemas/EdgesActionConsumption"},"type":"array"},{"type":"null"}],"title":"Consumptions"}},"type":"object","required":["credits_left","credits_used","credits_max","current_month_start","current_month_end"],"title":"EdgesWorkspaceConsumption","description":"The workspace's credits over the current period, and what each action spent."},"EmailAddress":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"address":{"type":"string","title":"Address"}},"type":"object","required":["name","address"],"title":"EmailAddress"},"EmbedRequest":{"properties":{"landing_page_uid":{"type":"string","title":"Landing Page Uid"}},"type":"object","required":["landing_page_uid"],"title":"EmbedRequest"},"EmbedResponse":{"properties":{"embed_url":{"type":"string","title":"Embed Url"}},"type":"object","required":["embed_url"],"title":"EmbedResponse"},"EnrichRecordsResult":{"properties":{"execution_public_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Execution Public Id"},"status":{"type":"string","title":"Status"},"company_count":{"type":"integer","title":"Company Count"}},"type":"object","required":["status","company_count"],"title":"EnrichRecordsResult","description":"Result of triggering an on-demand Custom Data Point (QF) enrichment."},"EnrichableKeysResult":{"properties":{"status":{"type":"string","enum":["ok","no_qf_filter","nothing_to_enrich"],"title":"Status"},"company_keys":{"items":{"type":"string"},"type":"array","title":"Company Keys","default":[]},"field_keys":{"items":{"type":"string"},"type":"array","title":"Field Keys","default":[]}},"type":"object","required":["status"],"title":"EnrichableKeysResult","description":"The enrichable set of a search, resolved but not enriched.\n\nReturned by the internal route ai-agents calls. It owns enrichment, we own the\ndefinition of \"enrichable\", so it asks who qualifies and drives the run itself rather\nthan us calling back into it. ``field_keys`` are the QFs the search filtered on, i.e.\nthe ones worth enriching for these companies.\n\n``status`` separates the two empty cases, which mean different things to a caller:\n``no_qf_filter`` (no QF in the search, so the question does not apply) and\n``nothing_to_enrich`` (there is one, and everyone already has a value). Neither is an\nerror. An over-ceiling set is a 400 instead, never a truncated list."},"EnrichmentField":{"properties":{"property":{"type":"string","enum":["phone","email"],"title":"Property"},"namespace":{"type":"string","const":"enrichment","title":"Namespace","default":"enrichment"}},"type":"object","required":["property"],"title":"EnrichmentField"},"EnrichmentPlaybookPayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active"},"is_requesting_phone_numbers":{"type":"boolean","title":"Is Requesting Phone Numbers","default":false},"workflow_type":{"type":"string","const":"email_enrichment","title":"Workflow Type","default":"email_enrichment"}},"additionalProperties":false,"type":"object","required":["is_active"],"title":"EnrichmentPlaybookPayload"},"EnrichmentWriteFieldPayload":{"properties":{"namespace":{"type":"string","const":"enrichment","title":"Namespace","default":"enrichment"},"property":{"type":"string","enum":["phone","email"],"title":"Property"}},"type":"object","required":["property"],"title":"EnrichmentWriteFieldPayload"},"EstimateEdgesRefreshPayload":{"properties":{"search_url":{"type":"string","maxLength":8000,"pattern":"^https://([a-z]{2,3}\\.)?linkedin\\.com/sales/search/people.+","title":"Search Url","description":"A Sales Navigator people search URL: `https://www.linkedin.com/sales/search/people?…`."},"max_results":{"type":"integer","maximum":2500.0,"minimum":1.0,"title":"Max Results","description":"At most this many profiles from the search, up to Edges' 2,500 per URL.","default":2500}},"type":"object","required":["search_url"],"title":"EstimateEdgesRefreshPayload"},"ExcludeCustomerContactsPayload":{"properties":{"profile_keys":{"items":{"type":"string","minLength":1},"type":"array","maxItems":100,"title":"Profile Keys","default":[]},"company_keys":{"items":{"type":"string","minLength":1},"type":"array","maxItems":100,"title":"Company Keys","description":"Each names every contact of the company.","default":[]},"reason":{"$ref":"#/components/schemas/ExclusionReason"}},"additionalProperties":false,"type":"object","required":["reason"],"title":"ExcludeCustomerContactsPayload"},"ExcludeStrategyCampaignContactsPayload":{"properties":{"profile_keys":{"items":{"type":"string","minLength":1},"type":"array","maxItems":100,"title":"Profile Keys","default":[]},"company_keys":{"items":{"type":"string","minLength":1},"type":"array","maxItems":100,"title":"Company Keys","description":"Each names every contact of the company.","default":[]}},"additionalProperties":false,"type":"object","title":"ExcludeStrategyCampaignContactsPayload"},"ExclusionProgress":{"type":"string","enum":["pending","in_progress","success","error"],"title":"ExclusionProgress","description":"Where a request, or one contact's removal, stands in the worker.\n\n`error` is retried after its backoff, never given up on: a rising `attempts` is what tells\none that cannot succeed from one that has not yet."},"ExclusionQueuedResponse":{"properties":{"exclusion_id":{"type":"integer","title":"Exclusion Id"}},"type":"object","required":["exclusion_id"],"title":"ExclusionQueuedResponse"},"ExclusionReason":{"type":"string","enum":["already_a_customer","competitor","other"],"title":"ExclusionReason"},"ExclusionResponse":{"properties":{"exclusion_id":{"type":"integer","title":"Exclusion Id"},"strategy_campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Strategy Campaign Id"},"profile_keys":{"items":{"type":"string"},"type":"array","title":"Profile Keys"},"company_keys":{"items":{"type":"string"},"type":"array","title":"Company Keys"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}]},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/ExclusionProgress"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"attempts":{"type":"integer","title":"Attempts"},"applied_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Applied At"},"removals":{"items":{"$ref":"#/components/schemas/ContactRemovalResponse"},"type":"array","title":"Removals"}},"type":"object","required":["exclusion_id","strategy_campaign_id","profile_keys","company_keys","reason","requested_at","caller","actor","agent_origin","status","error","attempts","applied_at","removals"],"title":"ExclusionResponse","description":"An exclusion request, and the removal of each contact it names from what is live.\n\nSettled once `status` and every removal's `status` are `success`."},"ExclusionsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ExclusionResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"ExclusionsPage"},"FavoriteField":{"properties":{"key":{"type":"string","title":"Key"}},"type":"object","required":["key"],"title":"FavoriteField"},"FavoriteFieldOperation":{"properties":{"field":{"$ref":"#/components/schemas/FavoriteField"},"operation":{"$ref":"#/components/schemas/ArrayOperation"}},"type":"object","required":["field","operation"],"title":"FavoriteFieldOperation"},"FieldCreationResult":{"properties":{"created":{"items":{"type":"string"},"type":"array","title":"Created"},"skipped":{"items":{"type":"string"},"type":"array","title":"Skipped"},"failed":{"additionalProperties":{"type":"string"},"type":"object","title":"Failed"}},"type":"object","required":["created","skipped","failed"],"title":"FieldCreationResult"},"FieldsEntity":{"properties":{"profile_fields":{"$ref":"#/components/schemas/ProfileFieldsEntity"},"company_fields":{"$ref":"#/components/schemas/CompanyFieldsEntity"}},"type":"object","required":["profile_fields","company_fields"],"title":"FieldsEntity"},"FileStrategyCampaignSuggestionPayload":{"properties":{"kind":{"$ref":"#/components/schemas/StrategySuggestionKind","description":"`pause` on a running campaign, `resume` on a paused one."},"reason":{"type":"string","maxLength":4000,"minLength":1,"title":"Reason","description":"Why the strategic agent suggests it, in markdown as it wrote it: for display, never a format anything extracts from."},"interested_at_stake":{"type":"number","minimum":0.0,"title":"Interested At Stake","description":"The interested leads at stake over the next 30 days, which suggestions are ranked by."},"figures":{"additionalProperties":{"type":"number"},"propertyNames":{"maxLength":64,"minLength":1},"type":"object","maxProperties":30,"title":"Figures","description":"The numbers behind the reason, each named by the agent, for display: nothing reads a name in particular.","default":{}},"replacement_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Replacement Id","description":"On a pause only: the customer's campaign proposed to take this one's place, still in review."}},"additionalProperties":false,"type":"object","required":["kind","reason","interested_at_stake"],"title":"FileStrategyCampaignSuggestionPayload"},"Formality":{"type":"string","enum":["vous","tu"],"title":"Formality","description":"The register a French copy addresses its contacts in, the same for every contact."},"FrequentlyContactedParams":{"properties":{"contacted_within_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Contacted Within Days","description":"Last contacted, by any tenant, within this many days.","default":180},"extract_older_than_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Extract Older Than Days","description":"Last extracted from LinkedIn more than this many days ago, or never. A Sales Navigator search's result does not count as an extraction.","default":180},"country_code":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country Code","description":"Only the profiles of this country, as an ISO 3166-1 alpha-2 code; null for every country.","default":"FR"},"min_sent":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Min Sent","description":"Sent at least this many messages, summed over every tenant.","default":3}},"additionalProperties":false,"type":"object","title":"FrequentlyContactedParams"},"FrequentlyContactedWarehouseQuery":{"properties":{"preset":{"type":"string","const":"frequently_contacted","title":"Preset"},"params":{"$ref":"#/components/schemas/FrequentlyContactedParams","description":"The preset's parameters; each one left out takes its default.","default":{"contacted_within_days":180,"extract_older_than_days":180,"country_code":"FR","min_sent":3}}},"type":"object","required":["preset"],"title":"FrequentlyContactedWarehouseQuery","description":"The profiles contacted often and recently, all tenants together, not extracted since."},"GeneratedCampaignInfo":{"properties":{"name":{"type":"string","title":"Name"},"language":{"type":"string","title":"Language"}},"type":"object","required":["name","language"],"title":"GeneratedCampaignInfo"},"GetAudienceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"audience_type":{"$ref":"#/components/schemas/AudienceType"},"table_mode":{"$ref":"#/components/schemas/TableMode"},"search_filters":{"additionalProperties":true,"type":"object","title":"Search Filters"},"source":{"$ref":"#/components/schemas/AudienceSourceKind"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"revision":{"type":"integer","title":"Revision"},"snapshot":{"$ref":"#/components/schemas/AudienceSnapshot"}},"type":"object","required":["id","name","audience_type","table_mode","search_filters","source","intent","revision","snapshot"],"title":"GetAudienceResponse"},"GetAudiencesResponse":{"properties":{"id":{"type":"integer","title":"Id"},"customer_id":{"type":"integer","title":"Customer Id"},"name":{"type":"string","title":"Name"},"audience_type":{"$ref":"#/components/schemas/AudienceType"},"table_mode":{"$ref":"#/components/schemas/TableMode"},"search_filters":{"additionalProperties":true,"type":"object","title":"Search Filters"},"playbook_count":{"type":"integer","title":"Playbook Count"},"last_record_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Record Count"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"revision":{"type":"integer","title":"Revision"}},"type":"object","required":["id","customer_id","name","audience_type","table_mode","search_filters","playbook_count","last_record_count","created_at","deleted_at","intent","revision"],"title":"GetAudiencesResponse"},"GetCustomersOutput":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"sf_account_id":{"type":"string","title":"Sf Account Id"},"kinde_org_code":{"type":"string","title":"Kinde Org Code"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"is_active":{"type":"boolean","title":"Is Active"},"lemlist_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemlist Team Id"},"has_lemlist_api_key":{"type":"boolean","title":"Has Lemlist Api Key"},"account_manager":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Manager"}},"type":"object","required":["id","name","sf_account_id","kinde_org_code","website","industry","is_active","lemlist_team_id","has_lemlist_api_key","account_manager"],"title":"GetCustomersOutput"},"GetPlaybookProgressResponse":{"properties":{"enrichment":{"$ref":"#/components/schemas/StepStatus"},"copy":{"$ref":"#/components/schemas/StepStatus"},"matching":{"$ref":"#/components/schemas/StepStatus"},"push_to_crm":{"$ref":"#/components/schemas/StepStatus"},"task_creation":{"$ref":"#/components/schemas/StepStatus"}},"type":"object","required":["enrichment","copy","matching","push_to_crm","task_creation"],"title":"GetPlaybookProgressResponse"},"GetPlaybookResponse":{"properties":{"progress":{"$ref":"#/components/schemas/PlaybookProgress"},"tasks_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tasks Per Day"}},"type":"object","required":["progress"],"title":"GetPlaybookResponse","description":"GET /playbooks/{id} payload; extend with more fields over time."},"GmailMessageLabel":{"type":"string","enum":["interested","objection","gdpr request","automatic answer","not scalability","other","discarded"],"title":"GmailMessageLabel","description":"Top-level classification of one message. Subcategories live in ``sub_label``."},"GoogleWorkspaceOutput":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"admin_email":{"type":"string","title":"Admin Email"}},"type":"object","required":["id","name","admin_email"],"title":"GoogleWorkspaceOutput"},"GoogleWorkspaceWritePayload":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"admin_email":{"type":"string","format":"email","title":"Admin Email"}},"type":"object","required":["admin_email"],"title":"GoogleWorkspaceWritePayload"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError","required":["detail"]},"HandoffStep":{"properties":{"type":{"type":"string","const":"sendToAnotherCampaign","title":"Type","default":"sendToAnotherCampaign"},"target_sequence":{"type":"string","const":"linkedin_only","title":"Target Sequence","default":"linkedin_only"},"wait_days":{"type":"integer","minimum":0.0,"title":"Wait Days"}},"type":"object","required":["type","target_sequence","wait_days"],"title":"HandoffStep","description":"Hand the contact over to the playbook's LinkedIn-only campaign.\n\nThe cross-canal sequence can end on one, so that a contact who has had its emails goes\non to LinkedIn in the other campaign, whose senders are the ones with LinkedIn\nconnected, instead of in this one, where every sender would need it. Its gap is the\nwait after the step before it, and the time a reply has to stop the contact here:\nonce handed over, a reply to an email no longer stops it.\n\nThe campaign it names is the sequence's, not an id: the playbook's LinkedIn-only\ncampaign does not exist yet when a layout is written, so the publisher resolves it."},"IncludeExcludeMode":{"type":"string","enum":["include","exclude"],"title":"IncludeExcludeMode"},"InsufficientCredits":{"properties":{"detail":{"type":"string","title":"Detail"},"needed":{"type":"integer","title":"Needed"},"available":{"type":"integer","title":"Available"}},"type":"object","required":["detail","needed","available"],"title":"InsufficientCredits","description":"The 402 a reservation answers: what it needed and what the customer had available."},"InternalAppendCompanyListRowsPayload":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CompanyListDataItem"},"type":"array","title":"Data"}},"additionalProperties":false,"type":"object","required":["data"],"title":"InternalAppendCompanyListRowsPayload"},"InternalAppendPeopleListRowsPayload":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PeopleListDataItem"},"type":"array","title":"Data"}},"additionalProperties":false,"type":"object","required":["data"],"title":"InternalAppendPeopleListRowsPayload"},"InternalAudienceCreationPayload":{"properties":{"audience_source":{"oneOf":[{"$ref":"#/components/schemas/AudienceSourcePeopleList"},{"$ref":"#/components/schemas/AudienceSourceFilters"},{"$ref":"#/components/schemas/AudienceSourceRecords"}],"title":"Audience Source","discriminator":{"propertyName":"source_type","mapping":{"filters":"#/components/schemas/AudienceSourceFilters","people_list":"#/components/schemas/AudienceSourcePeopleList","records":"#/components/schemas/AudienceSourceRecords"}}}},"additionalProperties":false,"type":"object","required":["audience_source"],"title":"InternalAudienceCreationPayload","description":"Payload for the internal create-audience endpoint.\n\nMirrors ``InternalCreatePlaybookPayload.audience_source`` shape: pick\n``people_list`` to atomically create a fresh list + audience, ``filters``\nto create from search filters, or ``records`` to create one whose members\nare the rows passed in, before any playbook exists for it. ``audience_id``\nis excluded: \"creating\" an existing audience is not a thing."},"InternalAudiencePatchPayload":{"properties":{"name":{"type":"string","title":"Name"},"audience_type":{"$ref":"#/components/schemas/AudienceType"},"table_mode":{"$ref":"#/components/schemas/TableMode"},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"intent":{"anyOf":[{"type":"string","description":"A strategy intent key, as listed by the strategy intents route."},{"type":"null"}],"title":"Intent"},"expected_revision":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Revision"},"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"What changed and why, as the person who asked for it put it. Kept on the strategy campaign event the edit logs, for the history and for whoever reviews the campaign; ignored when it logs none."}},"additionalProperties":false,"type":"object","required":["name","audience_type","table_mode","search_filters","expected_revision"],"title":"InternalAudiencePatchPayload","description":"An audience written whole, as `AudiencePatchPayload`, with why it changed.\n\nA change to what the audience selects (its type, table mode or filters) is logged on each\nopen strategy campaign built on it, from `audience_review` on. At `copy_review` it sends the\ncampaign back to `audience_review`, the copy having been written for the audience as\nvalidated. A new name or intent alone logs nothing."},"InternalCRMSegmentCreatePayload":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"filter":{"anyOf":[{"$ref":"#/components/schemas/CRMConditionGroupSchema-Input"},{"type":"null"}]},"type":{"$ref":"#/components/schemas/CRMSegmentType"},"excluded_by_default":{"type":"boolean","title":"Excluded By Default","description":"Whether every search of the customer's excludes the segment, whether it names the segment or not. A segment with no filter cannot be.","default":false}},"additionalProperties":false,"type":"object","required":["name","filter","type"],"title":"InternalCRMSegmentCreatePayload","description":"A segment created on ``/internal``, whose name may not be blank."},"InternalCRMSegmentUpdatePayload":{"properties":{"name":{"type":"string","minLength":1,"title":"Name"},"filter":{"anyOf":[{"$ref":"#/components/schemas/CRMConditionGroupSchema-Input"},{"type":"null"}]},"excluded_by_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Excluded By Default","description":"Whether every search of the customer's excludes the segment, whether it names the segment or not. Left as it is when absent."}},"additionalProperties":false,"type":"object","required":["name","filter"],"title":"InternalCRMSegmentUpdatePayload","description":"A segment rewritten on ``/internal``, whose name may not be blank."},"InternalCompanyEntityProjectionRequest":{"properties":{"static":{"anyOf":[{"$ref":"#/components/schemas/StaticCompanyProjectionRequest"},{"type":"null"}]},"dynamic":{"anyOf":[{"$ref":"#/components/schemas/DynamicCompanyProjectionRequest"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"InternalCompanyEntityProjectionRequest"},"InternalCompanyListPayload":{"properties":{"list_name":{"type":"string","title":"List Name"},"data":{"items":{"$ref":"#/components/schemas/CompanyListDataItem"},"type":"array","title":"Data"},"type":{"type":"string","enum":["domain","linkedin_universal_name","linkedin_company_id","siren","siret","company_key"],"title":"Type"},"is_scala_lib":{"type":"boolean","title":"Is Scala Lib","default":false},"sf_account_id":{"type":"string","title":"Sf Account Id"}},"additionalProperties":false,"type":"object","required":["list_name","data","type","sf_account_id"],"title":"InternalCompanyListPayload"},"InternalCompanySearchProjectionRequest":{"properties":{"static":{"anyOf":[{"$ref":"#/components/schemas/StaticCompanyProjectionRequest"},{"type":"null"}]},"dynamic":{"anyOf":[{"$ref":"#/components/schemas/DynamicCompanyProjectionRequest"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"InternalCompanySearchProjectionRequest","description":"Nested projection shape for ``POST .../internal/.../company/search``."},"InternalCompanySearchRequest":{"properties":{"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"sample_size":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Sample Size"},"opportunities":{"type":"boolean","title":"Opportunities","default":false},"projection":{"anyOf":[{"$ref":"#/components/schemas/InternalCompanySearchProjectionRequest"},{"type":"null"}]}},"type":"object","required":["search_filters","sample_size"],"title":"InternalCompanySearchRequest","description":"Company search request for the internal endpoint.\n\n``projection`` groups ``static`` booleans and ``dynamic`` CRM field names in one\nobject, and only the flags it states are projected. A body with no ``projection``\nreads ``company_key`` and nothing else."},"InternalCreateAudienceResponse":{"properties":{"audience_id":{"type":"integer","title":"Audience Id"},"people_list_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"People List Id"}},"type":"object","required":["audience_id"],"title":"InternalCreateAudienceResponse","description":"Response for the internal create-audience endpoint."},"InternalCreateHppPlaybookPayload":{"properties":{"audience_source":{"oneOf":[{"$ref":"#/components/schemas/AudienceSourcePeopleList"},{"$ref":"#/components/schemas/AudienceSourceFilters"},{"$ref":"#/components/schemas/AudienceSourceExisting"},{"$ref":"#/components/schemas/AudienceSourceRecords"}],"title":"Audience Source","discriminator":{"propertyName":"source_type","mapping":{"audience_id":"#/components/schemas/AudienceSourceExisting","filters":"#/components/schemas/AudienceSourceFilters","people_list":"#/components/schemas/AudienceSourcePeopleList","records":"#/components/schemas/AudienceSourceRecords"}}},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_requesting_phone_numbers":{"type":"boolean","title":"Is Requesting Phone Numbers","default":false},"campaign_info":{"$ref":"#/components/schemas/PlaybookCampaignInfoPayload"},"cross_canal_steps":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array"},{"type":"null"}],"title":"Cross Canal Steps"},"linkedin_only_steps":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array"},{"type":"null"}],"title":"Linkedin Only Steps"},"hpp_campaign_public_id":{"type":"string","format":"uuid","title":"Hpp Campaign Public Id"}},"additionalProperties":false,"type":"object","required":["audience_source","campaign_info","hpp_campaign_public_id"],"title":"InternalCreateHppPlaybookPayload","description":"Payload for the internal V4 HPP create-playbook endpoint.\n\nDiffers from :class:`InternalCreatePlaybookPayload` in three ways:\n\n- ``workflow_type`` is fixed to ``CAMPAIGN_V2`` (no need to pass).\n- ``campaign_version`` is fixed to ``V4`` (set by the route).\n- ``hpp_campaign_public_id`` routes V4 step-executor callbacks to the\n  right HPP campaign on ai-agents.\n\nCampaign sequences mirror V3, trees included: ``cross_canal_steps``\npublishes as one email campaign on the sender side,\n``linkedin_only_steps`` as one LinkedIn campaign. V4 strings carry\n``{{tag}}`` placeholders that ai-agents populates per record at HPP\ncopy time, and a tag is copied to wherever the tree repeats its step,\nso one placeholder can stand at several leaves. At least one sequence\nmust be non-empty."},"InternalCreateHppPlaybookResponse":{"properties":{"people_list_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"People List Id"},"audience_id":{"type":"integer","title":"Audience Id"},"playbook_id":{"type":"integer","title":"Playbook Id"}},"type":"object","required":["audience_id","playbook_id"],"title":"InternalCreateHppPlaybookResponse"},"InternalCreatePlaybookPayload":{"properties":{"audience_source":{"oneOf":[{"$ref":"#/components/schemas/AudienceSourcePeopleList"},{"$ref":"#/components/schemas/AudienceSourceFilters"},{"$ref":"#/components/schemas/AudienceSourceExisting"},{"$ref":"#/components/schemas/AudienceSourceRecords"}],"title":"Audience Source","discriminator":{"propertyName":"source_type","mapping":{"audience_id":"#/components/schemas/AudienceSourceExisting","filters":"#/components/schemas/AudienceSourceFilters","people_list":"#/components/schemas/AudienceSourcePeopleList","records":"#/components/schemas/AudienceSourceRecords"}}},"workflow_type":{"$ref":"#/components/schemas/WorkflowType"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_requesting_phone_numbers":{"type":"boolean","title":"Is Requesting Phone Numbers","default":false},"campaign_info":{"anyOf":[{"$ref":"#/components/schemas/PlaybookCampaignInfoPayload"},{"type":"null"}]},"tasks_info":{"anyOf":[{"$ref":"#/components/schemas/PlaybookTasksInfoPayload"},{"type":"null"}]},"cross_canal_steps":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array"},{"type":"null"}],"title":"Cross Canal Steps"},"linkedin_only_steps":{"anyOf":[{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array"},{"type":"null"}],"title":"Linkedin Only Steps"}},"additionalProperties":false,"type":"object","required":["audience_source","workflow_type"],"title":"InternalCreatePlaybookPayload","description":"Payload for the internal create-playbook endpoint.\n\nFor V3 campaigns, ai-agents supplies two campaign sequences mirroring\nits own copywriting output: ``cross_canal_steps`` (the cross-channel\nsequence, mixed email + LinkedIn) becomes a single email-typed\ncampaign on the sender side; ``linkedin_only_steps`` becomes a\nLinkedIn-typed campaign. Each is published as one campaign, whole:\nstep types are not re-partitioned across the two.\n\nA sequence is a **tree**, not a list. A conditional step carries the\ntwo branches it routes into, and the publisher walks them, so the\ncaller states the shape it wants published. Whatever arrives here is\npublished as it stands, branches or none: a sequence with no\nconditional is one that wants no branch, which is what ai-agents\nbuilds when a campaign asks for no LinkedIn half.\n\nV1 callers leave both fields ``None``: their publish goes through a\ndifferent path, and it is the only one that pours a flat list into a\nlayout (``app.campaigns.v1.layout``)."},"InternalCreatePlaybookResponse":{"properties":{"people_list_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"People List Id"},"audience_id":{"type":"integer","title":"Audience Id"},"playbook_id":{"type":"integer","title":"Playbook Id"}},"type":"object","required":["audience_id","playbook_id"],"title":"InternalCreatePlaybookResponse"},"InternalCrmIntegrationResponse":{"properties":{"provider":{"anyOf":[{"$ref":"#/components/schemas/CRMProvider"},{"type":"null"}]},"is_connected":{"type":"boolean","title":"Is Connected"},"person_object":{"$ref":"#/components/schemas/CrmPersonObject"},"instance_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instance Url"}},"type":"object","required":["provider","is_connected","person_object"],"title":"InternalCrmIntegrationResponse","description":"``CrmIntegrationResponse`` as a service caller on the internal router needs it.\n\n``provider`` is nullable here and not on the twin above, because the two routers\ndisagree about what \"no CRM configured\" is. On ``/api/v1/crm/oauth/integration`` it\nis the 404 raised below, which a UI renders as \"connect a CRM\". On\n``/internal/api/v1/crm`` a 404 already means the ``sf_account_id`` resolved to no\ncustomer, and a caller that has to branch on whether the tenant has a CRM at all\ncannot tell those two apart from a status code. So there a tenant with no CRM set up\nis a 200 carrying ``provider=None``.\n\n``expires_at`` is deliberately absent: when the credential expires is the\nconnection's own business, and no service caller can act on it."},"InternalCustomerListItem":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"sf_account_id":{"type":"string","title":"Sf Account Id"},"kinde_org_code":{"type":"string","title":"Kinde Org Code"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"is_active":{"type":"boolean","title":"Is Active"},"lemlist_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemlist Team Id"},"has_lemlist_api_key":{"type":"boolean","title":"Has Lemlist Api Key"},"account_manager":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Manager"},"offer":{"anyOf":[{"$ref":"#/components/schemas/CustomerOffer"},{"type":"null"}]},"sql_target_per_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sql Target Per Month"},"strategy_scan_enabled":{"type":"boolean","title":"Strategy Scan Enabled"},"default_language":{"type":"string","title":"Default Language"},"default_formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}]},"interested_forward_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interested Forward Email"},"objection_forward_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objection Forward Email"}},"type":"object","required":["id","name","sf_account_id","kinde_org_code","website","industry","is_active","lemlist_team_id","has_lemlist_api_key","account_manager","offer","sql_target_per_month","strategy_scan_enabled","default_language","default_formality","interested_forward_email","objection_forward_email"],"title":"InternalCustomerListItem","description":"A customer as the services read it: the list's shape, plus what was sold to it.\n\nThe offer, the SQL target, whether the daily strategy scan includes it and the language and\nregister its copy falls back on are Scalability's own follow-up of a customer, so the\ntenant list does not carry them."},"InternalCustomerOutput":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"kinde_org_code":{"type":"string","title":"Kinde Org Code"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"is_active":{"type":"boolean","title":"Is Active"},"lemlist_team_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemlist Team Id"},"sf_account_id":{"type":"string","title":"Sf Account Id"},"lemlist_api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemlist Api Key"},"account_manager":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Account Manager"},"interested_slack_channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interested Slack Channel Id"},"objection_slack_channel_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objection Slack Channel Id"},"interested_forward_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Interested Forward Email"},"objection_forward_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Objection Forward Email"}},"type":"object","required":["id","name","kinde_org_code","website","industry","is_active","lemlist_team_id","sf_account_id","lemlist_api_key","account_manager","interested_slack_channel_id","objection_slack_channel_id","interested_forward_email","objection_forward_email"],"title":"InternalCustomerOutput"},"InternalCustomersPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InternalCustomerListItem"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"InternalCustomersPage"},"InternalEntityProjectionRequest":{"properties":{"static":{"anyOf":[{"$ref":"#/components/schemas/StaticProfileProjectionRequest"},{"type":"null"}]},"dynamic":{"anyOf":[{"$ref":"#/components/schemas/DynamicProfileProjectionRequest"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"InternalEntityProjectionRequest","description":"Static booleans + dynamic CRM field names for one side (profile or company)."},"InternalPatchAudienceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"revision":{"type":"integer","title":"Revision"},"strategy_campaign_events":{"items":{"$ref":"#/components/schemas/StrategyCampaignEditResponse"},"type":"array","title":"Strategy Campaign Events","description":"What the edit logged on the open strategy campaigns built on the audience, one event each: `revised`, or `reworked` when it answers the audience's send-back, with `asset` `audience`. An event at `audience_review` on a campaign that was at `copy_review` sent it back there. Empty when nothing was logged."}},"type":"object","required":["id","name","intent","revision","strategy_campaign_events"],"title":"InternalPatchAudienceResponse"},"InternalPeopleListPayload":{"properties":{"list_name":{"type":"string","title":"List Name"},"data":{"items":{"$ref":"#/components/schemas/PeopleListDataItem"},"type":"array","title":"Data"},"type":{"type":"string","enum":["profile_id","sales_navigator_id","linkedin_public_identifier","profile_key"],"title":"Type"},"is_scala_lib":{"type":"boolean","title":"Is Scala Lib","default":false},"sf_account_id":{"type":"string","title":"Sf Account Id"}},"additionalProperties":false,"type":"object","required":["list_name","data","type","sf_account_id"],"title":"InternalPeopleListPayload"},"InternalPlaybookCopyResponse":{"properties":{"playbook_id":{"type":"integer","title":"Playbook Id"},"cross_canal_steps":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array","title":"Cross Canal Steps"},"linkedin_only_steps":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array","title":"Linkedin Only Steps"}},"type":"object","required":["playbook_id","cross_canal_steps","linkedin_only_steps"],"title":"InternalPlaybookCopyResponse","description":"A CAMPAIGN_V2 playbook's copy, in the shapes ``InternalUpdatePlaybookCopyPayload`` takes."},"InternalProfileSearchProjectionRequest":{"properties":{"profile":{"anyOf":[{"$ref":"#/components/schemas/InternalEntityProjectionRequest"},{"type":"null"}]},"company":{"anyOf":[{"$ref":"#/components/schemas/InternalCompanyEntityProjectionRequest"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"InternalProfileSearchProjectionRequest","description":"Nested projection shape for ``POST .../internal/.../profile/search``."},"InternalProfileSearchRequest":{"properties":{"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"sample_size":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Sample Size"},"projection":{"anyOf":[{"$ref":"#/components/schemas/InternalProfileSearchProjectionRequest"},{"type":"null"}]}},"type":"object","required":["search_filters","sample_size"],"title":"InternalProfileSearchRequest","description":"Profile search request for the internal endpoint.\n\nProjection is a single nested ``projection`` object (same wire shape as before the\npublic API's flat fields), with per-entity ``static`` / ``dynamic`` parts. Only the\nflags the body states are projected, so a body with no ``projection`` at all reads the\nkeys and nothing else, exactly as the public route does."},"InternalRemoveListRowsPayload":{"properties":{"values":{"items":{"type":"string"},"type":"array","maxItems":1000,"minItems":1,"title":"Values","description":"The identifiers to remove, in the list's own `type`: every row holding one of them goes. An identifier the list does not hold removes nothing."}},"additionalProperties":false,"type":"object","required":["values"],"title":"InternalRemoveListRowsPayload"},"InternalUpdatePlaybookCopyPayload":{"properties":{"cross_canal_steps":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array","title":"Cross Canal Steps","default":[]},"linkedin_only_steps":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload"},{"$ref":"#/components/schemas/CreateConditionalStepPayload"},{"$ref":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"conditional":"#/components/schemas/CreateConditionalStepPayload","email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinLikeLastPost":"#/components/schemas/CreateLinkedinLikeLastPostStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload","linkedinWithdrawInvitation":"#/components/schemas/CreateLinkedinWithdrawInvitationStepPayload","sendToAnotherCampaign":"#/components/schemas/CreateSendToAnotherCampaignStepPayload"}}},"type":"array","title":"Linkedin Only Steps","default":[]},"scala_vars":{"anyOf":[{"items":{"$ref":"#/components/schemas/CampaignScalaVarsPayload"},"type":"array"},{"type":"null"}],"title":"Scala Vars"},"write_mappings":{"anyOf":[{"items":{"$ref":"#/components/schemas/PlaybookCrmWriteMappingPayload"},"type":"array"},{"type":"null"}],"title":"Write Mappings"},"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"What changed and why, as the person who asked for it put it. Kept on the strategy campaign event the edit logs, for the history and for whoever reviews the campaign; ignored when it logs none."}},"additionalProperties":false,"type":"object","title":"InternalUpdatePlaybookCopyPayload","description":"A CAMPAIGN_V2 playbook's copy, rewritten whole: both sequences, and their variables.\n\nSame shapes as at creation (``InternalCreatePlaybookPayload``). The sequences replace\nwhat is stored, a sequence left empty being cleared. ``scala_vars`` and\n``write_mappings`` are replaced only when given, a scala var or write mapping the list\nleaves out being deleted; left out, they keep what is stored. The campaign's name and\nlanguage are not part of the copy."},"InternalUpdatePlaybookCopyResponse":{"properties":{"playbook_id":{"type":"integer","title":"Playbook Id"},"strategy_campaign_event":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignEventResponse"},{"type":"null"}],"description":"What replacing the copy logged on the strategy campaign built on the playbook: `revised`, or `reworked` when it answers the copy's send-back, with `asset` `copy` and the payload's `comment`. Null when nothing was logged: no campaign is built on the playbook, or it is not at `copy_review`."}},"type":"object","required":["playbook_id","strategy_campaign_event"],"title":"InternalUpdatePlaybookCopyResponse"},"KindeOrganizationUser":{"properties":{"id":{"type":"string","title":"Id"},"roles":{"items":{"$ref":"#/components/schemas/UserRole"},"type":"array","title":"Roles"},"portfolio":{"items":{"$ref":"#/components/schemas/CustomerPortfolio"},"type":"array","title":"Portfolio","default":[]}},"type":"object","required":["id","roles"],"title":"KindeOrganizationUser"},"KindeUserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture"},"roles":{"items":{"$ref":"#/components/schemas/UserRole"},"type":"array","title":"Roles","default":[]},"joined_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Joined On"},"last_accessed_on":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Accessed On"},"is_suspended":{"type":"boolean","title":"Is Suspended","default":false},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["id","email"],"title":"KindeUserResponse"},"LabelMessageRequest":{"properties":{"label":{"$ref":"#/components/schemas/GmailMessageLabel"},"sub_label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Sub Label"}},"type":"object","required":["label"],"title":"LabelMessageRequest","description":"Clay's classification of one message. ``sub_label`` is the subcategory, when there is one."},"LaunchEdgesRefreshPayload":{"properties":{"group_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Group Id","description":"The caller's group, such as the sub-searches of one split search, all launched with the same id. scala-app only stores it and lists by it."},"group_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Group Name","description":"What the back office calls the group; only with `group_id`."},"search_url":{"type":"string","maxLength":8000,"pattern":"^https://([a-z]{2,3}\\.)?linkedin\\.com/sales/search/people.+","title":"Search Url","description":"A Sales Navigator people search URL: `https://www.linkedin.com/sales/search/people?…`."},"max_results":{"type":"integer","maximum":2500.0,"minimum":1.0,"title":"Max Results","description":"At most this many profiles from the search, up to Edges' 2,500 per URL.","default":2500},"skip_enriched_within_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Skip Enriched Within Days","description":"Leave out the profiles scala-app launched an enrichment of within this many days.","default":90},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name","description":"What the back office calls the refresh; blank is no name."},"idempotency_key":{"type":"string","maxLength":255,"minLength":1,"title":"Idempotency Key","description":"The caller's name for this launch. Sent again, it answers the launch it made rather than spending the credits twice."}},"type":"object","required":["search_url","idempotency_key"],"title":"LaunchEdgesRefreshPayload"},"LaunchFrequentlyContactedRefreshPayload":{"properties":{"group_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Group Id","description":"The caller's group, such as the sub-searches of one split search, all launched with the same id. scala-app only stores it and lists by it."},"group_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Group Name","description":"What the back office calls the group; only with `group_id`."},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name","description":"What the back office calls the refresh; blank is no name."},"limit":{"type":"integer","maximum":2500.0,"minimum":1.0,"title":"Limit","description":"Extract at most this many profiles, the first in the preset's order: most contacted first, then the oldest extraction, never extracted first. Up to 2,500."},"skip_enriched_within_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Skip Enriched Within Days","description":"Leave out the profiles scala-app launched an enrichment of within this many days.","default":90},"idempotency_key":{"type":"string","maxLength":255,"minLength":1,"title":"Idempotency Key","description":"The caller's name for this launch. Sent again, it answers the launch it made rather than spending the credits twice."},"preset":{"type":"string","const":"frequently_contacted","title":"Preset"},"params":{"$ref":"#/components/schemas/FrequentlyContactedParams","description":"The preset's parameters; each one left out takes its default.","default":{"contacted_within_days":180,"extract_older_than_days":180,"country_code":"FR","min_sent":3}}},"type":"object","required":["limit","idempotency_key","preset"],"title":"LaunchFrequentlyContactedRefreshPayload"},"LaunchRecentlyContactedRefreshPayload":{"properties":{"group_id":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Group Id","description":"The caller's group, such as the sub-searches of one split search, all launched with the same id. scala-app only stores it and lists by it."},"group_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Group Name","description":"What the back office calls the group; only with `group_id`."},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name","description":"What the back office calls the refresh; blank is no name."},"limit":{"type":"integer","maximum":2500.0,"minimum":1.0,"title":"Limit","description":"Extract at most this many profiles, the first in the preset's order: most contacted first, then the oldest extraction, never extracted first. Up to 2,500."},"skip_enriched_within_days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Skip Enriched Within Days","description":"Leave out the profiles scala-app launched an enrichment of within this many days.","default":90},"idempotency_key":{"type":"string","maxLength":255,"minLength":1,"title":"Idempotency Key","description":"The caller's name for this launch. Sent again, it answers the launch it made rather than spending the credits twice."},"preset":{"type":"string","const":"recently_contacted","title":"Preset"},"params":{"$ref":"#/components/schemas/RecentlyContactedParams","description":"The preset's parameters; each one left out takes its default.","default":{"contacted_within_days":180,"extract_older_than_days":180,"country_code":"FR"}}},"type":"object","required":["limit","idempotency_key","preset"],"title":"LaunchRecentlyContactedRefreshPayload"},"LedgerKind":{"type":"string","enum":["grant","adjust","debit","refund"],"title":"LedgerKind","description":"A change to an allocation's remaining credits.\n\nHolding and releasing credits change no balance, so they are not here: they are the\nreservation's own state."},"LemlistCampaignIntentResponse":{"properties":{"sf_account_id":{"type":"string","title":"Sf Account Id"},"lemlist_campaign_id":{"type":"string","title":"Lemlist Campaign Id"},"intent":{"type":"string","title":"Intent","description":"A strategy intent key. It is stored without a foreign key, so a key the taxonomy has since retired reads back as written."},"source":{"$ref":"#/components/schemas/LemlistCampaignIntentSource"},"strategy_campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Strategy Campaign Id","description":"The strategy campaign built on the playbook, which the intent is read from; null when the intent is the audience's."},"strategy_campaign_status":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignStatus"},{"type":"null"}],"description":"That strategy campaign's status; null when the intent is the audience's."}},"type":"object","required":["sf_account_id","lemlist_campaign_id","intent","source","strategy_campaign_id","strategy_campaign_status"],"title":"LemlistCampaignIntentResponse"},"LemlistCampaignIntentSource":{"type":"string","enum":["strategy_campaign","audience"],"title":"LemlistCampaignIntentSource","description":"Where a Lemlist campaign's intent is read from, most specific first."},"LemlistCampaignIntentsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LemlistCampaignIntentResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"LemlistCampaignIntentsPage"},"LemlistSyncStatus":{"type":"string","enum":["pending","in_progress","success","error"],"title":"LemlistSyncStatus","description":"Background Lemlist campaign push state for V3/V4 playbooks."},"LibraryPersonaPayload":{"properties":{"name":{"type":"string","title":"Name"},"job_titles_included":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Included"},"job_titles_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Excluded"},"seniority_levels":{"anyOf":[{"items":{"type":"string","enum":["Director / Head of","VP","Other","Intern / Junior","Freelance / Consultant","Assistant","CEO / Founder","Team lead","C-level"]},"type":"array"},{"type":"null"}],"title":"Seniority Levels"},"seniority_levels_mode":{"$ref":"#/components/schemas/IncludeExcludeMode"}},"additionalProperties":false,"type":"object","required":["name","job_titles_included","job_titles_excluded","seniority_levels","seniority_levels_mode"],"title":"LibraryPersonaPayload"},"LibraryPersonaResponse":{"properties":{"name":{"type":"string","title":"Name"},"job_titles_included":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Included"},"job_titles_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Excluded"},"seniority_levels":{"anyOf":[{"items":{"type":"string","enum":["Director / Head of","VP","Other","Intern / Junior","Freelance / Consultant","Assistant","CEO / Founder","Team lead","C-level"]},"type":"array"},{"type":"null"}],"title":"Seniority Levels"},"seniority_levels_mode":{"$ref":"#/components/schemas/IncludeExcludeMode"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"audience_count":{"type":"integer","title":"Audience Count"},"playbook_count":{"type":"integer","title":"Playbook Count"},"deletable":{"type":"boolean","title":"Deletable"}},"type":"object","required":["name","job_titles_included","job_titles_excluded","seniority_levels","seniority_levels_mode","id","created_at","updated_at","created_by_email","audience_count","playbook_count","deletable"],"title":"LibraryPersonaResponse"},"ListAccountsOutput":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"ListAccountsOutput"},"ListColumnField":{"properties":{"list_id":{"type":"integer","title":"List Id"},"list_type":{"type":"string","enum":["people","company"],"title":"List Type"},"column":{"type":"string","title":"Column"},"namespace":{"type":"string","const":"list","title":"Namespace","default":"list"}},"type":"object","required":["list_id","list_type","column"],"title":"ListColumnField"},"ListRole":{"type":"string","enum":["client_exclusions"],"title":"ListRole","description":"What a list is kept for, when scala-app keeps it rather than a person.\n\nA customer holds at most one list of each kind per role."},"ListRowsAppended":{"properties":{"added":{"type":"integer","title":"Added","description":"The rows whose identifiers the list did not hold."},"updated":{"type":"integer","title":"Updated","description":"The rows whose identifiers the list held with other `extra_data`: each now holds the appended `extra_data` and reads last. A row the list held as sent is neither added nor updated."}},"type":"object","required":["added","updated"],"title":"ListRowsAppended","description":"What an append changed: a list holds each tuple of identifiers once."},"ListWriteFieldPayload":{"properties":{"namespace":{"type":"string","const":"list","title":"Namespace","default":"list"},"list_id":{"type":"integer","title":"List Id"},"list_type":{"type":"string","enum":["people","company"],"title":"List Type"},"column":{"type":"string","minLength":1,"title":"Column"}},"type":"object","required":["list_id","list_type","column"],"title":"ListWriteFieldPayload"},"MachineCaller":{"type":"string","enum":["ai_agents","dagster_dbt","dagster_event_processing","n8n","scala_connect","scala_hub_admin","scala_ops_os"],"title":"MachineCaller","description":"The applications authorized against this API's audience, by name.\n\nOne per Kinde ``m2m`` application in ``scala-infra``'s\n``terraform/environments/<env>-apps/terraform.tfvars``. A caller declared there and\nmissing here cannot be configured, since `MACHINE_CALLERS` parses into this enum."},"Mailbox":{"properties":{"email":{"type":"string","title":"Email"},"given_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Given Name"},"family_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Name"}},"type":"object","required":["email"],"title":"Mailbox"},"MailboxPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MailboxSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"MailboxPage"},"MailboxRef":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"}},"type":"object","required":["id","email"],"title":"MailboxRef","description":"The mailbox a message was stored from."},"MailboxSummary":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"is_active":{"type":"boolean","title":"Is Active"},"last_synced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced At"}},"type":"object","required":["id","email","is_active","last_synced_at"],"title":"MailboxSummary"},"ManagedPersonaResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customer Id"},"audience_count":{"type":"integer","title":"Audience Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"}},"type":"object","required":["id","name","customer_id","created_at","created_by_email"],"title":"ManagedPersonaResponse"},"MessageBody":{"properties":{"text":{"type":"string","title":"Text"},"html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html"}},"type":"object","required":["text","html"],"title":"MessageBody"},"MessageDetail":{"properties":{"id":{"type":"string","title":"Id"},"thread_id":{"type":"string","title":"Thread Id"},"mailbox":{"$ref":"#/components/schemas/MailboxRef"},"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction"},"subject":{"type":"string","title":"Subject"},"from":{"anyOf":[{"$ref":"#/components/schemas/EmailAddress"},{"type":"null"}]},"to":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"To"},"cc":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"Cc"},"snippet":{"type":"string","title":"Snippet"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"rfc_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc Message Id"},"in_reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In Reply To"},"label":{"anyOf":[{"$ref":"#/components/schemas/GmailMessageLabel"},{"type":"null"}],"description":"Clay's classification, or null until Clay has labelled the message."},"sub_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Label","description":"The label's subcategory, when Clay gave one."},"provider_refs":{"$ref":"#/components/schemas/ProviderRefs"},"body":{"$ref":"#/components/schemas/MessageBody"}},"type":"object","required":["id","thread_id","mailbox","direction","subject","from","to","cc","snippet","sent_at","received_at","rfc_message_id","in_reply_to","label","sub_label","provider_refs","body"],"title":"MessageDetail"},"MessagePage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MessageSummary"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["items","next_cursor"],"title":"MessagePage"},"MessageSummary":{"properties":{"id":{"type":"string","title":"Id"},"thread_id":{"type":"string","title":"Thread Id"},"mailbox":{"$ref":"#/components/schemas/MailboxRef"},"direction":{"type":"string","enum":["inbound","outbound"],"title":"Direction"},"subject":{"type":"string","title":"Subject"},"from":{"anyOf":[{"$ref":"#/components/schemas/EmailAddress"},{"type":"null"}]},"to":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"To"},"cc":{"items":{"$ref":"#/components/schemas/EmailAddress"},"type":"array","title":"Cc"},"snippet":{"type":"string","title":"Snippet"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"received_at":{"type":"string","format":"date-time","title":"Received At"},"rfc_message_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rfc Message Id"},"in_reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"In Reply To"},"label":{"anyOf":[{"$ref":"#/components/schemas/GmailMessageLabel"},{"type":"null"}],"description":"Clay's classification, or null until Clay has labelled the message."},"sub_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Label","description":"The label's subcategory, when Clay gave one."},"provider_refs":{"$ref":"#/components/schemas/ProviderRefs"}},"type":"object","required":["id","thread_id","mailbox","direction","subject","from","to","cc","snippet","sent_at","received_at","rfc_message_id","in_reply_to","label","sub_label","provider_refs"],"title":"MessageSummary"},"MetricsField":{"properties":{"property":{"type":"string","const":"scala_status","title":"Property"},"namespace":{"type":"string","const":"metrics","title":"Namespace","default":"metrics"}},"type":"object","required":["property"],"title":"MetricsField"},"MetricsWriteFieldPayload":{"properties":{"namespace":{"type":"string","const":"metrics","title":"Namespace","default":"metrics"},"property":{"type":"string","const":"scala_status","title":"Property"}},"type":"object","required":["property"],"title":"MetricsWriteFieldPayload"},"NamedropField":{"properties":{"property":{"type":"string","enum":["first_name","last_name"],"title":"Property"},"persona_id":{"type":"integer","title":"Persona Id"},"namespace":{"type":"string","const":"namedrop","title":"Namespace","default":"namedrop"}},"type":"object","required":["property","persona_id"],"title":"NamedropField"},"NamedropScalaVarData":{"properties":{"persona_id":{"anyOf":[{"type":"integer"},{"type":"string"}],"title":"Persona Id"},"field":{"type":"string","enum":["first_name","last_name"],"title":"Field"}},"type":"object","required":["persona_id","field"],"title":"NamedropScalaVarData"},"NamedropWriteFieldPayload":{"properties":{"namespace":{"type":"string","const":"namedrop","title":"Namespace","default":"namedrop"},"property":{"type":"string","enum":["first_name","last_name"],"title":"Property"},"persona_id":{"type":"integer","title":"Persona Id"}},"type":"object","required":["property","persona_id"],"title":"NamedropWriteFieldPayload"},"OpportunityFieldReadMappings":{"properties":{"opportunity_amount":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Amount","default":[]},"opportunity_is_won":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Is Won","default":[]},"opportunity_is_lost":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Is Lost","default":[]},"opportunity_is_closed":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Is Closed","default":[]},"opportunity_close_date":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Close Date","default":[]},"opportunity_creation_date":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Creation Date","default":[]},"opportunity_name":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Name","default":[]},"opportunity_stage":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Stage","default":[]},"opportunity_pipeline":{"items":{"$ref":"#/components/schemas/CrmFieldReadMappingItem"},"type":"array","title":"Opportunity Pipeline","default":[]}},"type":"object","title":"OpportunityFieldReadMappings"},"OrganizationRoleUpdatePayload":{"properties":{"organization_ids":{"items":{"type":"string"},"type":"array","title":"Organization Ids"},"role":{"$ref":"#/components/schemas/UserRole"}},"type":"object","required":["organization_ids","role"],"title":"OrganizationRoleUpdatePayload"},"OverallMetricsEntity":{"properties":{"launch_date":{"type":"string","format":"date-time","title":"Launch Date"},"linkedin_interested_rate":{"type":"number","title":"Linkedin Interested Rate"},"email_interested_rate":{"type":"number","title":"Email Interested Rate"}},"type":"object","required":["launch_date","linkedin_interested_rate","email_interested_rate"],"title":"OverallMetricsEntity"},"PatchAudienceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"revision":{"type":"integer","title":"Revision"}},"type":"object","required":["id","name","intent","revision"],"title":"PatchAudienceResponse"},"PauseStrategyCampaignPayload":{"properties":{"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"Why it is paused, logged with the event."}},"additionalProperties":false,"type":"object","title":"PauseStrategyCampaignPayload"},"PeopleListDataItem":{"properties":{"linkedin_public_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Public Identifier"},"sales_navigator_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Navigator Id"},"profile_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Id"},"profile_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Key"},"extra_data":{"additionalProperties":{"type":"string"},"type":"object","title":"Extra Data","default":{}}},"type":"object","title":"PeopleListDataItem"},"PeopleListResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","enum":["profile_id","sales_navigator_id","linkedin_public_identifier","profile_key"],"title":"Type"},"is_scala_lib":{"type":"boolean","title":"Is Scala Lib"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"created_by_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Email"},"audience_count":{"type":"integer","title":"Audience Count","description":"The audiences whose search includes or excludes the list, deleted ones included, each counted once: the customer's own, or every customer's on the library's list (`type=scala-lib`).","default":0},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"extra_column_names":{"items":{"type":"string"},"type":"array","title":"Extra Column Names","default":[]},"excluded_by_default":{"type":"boolean","title":"Excluded By Default","description":"Whether every search of the customer's excludes the list, whether it names the list or not."}},"type":"object","required":["id","name","type","is_scala_lib","user_id","created_by_email","created_at","excluded_by_default"],"title":"PeopleListResponse"},"PeopleListsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PeopleListResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"PeopleListsPage"},"PersonaCreationPayload":{"properties":{"name":{"type":"string","title":"Name"},"job_titles_included":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Included"},"job_titles_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Excluded"},"seniority_levels":{"anyOf":[{"items":{"type":"string","enum":["Director / Head of","VP","Other","Intern / Junior","Freelance / Consultant","Assistant","CEO / Founder","Team lead","C-level"]},"type":"array"},{"type":"null"}],"title":"Seniority Levels"},"seniority_levels_mode":{"$ref":"#/components/schemas/IncludeExcludeMode"},"is_scala_lib":{"type":"boolean","title":"Is Scala Lib","default":false}},"additionalProperties":false,"type":"object","required":["name","job_titles_included","job_titles_excluded","seniority_levels","seniority_levels_mode"],"title":"PersonaCreationPayload"},"PersonaCustomer":{"properties":{"kinde_org_code":{"type":"string","title":"Kinde Org Code"},"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["kinde_org_code","id","name"],"title":"PersonaCustomer"},"PersonaPatchPayload":{"properties":{"name":{"type":"string","title":"Name"},"job_titles_included":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Included"},"job_titles_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Excluded"},"seniority_levels":{"anyOf":[{"items":{"type":"string","enum":["Director / Head of","VP","Other","Intern / Junior","Freelance / Consultant","Assistant","CEO / Founder","Team lead","C-level"]},"type":"array"},{"type":"null"}],"title":"Seniority Levels"},"seniority_levels_mode":{"$ref":"#/components/schemas/IncludeExcludeMode"}},"additionalProperties":false,"type":"object","required":["name","job_titles_included","job_titles_excluded","seniority_levels","seniority_levels_mode"],"title":"PersonaPatchPayload"},"PersonaResponse":{"properties":{"name":{"type":"string","title":"Name"},"job_titles_included":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Included"},"job_titles_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Titles Excluded"},"seniority_levels":{"anyOf":[{"items":{"type":"string","enum":["Director / Head of","VP","Other","Intern / Junior","Freelance / Consultant","Assistant","CEO / Founder","Team lead","C-level"]},"type":"array"},{"type":"null"}],"title":"Seniority Levels"},"seniority_levels_mode":{"$ref":"#/components/schemas/IncludeExcludeMode"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"customer":{"anyOf":[{"$ref":"#/components/schemas/PersonaCustomer"},{"type":"null"}]},"created_by_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By Id"}},"type":"object","required":["name","job_titles_included","job_titles_excluded","seniority_levels","seniority_levels_mode","id","created_at","updated_at","customer","created_by_id"],"title":"PersonaResponse"},"PersonaStatsSearchRequest":{"properties":{"limit":{"type":"integer","title":"Limit","default":1000},"profile_job_titles_included":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Job Titles Included"},"profile_job_titles_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Job Titles Excluded"},"profile_seniority_levels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Seniority Levels"},"profile_seniority_levels_mode":{"$ref":"#/components/schemas/IncludeExcludeMode"}},"type":"object","required":["profile_seniority_levels_mode"],"title":"PersonaStatsSearchRequest"},"PersonaStatsSearchResponse":{"properties":{"profile_position_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Position Title"},"profile_position_seniority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Position Seniority"},"percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percentage"}},"type":"object","required":["profile_position_title","profile_position_seniority","percentage"],"title":"PersonaStatsSearchResponse"},"PlatformFieldsWanted":{"properties":{"scala_var":{"type":"integer","maximum":30.0,"minimum":0.0,"title":"Scala Var","default":0},"hpp_email_message":{"type":"integer","maximum":30.0,"minimum":0.0,"title":"Hpp Email Message","default":0},"hpp_email_subject":{"type":"integer","maximum":30.0,"minimum":0.0,"title":"Hpp Email Subject","default":0},"hpp_linkedin_message":{"type":"integer","maximum":30.0,"minimum":0.0,"title":"Hpp Linkedin Message","default":0}},"additionalProperties":false,"type":"object","title":"PlatformFieldsWanted","description":"How many columns of each family the caller wants to exist.\n\nA count rather than a list of columns, because the ordinals are a pool with no gaps to\nexpress: asking for six is asking that six exist, and what already exists is kept.\n\nOmitting a family asks for nothing of it. Omitting every family asks for nothing at\nall, which is refused rather than answered: since every count defaults to zero, an\nempty body and a body of zeroes both parse, and both would otherwise come back as a\nsuccessful run that did nothing. A caller that reaches this endpoint means to create\nsomething, so saying which is required.\n\nThe bound is a sanity limit rather than a layout rule. A campaign needing a thirtieth\ncolumn of one kind is a conversation, not a provisioning call, and the bound is what\nstops a caller's arithmetic slip from writing hundreds of columns into someone's CRM."},"PlaybookAutoSyncSchema":{"properties":{"auto_sync":{"type":"boolean","title":"Auto Sync"}},"type":"object","required":["auto_sync"],"title":"PlaybookAutoSyncSchema"},"PlaybookCampaignCreatePayload":{"properties":{"messages":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateEmailStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinInvitationStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinSendStepPayload"},{"$ref":"#/components/schemas/CreateLinkedinVisitStepPayload"}],"discriminator":{"propertyName":"type","mapping":{"email":"#/components/schemas/CreateEmailStepPayload","linkedinInvite":"#/components/schemas/CreateLinkedinInvitationStepPayload","linkedinSend":"#/components/schemas/CreateLinkedinSendStepPayload","linkedinVisit":"#/components/schemas/CreateLinkedinVisitStepPayload"}}},"type":"array","title":"Messages"},"campaign_type":{"$ref":"#/components/schemas/CampaignType"}},"type":"object","required":["messages","campaign_type"],"title":"PlaybookCampaignCreatePayload","description":"The V1 create-campaign body: authored copy, flat, plus the campaign to put it in."},"PlaybookCampaignInfoPayload":{"properties":{"name":{"type":"string","title":"Name"},"language":{"type":"string","title":"Language"},"scala_vars":{"items":{"$ref":"#/components/schemas/CampaignScalaVarsPayload"},"type":"array","title":"Scala Vars"},"write_mappings":{"items":{"$ref":"#/components/schemas/PlaybookCrmWriteMappingPayload"},"type":"array","title":"Write Mappings","default":[]}},"type":"object","required":["name","language","scala_vars"],"title":"PlaybookCampaignInfoPayload"},"PlaybookCampaignInfoSchema":{"properties":{"name":{"type":"string","title":"Name"},"language":{"type":"string","title":"Language"},"playbook_id":{"type":"integer","title":"Playbook Id"},"version":{"$ref":"#/components/schemas/CampaignVersion"},"scala_vars":{"items":{"$ref":"#/components/schemas/CampaignScalaVarsSchema"},"type":"array","title":"Scala Vars"},"crm_list_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm List Error"}},"type":"object","required":["name","language","playbook_id","version","scala_vars"],"title":"PlaybookCampaignInfoSchema"},"PlaybookCrmWriteMappingPayload":{"properties":{"crm_object_type":{"type":"string","enum":["contact","account"],"title":"Crm Object Type","default":"contact"},"crm_field_name":{"type":"string","title":"Crm Field Name"},"scalability_field":{"oneOf":[{"$ref":"#/components/schemas/EnrichmentWriteFieldPayload"},{"$ref":"#/components/schemas/NamedropWriteFieldPayload"},{"$ref":"#/components/schemas/AudienceBuilderWriteFieldPayload"},{"$ref":"#/components/schemas/StaticWriteFieldPayload"},{"$ref":"#/components/schemas/PlaybookWriteFieldPayload"},{"$ref":"#/components/schemas/MetricsWriteFieldPayload"},{"$ref":"#/components/schemas/ListWriteFieldPayload"},{"$ref":"#/components/schemas/CustomColumnWriteFieldPayload"}],"title":"Scalability Field","discriminator":{"propertyName":"namespace","mapping":{"audience_builder":"#/components/schemas/AudienceBuilderWriteFieldPayload","custom":"#/components/schemas/CustomColumnWriteFieldPayload","enrichment":"#/components/schemas/EnrichmentWriteFieldPayload","list":"#/components/schemas/ListWriteFieldPayload","metrics":"#/components/schemas/MetricsWriteFieldPayload","namedrop":"#/components/schemas/NamedropWriteFieldPayload","playbook":"#/components/schemas/PlaybookWriteFieldPayload","static":"#/components/schemas/StaticWriteFieldPayload"}}},"format":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarsFormatType"},{"type":"null"}]},"overwrite_on_update":{"type":"boolean","title":"Overwrite On Update","default":true}},"type":"object","required":["crm_field_name","scalability_field"],"title":"PlaybookCrmWriteMappingPayload"},"PlaybookField":{"properties":{"property":{"type":"string","enum":["lemlist_sequence","playbook_name","playbook_type"],"title":"Property"},"namespace":{"type":"string","const":"playbook","title":"Namespace","default":"playbook"}},"type":"object","required":["property"],"title":"PlaybookField"},"PlaybookPatchPayload":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"auto_sync":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Sync"},"tasks_per_day":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Tasks Per Day"}},"additionalProperties":false,"type":"object","title":"PlaybookPatchPayload"},"PlaybookProgress":{"type":"string","enum":["not_started","in_progress","completed"],"title":"PlaybookProgress"},"PlaybookRecordStatus":{"type":"string","enum":["in_progress","done","error","skipped"],"title":"PlaybookRecordStatus","description":"Where a playbook record stands, read off its step, skip flag and errors, in that order.\n\n`skipped` first, then `error` when the record or its CRM push holds one, then `done` at\n`DONE`; anything else is `in_progress`."},"PlaybookRecordWorkflowStep":{"type":"string","enum":["start","request_enrichment","retrieve_enrichment","request_crm_refresh","retrieve_crm_refresh","ready_for_matching","matching","request_hpp_copy","retrieve_hpp_copy","ready_for_task_creation","task_creation","ready_to_push","push_to_crm","ready_to_sequence","sequence","done"],"title":"PlaybookRecordWorkflowStep"},"PlaybookRecordsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StoredRecord"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"PlaybookRecordsPage"},"PlaybookResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"is_active":{"type":"boolean","title":"Is Active"},"is_deleted":{"type":"boolean","title":"Is Deleted"},"workflow_type":{"$ref":"#/components/schemas/WorkflowType"},"auto_sync":{"type":"boolean","title":"Auto Sync"},"audience_name":{"type":"string","title":"Audience Name"},"audience_id":{"type":"integer","title":"Audience Id"},"audience_record_count":{"type":"integer","title":"Audience Record Count"},"workflow_state":{"anyOf":[{"$ref":"#/components/schemas/PlaybookWorkflowStateSchema"},{"type":"null"}]},"workflow_exec_data":{"items":{"$ref":"#/components/schemas/PlaybookWorkflowExecDataSchema"},"type":"array","title":"Workflow Exec Data"},"downloadable_records":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Downloadable Records"},"downloaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Downloaded At"},"campaign_version":{"type":"integer","title":"Campaign Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_hpp":{"type":"boolean","title":"Is Hpp"},"crm_list_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm List Error"}},"type":"object","required":["id","name","is_active","is_deleted","workflow_type","auto_sync","audience_name","audience_id","audience_record_count","workflow_exec_data","downloadable_records","downloaded_at","campaign_version","created_at","is_hpp"],"title":"PlaybookResponse"},"PlaybookStepStatus":{"type":"string","enum":["pending","in_progress","completed","error"],"title":"PlaybookStepStatus","description":"Per-phase status for playbook progress (API and internal mapping)."},"PlaybookTasksInfoPayload":{"properties":{"task_content":{"type":"string","title":"Task Content"},"task_subject":{"type":"string","title":"Task Subject"},"tasks_per_day":{"type":"integer","title":"Tasks Per Day"},"crm_assignee_ids":{"items":{"type":"string"},"type":"array","title":"Crm Assignee Ids"},"task_priority":{"type":"string","title":"Task Priority"}},"type":"object","required":["task_content","task_subject","tasks_per_day","crm_assignee_ids","task_priority"],"title":"PlaybookTasksInfoPayload","description":"Payload for tasks info when creating a TASKS playbook."},"PlaybookWithStateSchema":{"properties":{"id":{"type":"integer","title":"Id"},"workflow_type":{"$ref":"#/components/schemas/WorkflowType"},"workflow_state":{"anyOf":[{"$ref":"#/components/schemas/PlaybookWorkflowStateSchema"},{"type":"null"}]},"workflow_exec_data":{"items":{"$ref":"#/components/schemas/PlaybookWorkflowExecDataSchema"},"type":"array","title":"Workflow Exec Data"}},"type":"object","required":["id","workflow_type","workflow_exec_data"],"title":"PlaybookWithStateSchema"},"PlaybookWorkflowExecDataSchema":{"properties":{"step":{"$ref":"#/components/schemas/PlaybookWorkflowStep"},"step_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Step Result"}},"type":"object","required":["step"],"title":"PlaybookWorkflowExecDataSchema"},"PlaybookWorkflowStateSchema":{"properties":{"step":{"$ref":"#/components/schemas/PlaybookWorkflowStep"},"step_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Error"}},"type":"object","required":["step"],"title":"PlaybookWorkflowStateSchema"},"PlaybookWorkflowStep":{"type":"string","enum":["trigger_copy_generation","copy_generation_initiated","copy_awaiting_approval"],"title":"PlaybookWorkflowStep"},"PlaybookWriteFieldPayload":{"properties":{"namespace":{"type":"string","const":"playbook","title":"Namespace","default":"playbook"},"property":{"type":"string","enum":["lemlist_sequence","playbook_name","playbook_type"],"title":"Property"}},"type":"object","required":["property"],"title":"PlaybookWriteFieldPayload"},"PlaybooksPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PlaybookResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"PlaybooksPage"},"ProfileBulkLookupRequest":{"properties":{"linkedin_public_identifiers":{"items":{"type":"string","minLength":1},"type":"array","maxItems":100,"minItems":1,"title":"Linkedin Public Identifiers","description":"Each matched once lowercased and percent-decoded, as the warehouse stores it. A former or variant identifier resolves to the current one. An identifier repeated, in any spelling, is looked up once and answered at each of its positions."}},"additionalProperties":false,"type":"object","required":["linkedin_public_identifiers"],"title":"ProfileBulkLookupRequest"},"ProfileBulkLookupResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ProfileLookupResponse"},"type":"array","title":"Results","description":"One per identifier sent, in the same order: a null profile where none matched."}},"type":"object","required":["results"],"title":"ProfileBulkLookupResponse"},"ProfileDistributionField":{"type":"string","enum":["position_seniority","position_category","country_code","languages","nb_years_of_experience","company_linkedin_industry","company_country_code","company_employees_range","in_crm"],"title":"ProfileDistributionField"},"ProfileFieldDistribution":{"properties":{"distinct":{"type":"integer","title":"Distinct","description":"How many distinct values the matched set has."},"top":{"items":{"$ref":"#/components/schemas/DistributionValue"},"type":"array","title":"Top","description":"The commonest values, at most `top_n`, most records first."},"other_count":{"type":"integer","title":"Other Count","description":"The records of the values past `top_n`, added up value by value: a record of a multi-valued field counts once per value."},"null_count":{"type":"integer","title":"Null Count","description":"Matched records with no value, an empty one included."},"field":{"$ref":"#/components/schemas/ProfileDistributionField"}},"type":"object","required":["distinct","top","other_count","null_count","field"],"title":"ProfileFieldDistribution"},"ProfileFieldsEntity":{"properties":{"profile_country_code":{"items":{"type":"string"},"type":"array","title":"Profile Country Code"},"profile_merged_languages":{"items":{"type":"string"},"type":"array","title":"Profile Merged Languages"},"profile_language_proficiencies":{"items":{"type":"string"},"type":"array","title":"Profile Language Proficiencies"},"profile_position_seniority":{"items":{"type":"string"},"type":"array","title":"Profile Position Seniority"},"profile_position_category":{"items":{"type":"string"},"type":"array","title":"Profile Position Category"},"profile_captain_data_competitor_followers_list":{"items":{"type":"string"},"type":"array","title":"Profile Captain Data Competitor Followers List"}},"type":"object","required":["profile_country_code","profile_merged_languages","profile_language_proficiencies","profile_position_seniority","profile_position_category","profile_captain_data_competitor_followers_list"],"title":"ProfileFieldsEntity"},"ProfileFindRequest":{"properties":{"first_name":{"type":"string","minLength":1,"title":"First Name","description":"Compared to the warehouse's cleaned name, both sides folded by `strip_accents(lower(...))`."},"last_name":{"type":"string","minLength":1,"title":"Last Name","description":"Compared to the warehouse's cleaned name, both sides folded by `strip_accents(lower(...))`."},"domain":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Domain","description":"The current company's domain, matched as stored. Every company with that domain is searched."},"company_name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Company Name","description":"Compared to the company's name, both sides folded by `strip_accents(lower(...))`."},"limit":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Limit","description":"How many matches to return. The default of 2 is enough to tell a unique match from an ambiguous one.","default":2}},"additionalProperties":false,"type":"object","required":["first_name","last_name"],"title":"ProfileFindRequest","description":"A name at one company. Names are folded here; the domain is matched as stored."},"ProfileFindResponse":{"properties":{"match_count":{"type":"integer","title":"Match Count","description":"Every profile the name matches, not only those returned."},"profiles":{"items":{"$ref":"#/components/schemas/WarehouseProfile"},"type":"array","title":"Profiles","description":"Ordered by profile_key, so a name always returns the same order. No order means anything more: two profiles with one name at one company are indistinguishable here."}},"type":"object","required":["match_count","profiles"],"title":"ProfileFindResponse"},"ProfileLookupRequest":{"properties":{"linkedin_public_identifier":{"type":"string","minLength":1,"title":"Linkedin Public Identifier","description":"Matched once lowercased and percent-decoded, as the warehouse stores it. A former or variant identifier resolves to the current one."}},"additionalProperties":false,"type":"object","required":["linkedin_public_identifier"],"title":"ProfileLookupRequest"},"ProfileLookupResponse":{"properties":{"profile":{"anyOf":[{"$ref":"#/components/schemas/WarehouseProfile"},{"type":"null"}]},"company":{"anyOf":[{"$ref":"#/components/schemas/WarehouseCompany"},{"type":"null"}]}},"type":"object","required":["profile","company"],"title":"ProfileLookupResponse"},"ProfileResponseV2":{"properties":{"profile_key":{"type":"string","title":"Profile Key"},"profile_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Id"},"captain_data_competitor_followers_list":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captain Data Competitor Followers List"},"captain_data_competitor_followers_array":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Captain Data Competitor Followers Array"},"captain_data_job_uid_list":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captain Data Job Uid List"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"cleaned_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleaned First Name"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"cleaned_gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleaned Gender"},"languages":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Languages"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"cleaned_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cleaned Last Name"},"lemlist_team_ids":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lemlist Team Ids"},"linkedin_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Full Name"},"linkedin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Id"},"linkedin_nb_days_since_last_extract":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Linkedin Nb Days Since Last Extract"},"profile_connections_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Connections Count"},"linkedin_post_liker_post_id_list":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Post Liker Post Id List"},"linkedin_public_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Public Identifier"},"linkedin_role_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Role Type"},"linkedin_tenure_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Linkedin Tenure Start Date"},"most_recent_extract_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Most Recent Extract Date"},"position_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Category"},"position_seniority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Seniority"},"position_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Position Title"},"sales_navigator_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sales Navigator Id"},"tenure_length_total_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tenure Length Total Month"},"nb_years_of_experience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nb Years Of Experience"},"engagement_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Engagement Score"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"linkedin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Url"}},"type":"object","required":["profile_key"],"title":"ProfileResponseV2"},"ProfileSearchBodyV2":{"properties":{"static_profile_projection":{"anyOf":[{"$ref":"#/components/schemas/StaticProfileProjectionRequest"},{"type":"null"}]},"dynamic_profile_projection":{"anyOf":[{"$ref":"#/components/schemas/DynamicProfileProjectionRequest"},{"type":"null"}]},"static_company_projection":{"anyOf":[{"$ref":"#/components/schemas/StaticCompanyProjectionRequest"},{"type":"null"}]},"dynamic_company_projection":{"anyOf":[{"$ref":"#/components/schemas/DynamicCompanyProjectionRequest"},{"type":"null"}]},"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"sample_size":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Sample Size"}},"type":"object","required":["search_filters","sample_size"],"title":"ProfileSearchBodyV2","description":"Profile search request with split static/dynamic projections."},"ProfileSearchDistribution":{"properties":{"count":{"type":"integer","title":"Count","description":"Matched records, as the search's count reports them."},"in_crm_count":{"type":"integer","title":"In Crm Count","description":"Those of them already in the customer's CRM."},"distributions":{"items":{"$ref":"#/components/schemas/ProfileFieldDistribution"},"type":"array","title":"Distributions","description":"One per field, as requested."}},"type":"object","required":["count","in_crm_count","distributions"],"title":"ProfileSearchDistribution","description":"The matched set of a search, broken down by field.\n\nExact, over the set the search's count counts: for a semantic search, the at most 10,000\ncompanies its semantic match resolves to. The records a Custom Data Point enrichment could\nadd are not in it, as they are not in the count's main total. A record of a multi-valued\nfield (a profile's `languages`) counts once under each of its values, so that field's\ncounts can add up to more than `count`."},"ProfileSearchDistributionRequest":{"properties":{"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"fields":{"items":{"$ref":"#/components/schemas/ProfileDistributionField"},"type":"array","minItems":1,"title":"Fields","description":"The fields to break the matched set down by, each once. Every field is one more grouping of the matched set, so ask for the ones shown."},"top_n":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Top N","description":"The most values returned per field, the commonest first.","default":10}},"type":"object","required":["search_filters","fields"],"title":"ProfileSearchDistributionRequest","description":"A profile count's body, and the fields to break its matched set down by."},"ProfileSearchExportBodyV2":{"properties":{"static_profile_projection":{"anyOf":[{"$ref":"#/components/schemas/StaticProfileProjectionRequest"},{"type":"null"}]},"dynamic_profile_projection":{"anyOf":[{"$ref":"#/components/schemas/DynamicProfileProjectionRequest"},{"type":"null"}]},"static_company_projection":{"anyOf":[{"$ref":"#/components/schemas/StaticCompanyProjectionRequest"},{"type":"null"}]},"dynamic_company_projection":{"anyOf":[{"$ref":"#/components/schemas/DynamicCompanyProjectionRequest"},{"type":"null"}]},"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"}},"type":"object","required":["search_filters"],"title":"ProfileSearchExportBodyV2","description":"A profile search body, for a CSV export."},"ProfileSearchRequest":{"properties":{"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"search_filters":{"$ref":"#/components/schemas/SearchFilter"}},"type":"object","required":["search_filters"],"title":"ProfileSearchRequest"},"ProfileSearchResponseV2":{"properties":{"profile":{"$ref":"#/components/schemas/ProfileResponseV2"},"company":{"anyOf":[{"$ref":"#/components/schemas/CompanyResponseV2"},{"type":"null"}]},"crm_matched_contact":{"anyOf":[{"$ref":"#/components/schemas/CRMMatchingContactResponseV2"},{"type":"null"}]},"crm_matched_account":{"anyOf":[{"$ref":"#/components/schemas/CRMMatchingAccountResponseV2"},{"type":"null"}]},"computed_columns":{"$ref":"#/components/schemas/ComputedColumnsV2"}},"type":"object","required":["profile","computed_columns"],"title":"ProfileSearchResponseV2","description":"V2 profile search response. Same shape as v1 for now."},"ProposeStrategyCampaignPayload":{"properties":{"intent":{"type":"string","minLength":1,"title":"Intent","description":"A `strategy_intent` key."},"title":{"type":"string","minLength":1,"title":"Title"},"rationale":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Rationale","description":"The strategic agent's reasoning, in markdown, as the model wrote it, for its own reflection and for display. Its content and layout are the writer's: no reader expects a format in it or extracts anything from it. A reference written as `<kind>#<id>`, e.g. `audience#1234`, may be rendered as a link. Optional. A campaign a person plans usually has none, their words being the `summary`. Who proposed a campaign is the `proposed` event's actor and caller, never inferred from this field."},"summary":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Summary","description":"The campaign as the SE and the client read it, in markdown, rendered whole, so nothing in it is internal. Its sections, their titles and its language are the writer's: no reader expects any of them or extracts anything from it."},"planned_launch_date":{"type":"string","format":"date","title":"Planned Launch Date","description":"The day the launch is planned for, any day. A plan made to the month or the week names a day in it; nothing records how precise the plan was, and each front end rounds the day for display."},"audience_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audience Id","description":"The audience it targets; attached later through revise if none."},"playbook_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playbook Id","description":"An inactive playbook on `audience_id`, carrying the copy; attached later through revise if none. Requires `audience_id`."},"replaces_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Replaces Id","description":"The refused or retired campaign this one re-proposes."},"idea_accepted":{"type":"boolean","title":"Idea Accepted","description":"The caller is the one deciding the idea, as an SE planning a campaign is: it is logged as their validation and the campaign starts at `audience_review`. Otherwise it starts at `idea_review`.","default":false},"review":{"anyOf":[{"$ref":"#/components/schemas/ProposedStrategyCampaignReviewPayload"},{"type":"null"}],"description":"The strategic agent's review of what it proposes, stored as the campaign's first review, of the campaign as proposed. It needs `strategy_campaign_reviews:write`, which only ai-agents holds."}},"additionalProperties":false,"type":"object","required":["intent","title","planned_launch_date"],"title":"ProposeStrategyCampaignPayload"},"ProposedStrategyCampaignReviewPayload":{"properties":{"report":{"type":"string","minLength":1,"title":"Report","description":"The strategic agent's review, in markdown as it wrote it: for display, never a format anything extracts from. Internal: it cites the evidence, other customers' figures included."},"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"The ai-agents run that wrote it. A review sent again under the same run is stored once."}},"additionalProperties":false,"type":"object","required":["report","run_id"],"title":"ProposedStrategyCampaignReviewPayload","description":"The strategic agent's review of a proposal, stored with the campaign it creates."},"ProviderRefs":{"properties":{"gmail_message_id":{"type":"string","title":"Gmail Message Id"},"gmail_thread_id":{"type":"string","title":"Gmail Thread Id"}},"type":"object","required":["gmail_message_id","gmail_thread_id"],"title":"ProviderRefs","description":"Ids from the mailbox provider. Clients match on the public ids, not on these."},"QfDataFieldRequest":{"properties":{"field_key":{"type":"string","title":"Field Key"},"sharing":{"type":"string","enum":["shared","specific"],"title":"Sharing"}},"additionalProperties":false,"type":"object","required":["field_key","sharing"],"title":"QfDataFieldRequest","description":"One Custom Data Point (QF) field to project into results.\n\nIdentity mirrors ``CustomDataPointFilter`` (see ``audience_builder/schemas/filters.py``):\nthe frontend already knows ``field_key`` and ``sharing`` from the QF field list, so no\nserver-side catalog lookup is needed. ``field_key`` is sanitized downstream by\n``qf_column``, so it needs no validator of its own."},"RecentlyContactedParams":{"properties":{"contacted_within_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Contacted Within Days","description":"Last contacted, by any tenant, within this many days.","default":180},"extract_older_than_days":{"type":"integer","maximum":3650.0,"minimum":1.0,"title":"Extract Older Than Days","description":"Last extracted from LinkedIn more than this many days ago, or never. A Sales Navigator search's result does not count as an extraction.","default":180},"country_code":{"anyOf":[{"type":"string","pattern":"^[A-Z]{2}$"},{"type":"null"}],"title":"Country Code","description":"Only the profiles of this country, as an ISO 3166-1 alpha-2 code; null for every country.","default":"FR"}},"additionalProperties":false,"type":"object","title":"RecentlyContactedParams"},"RecentlyContactedWarehouseQuery":{"properties":{"preset":{"type":"string","const":"recently_contacted","title":"Preset"},"params":{"$ref":"#/components/schemas/RecentlyContactedParams","description":"The preset's parameters; each one left out takes its default.","default":{"contacted_within_days":180,"extract_older_than_days":180,"country_code":"FR"}}},"type":"object","required":["preset"],"title":"RecentlyContactedWarehouseQuery","description":"The profiles contacted recently, however often, not extracted since."},"RecordInclude":{"type":"string","enum":["scala_vars","full"],"title":"RecordInclude","description":"What a list of records adds to each, on request: its resolved scala_vars, its whole row."},"Refusal":{"properties":{"detail":{"type":"string","title":"Detail"}},"type":"object","required":["detail"],"title":"Refusal","description":"What a route answers when it refuses a request for a reason other than its values."},"RefuseStrategyCampaignPayload":{"properties":{"comment":{"type":"string","minLength":1,"title":"Comment","description":"Why the idea is refused."},"expected_event_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Event Id","description":"The campaign's `last_event_id` as the decision was taken on it. If the campaign has changed since, the request is a 409 rather than acting on a state its author never saw."}},"additionalProperties":false,"type":"object","required":["comment","expected_event_id"],"title":"RefuseStrategyCampaignPayload"},"ReopenStrategyCampaignPayload":{"properties":{"comment":{"type":"string","minLength":1,"title":"Comment","description":"Why the client review is reopened: what the client asked for."},"expected_event_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Event Id","description":"The campaign's `last_event_id` as the decision was taken on it. If the campaign has changed since, the request is a 409 rather than acting on a state its author never saw."}},"additionalProperties":false,"type":"object","required":["comment","expected_event_id"],"title":"ReopenStrategyCampaignPayload"},"ReservationStatus":{"type":"string","enum":["held","settled","released","expired"],"title":"ReservationStatus"},"ReserveCreditsPayload":{"properties":{"idempotency_key":{"type":"string","maxLength":255,"minLength":1,"pattern":"^[A-Za-z0-9._:-]+$","title":"Idempotency Key","description":"Unique per customer and caller, derived from a durable id the caller holds."},"op":{"type":"string","maxLength":128,"minLength":1,"title":"Op","description":"The operation, namespaced by the caller: `ai_agents.phone_enrich`."},"quantity":{"type":"integer","minimum":0.0,"title":"Quantity","description":"How many units the reservation covers."},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount","description":"The most this can cost, in credits."},"expires_at":{"type":"string","format":"date-time","title":"Expires At","description":"When the sweep releases it if it is still held. At most 7 days ahead."},"actor":{"anyOf":[{"$ref":"#/components/schemas/CreditActorPayload"},{"type":"null"}]},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Request id, endpoint, a summary of the input. Never an enriched value.","default":{}}},"additionalProperties":false,"type":"object","required":["idempotency_key","op","quantity","amount","expires_at"],"title":"ReserveCreditsPayload"},"ResolveScalaVarsPayload":{"properties":{"profile_keys":{"items":{"type":"string"},"type":"array","maxItems":10000,"title":"Profile Keys"},"scala_vars":{"items":{"$ref":"#/components/schemas/CampaignScalaVarsPayload"},"type":"array","title":"Scala Vars"},"language":{"type":"string","title":"Language","default":"fr"},"search_filters":{"anyOf":[{"$ref":"#/components/schemas/SearchFilter"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["profile_keys","scala_vars"],"title":"ResolveScalaVarsPayload","description":"Resolve an explicit scala-var declaration list against a set of profiles.\n\nStateless: nothing is created or persisted, and no playbook is referenced.\nai-agents uses it to see what a campaign *would* produce per record before\nthe campaign is published, so an HPP chat preview writes copy from the same\nvalues the batch will later receive through ``REQUEST_HPP_COPY``. Sending\nthe declarations rather than loading them by ``playbook_id`` is what makes\nthat possible: the playbook does not exist yet.\n\n``scala_vars`` is the same payload shape ``PlaybookCampaignInfoPayload``\ncarries at publish, so both transports resolve identical input.\n\n``search_filters`` is only needed to populate the ``computed.*``\nintersection expressions (matched pages / tags / personas / past\nexperience / the matched job posting); ``None`` resolves everything else\nand leaves those empty, the same trade-off\n``PlaybookService.load_playbook_records`` documents. A profile that no\nlonger satisfies them still resolves, with those values empty.\n\n``extra=\"forbid\"`` applies to this envelope only; pydantic does not extend\nit to nested models, so the ``CampaignScalaVarsPayload`` entries stay as\npermissive here as they are at publish. That asymmetry is deliberate:\n``CampaignScalaVarsSchema`` adds ``id`` on the way out, so a caller that\nround-trips a ``GET .../campaign-info`` response back into either endpoint\nwould be rejected by a stricter nested model. Tightening it is a change to\nthe shared publish contract, not to this endpoint."},"ResolveScalaVarsResponse":{"properties":{"results":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Results"}},"type":"object","required":["results"],"title":"ResolveScalaVarsResponse","description":"Resolved values keyed by profile_key, then by the declaration's ``key``.\n\nCarries every declaration that resolved, whatever its ``push_to_crm``:\nthe same set ``REQUEST_HPP_COPY`` puts on ``HppCopyContact.scala_vars``,\nso the preview and the batch see identical input.\n\nProfiles with no resolvable value are omitted rather than mapped to an\nempty dict, and an unresolved declaration is absent rather than null,\nmatching ``CampaignScalaVarsResolverService``."},"RestoreEntry":{"properties":{"kind":{"$ref":"#/components/schemas/StrategyTaxonomyKind"},"operation":{"type":"string","const":"restore","title":"Operation"},"key":{"type":"string","title":"Key"}},"additionalProperties":false,"type":"object","required":["kind","operation","key"],"title":"RestoreEntry","description":"Bring a retired intent or token back, as it was retired."},"RestoreStrategyCopySampleEntry":{"properties":{"kind":{"type":"string","const":"sample","title":"Kind"},"operation":{"type":"string","const":"restore","title":"Operation"},"key":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Key"}},"additionalProperties":false,"type":"object","required":["kind","operation","key"],"title":"RestoreStrategyCopySampleEntry","description":"Bring a retired sample back, as it was retired."},"RestoreStrategyEvent":{"properties":{"operation":{"type":"string","const":"restore","title":"Operation"},"key":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","title":"Key"}},"additionalProperties":false,"type":"object","required":["operation","key"],"title":"RestoreStrategyEvent","description":"Bring a retired event back, as it was retired."},"ResumeStrategyCampaignPayload":{"properties":{"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"Why it is resumed, logged with the event."}},"additionalProperties":false,"type":"object","title":"ResumeStrategyCampaignPayload"},"RetireEntry":{"properties":{"kind":{"$ref":"#/components/schemas/StrategyTaxonomyKind"},"operation":{"type":"string","const":"retire","title":"Operation"},"key":{"type":"string","title":"Key"}},"additionalProperties":false,"type":"object","required":["kind","operation","key"],"title":"RetireEntry","description":"Take an intent or token out of the library, keeping its row and its key."},"RetireStrategyCampaignPayload":{"properties":{"comment":{"type":"string","minLength":1,"title":"Comment","description":"Why the campaign is withdrawn."},"expected_event_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Event Id","description":"The campaign's `last_event_id` as the decision was taken on it. If the campaign has changed since, the request is a 409 rather than acting on a state its author never saw."}},"additionalProperties":false,"type":"object","required":["comment","expected_event_id"],"title":"RetireStrategyCampaignPayload"},"RetireStrategyCopySampleEntry":{"properties":{"kind":{"type":"string","const":"sample","title":"Kind"},"operation":{"type":"string","const":"retire","title":"Operation"},"key":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Key"}},"additionalProperties":false,"type":"object","required":["kind","operation","key"],"title":"RetireStrategyCopySampleEntry","description":"Take a sample out of the library, keeping its row and its key."},"RetireStrategyEvent":{"properties":{"operation":{"type":"string","const":"retire","title":"Operation"},"key":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","title":"Key"}},"additionalProperties":false,"type":"object","required":["operation","key"],"title":"RetireStrategyEvent","description":"Take an event out of the library, keeping its row and its key."},"RetryFailedRecordsResult":{"properties":{"retried_count":{"type":"integer","title":"Retried Count"}},"type":"object","required":["retried_count"],"title":"RetryFailedRecordsResult"},"ReviseCustomerCopySamplesPayload":{"properties":{"base_revision":{"type":"integer","title":"Base Revision","description":"The library's revision the changes were prepared on, which every customer's samples and the best copies share. A library that has moved on since answers 409: read it again and prepare the changes on that."},"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"Why, for the history."},"changes":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateCustomerCopySample"},{"$ref":"#/components/schemas/UpdateCustomerCopySample"},{"$ref":"#/components/schemas/RetireStrategyCopySampleEntry"},{"$ref":"#/components/schemas/RestoreStrategyCopySampleEntry"}]},"type":"array","maxItems":200,"minItems":1,"title":"Changes","description":"Applied together, at most one per sample, and checked as the customer's samples they leave. The history keeps them in the order sent."}},"additionalProperties":false,"type":"object","required":["base_revision","changes"],"title":"ReviseCustomerCopySamplesPayload"},"ReviseStrategyCampaignPayload":{"properties":{"intent":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Intent"},"title":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Title"},"rationale":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Rationale","description":"The strategic agent's reasoning, in markdown, as the model wrote it, for its own reflection and for display. Its content and layout are the writer's: no reader expects a format in it or extracts anything from it. A reference written as `<kind>#<id>`, e.g. `audience#1234`, may be rendered as a link."},"summary":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Summary","description":"The campaign as the SE and the client read it, in markdown, rendered whole, so nothing in it is internal. Its sections, their titles and its language are the writer's: no reader expects any of them or extracts anything from it."},"planned_launch_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Planned Launch Date","description":"The day the launch is planned for, any day. A plan made to the month or the week names a day in it; nothing records how precise the plan was, and each front end rounds the day for display."},"audience_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audience Id","description":"Attach or replace the audience, at `idea_review` or `audience_review`. Replacing it while a playbook is attached requires a `playbook_id` on the new one."},"playbook_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playbook Id","description":"Attach or replace the playbook carrying the copy, inactive and on the campaign's audience, until the copy is validated."},"reworked":{"type":"boolean","title":"Reworked","description":"The step under review, `audience_review` or `copy_review`, was reworked where its asset lives after a send-back. Logged as `reworked` rather than `revised`, so a reviewer sees the rework is done.","default":false},"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"What changed and why, or what was asked and not done and why. Logged on the event for whoever reviews the campaign. It changes nothing on its own, so a payload naming no other field is refused."}},"additionalProperties":false,"type":"object","title":"ReviseStrategyCampaignPayload"},"ReviseStrategyCopySamplesPayload":{"properties":{"base_revision":{"type":"integer","title":"Base Revision","description":"The revision the changes were prepared on. A library that has moved on since answers 409: read it again and prepare the changes on that."},"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"Why, for the history."},"changes":{"items":{"oneOf":[{"$ref":"#/components/schemas/UpdateStrategyCopySampleLibrary"},{"$ref":"#/components/schemas/CreateStrategyCopySample"},{"$ref":"#/components/schemas/UpdateStrategyCopySample"},{"$ref":"#/components/schemas/RetireStrategyCopySampleEntry"},{"$ref":"#/components/schemas/RestoreStrategyCopySampleEntry"}]},"type":"array","maxItems":200,"minItems":1,"title":"Changes","description":"Applied together, at most one per row, and checked as the library they leave. The history keeps them in the order sent."}},"additionalProperties":false,"type":"object","required":["base_revision","changes"],"title":"ReviseStrategyCopySamplesPayload"},"ReviseStrategyEventsPayload":{"properties":{"base_revision":{"type":"integer","title":"Base Revision","description":"The revision the changes were prepared on. A library that has moved on since answers 409: read the events again and prepare the changes on that."},"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"Why, for the history."},"changes":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateStrategyEvent"},{"$ref":"#/components/schemas/UpdateStrategyEvent"},{"$ref":"#/components/schemas/RetireStrategyEvent"},{"$ref":"#/components/schemas/RestoreStrategyEvent"}]},"type":"array","maxItems":200,"minItems":1,"title":"Changes","description":"Applied together, at most one per event. The history keeps them in the order sent."}},"additionalProperties":false,"type":"object","required":["base_revision","changes"],"title":"ReviseStrategyEventsPayload"},"ReviseStrategyTaxonomyPayload":{"properties":{"base_revision":{"type":"integer","title":"Base Revision","description":"The revision the changes were prepared on. A taxonomy that has moved on since answers 409: read it again and prepare the changes on that."},"comment":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Comment","description":"Why, for the history."},"changes":{"items":{"oneOf":[{"$ref":"#/components/schemas/CreateIntent"},{"$ref":"#/components/schemas/UpdateIntent"},{"$ref":"#/components/schemas/CreateToken"},{"$ref":"#/components/schemas/UpdateToken"},{"$ref":"#/components/schemas/RetireEntry"},{"$ref":"#/components/schemas/RestoreEntry"}]},"type":"array","maxItems":200,"minItems":1,"title":"Changes","description":"Applied together, at most one per intent and one per token, and checked as the taxonomy they leave: a token reclassified so an intent's copy paths are too wide is accepted only with that intent narrowed in the same revision. The history keeps them in the order sent."}},"additionalProperties":false,"type":"object","required":["base_revision","changes"],"title":"ReviseStrategyTaxonomyPayload"},"ReworkUnansweredStrategyCampaignPayload":{"properties":{"comment":{"type":"string","minLength":1,"title":"Comment","description":"To the reviewer: that the step's asset is as it was before the send-back, what the rework left, and what they can do."},"expected_event_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Event Id","description":"The campaign's `last_event_id`: the send-back the rework took."}},"additionalProperties":false,"type":"object","required":["comment","expected_event_id"],"title":"ReworkUnansweredStrategyCampaignPayload"},"RoleType":{"type":"string","enum":["new company","promotion"],"title":"RoleType"},"SalesNavigatorFilter":{"properties":{"type":{"type":"string","title":"Type","description":"Sales Navigator's filter type, such as `COMPANY_HEADCOUNT` or `REGION`, as the URL names it; `KEYWORDS` for the search box. A type Sales Navigator adds is served as it came.","examples":["COMPANY_HEADCOUNT"]},"values":{"items":{"$ref":"#/components/schemas/SalesNavigatorFilterValue"},"type":"array","title":"Values"}},"type":"object","required":["type","values"],"title":"SalesNavigatorFilter","description":"One filter of a Sales Navigator search, and its values, sorted."},"SalesNavigatorFilterSelection":{"type":"string","enum":["included","excluded"],"title":"SalesNavigatorFilterSelection"},"SalesNavigatorFilterValue":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"Sales Navigator's id for the value, such as `C` for 11-50 employees; absent for free text, such as a title. Two values with an id are the same when their ids are."},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"The value's label, in the language of whoever built the search, or the free text typed; absent when the URL carries none."},"selection":{"$ref":"#/components/schemas/SalesNavigatorFilterSelection"}},"type":"object","required":["selection"],"title":"SalesNavigatorFilterValue","description":"One value of a Sales Navigator filter."},"SalesOrProductLed":{"type":"string","enum":["Sales led","Product led"],"title":"SalesOrProductLed"},"ScalaStatus":{"type":"string","enum":["Interested","Objection"],"title":"ScalaStatus"},"ScrapLinkedinPageFollowersInput":{"properties":{"linkedin_page_url":{"type":"string","title":"Linkedin Page Url"},"identity_id":{"type":"string","title":"Identity Id"},"linkedin_search_urls":{"items":{"type":"string"},"type":"array","title":"Linkedin Search Urls"},"type":{"type":"string","title":"Type"},"category":{"type":"string","title":"Category"},"persona":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Persona"},"linkedin_page_name":{"type":"string","title":"Linkedin Page Name"}},"type":"object","required":["linkedin_page_url","identity_id","linkedin_search_urls","type","category","persona","linkedin_page_name"],"title":"ScrapLinkedinPageFollowersInput"},"ScrapLinkedinPageFollowersOutput":{"properties":{"run_id":{"type":"integer","title":"Run Id"},"run_uid":{"type":"string","title":"Run Uid"},"status":{"type":"string","title":"Status"}},"type":"object","required":["run_id","run_uid","status"],"title":"ScrapLinkedinPageFollowersOutput"},"SearchFilter":{"properties":{"company_tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Tags","description":"Keeps companies carrying any of these tags, matched exactly. The tags come from account lists loaded by a feed that has stopped, so they are no longer updated. Labelled 'Company tag' in the Audience Builder."},"profile_linkedin_followed_pages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Linkedin Followed Pages","description":"Keeps profiles following any of these LinkedIn pages, given by the page name as recorded, e.g. 'Welcome To The Jungle', matched exactly. Only the competitor pages tracked for customers are recorded, so any other page matches no profile. Labelled 'Follows LinkedIn pages'."},"custom_data_points":{"anyOf":[{"items":{"$ref":"#/components/schemas/CustomDataPointFilter"},"type":"array"},{"type":"null"}],"title":"Custom Data Points","description":"Custom Data Point filters, one per field, all of which must hold."},"company_lists_included":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Company Lists Included","description":"Ids of company lists: keeps the companies in any of them, each list matching on its own key (LinkedIn slug or id, domain, SIREN or SIRET). A SIREN or SIRET list matches only the companies the French register enrichment matched, and a SIRET only that of the head office. A list is the customer's own or a shared library list; an id the customer cannot use refuses the search."},"company_lists_excluded":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Company Lists Excluded","description":"Ids of company lists: drops the companies in any of them. A list is the customer's own or a shared library list; an id the customer cannot use refuses the search."},"people_lists_included":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"People Lists Included","description":"Ids of people lists: keeps the profiles in any of them, each list matching on its own key (Sales Navigator id, LinkedIn public identifier or profile id). A list is the customer's own or a shared library list; an id the customer cannot use refuses the search."},"people_lists_excluded":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"People Lists Excluded","description":"Ids of people lists: drops the profiles in any of them. A list is the customer's own or a shared library list; an id the customer cannot use refuses the search."},"past_experience_at_list_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Past Experience At List Id","description":"Id of a company list: keeps the profiles who worked at one of its companies in a position that has ended, at a company that is not their current one. Adds to past_experience_at_domains, and past_experience_at_weeks bounds when the position ended. Labelled 'Former customer's employee' > 'Worked at'. A list is the customer's own or a shared library list; an id the customer cannot use refuses the search."},"past_experience_at_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Past Experience At Domains","description":"Company website domains, matched exactly: keeps the profiles who worked at one of these companies in a position that has ended, at a company that is not their current one. Adds to past_experience_at_list_id."},"past_experience_at_weeks":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Past Experience At Weeks","description":"How recently the past position named by past_experience_at_list_id or past_experience_at_domains must have ended, in weeks; unset means at any time, and on its own it does not filter. Labelled 'Departure date', which offers 26, 52 and 104."},"persona_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Persona Ids","description":"Ids of personas, the customer's own or shared ones: keeps the profiles matching any of them. A persona is a set of job titles to include and to exclude, found in the current title as profile_job_titles_included finds them, and of seniorities to include or exclude; a profile matches a persona when it passes every part of it. A profile whose latest position has ended has no title or seniority and matches no persona. An id the customer cannot use refuses the search."},"crm_segments_included":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Crm Segments Included","description":"Ids of the customer's CRM segments: keeps the records in any of them of each kind. An account segment keeps the companies matched to its CRM accounts, a contact segment the profiles matched to its CRM contacts, and with both kinds a profile must be in one of the contact segments and its company in one of the account segments. A segment with no rules is skipped, so it restricts nothing. An id the customer cannot use refuses the search."},"crm_segments_excluded":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Crm Segments Excluded","description":"Ids of the customer's CRM segments: drops the records in any of them, as crm_segments_included reads them. A segment with no rules is skipped, so it drops nothing."},"company_linkedin_industries":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Linkedin Industries","description":"Industries from LinkedIn's taxonomy, matched exactly, with '/' and '&' written 'and': keeps the companies in any of them, or drops them with company_linkedin_industries_mode 'exclude'. Not company_gpt_industries, a taxonomy of its own."},"company_linkedin_industries_mode":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Company Linkedin Industries Mode","description":"Whether company_linkedin_industries keeps or drops its companies; include when unset. Exclude also drops the companies with no industry."},"company_linkedin_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Company Linkedin Keywords","description":"Words or phrases found in the specialties the company lists on LinkedIn, matched word by word, ignoring case and accents: a term's words in that order, side by side, so 'IA' does not match 'media'. Keeps the companies with any of them. A hyphen, a dot or an apostrophe both separates and joins words, so 'e-commerce' matches 'e commerce' and 'ecommerce', and 'IBM' matches 'I.B.M.'. A final s is ignored on a word of four letters or more, unless it ends in ss, us or is, so 'startup' matches 'startups' and 'business' stays as it is. Only about a third of companies list specialties; the others never match. Labelled 'Linkedin keywords'. A term holding a word that starts with '.' or ends in '+' or '#' ('.NET', 'C++', 'C# developer') is matched with those symbols, so 'C++ ecommerce' matches 'C++ E-Commerce'; a dot between two of its words then starts a symbol rather than joining them."},"company_names_included":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Company Names Included","description":"Words or phrases found in the company's cleaned name, matched word by word, ignoring case and accents: a term's words in that order, side by side. Keeps the companies matching any of them. A hyphen, a dot or an apostrophe both separates and joins words, so 'e-commerce' matches 'e commerce' and 'ecommerce', and 'IBM' matches 'I.B.M.'. A plural counts, so 'Network' does not match 'Networks'. The cleaned name drops a legal form that ends the name (Inc, Ltd, GmbH, SAS...), a leading 'Groupe', a trailing Group or region, anything in parentheses, dots, and everything from the first ' - ', ' / ', ' | ', ' by ', ', ' or ': '. A name verified by hand is kept as entered, so a legal form or 'Group' can still match it. A name in a non-Latin script cleans to nothing and is never found. A name search, not an identity: 'Stripe' also matches 'Stripe Consulting', where company_domains matches exactly. A term holding a word that starts with '.' or ends in '+' or '#' ('.NET', 'C++', 'C# developer') is matched with those symbols, so 'C++ ecommerce' matches 'C++ E-Commerce'; a dot between two of its words then starts a symbol rather than joining them."},"company_names_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Company Names Excluded","description":"Words or phrases matched as company_names_included matches them: drops the companies matching any of them. A company with no name is kept."},"company_ecommerce_platforms":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Ecommerce Platforms","description":"E-commerce platforms the company's online store runs on, in lower case, e.g. 'shopify', from StoreLeads: keeps the companies on any of them. The store is the one StoreLeads matched to the company's domain name, sometimes a namesake's."},"company_technologies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Technologies","description":"Technologies detected on the company's website by StoreLeads, BuiltWith and Coresignal, matched exactly and case-sensitively: keeps the companies using any of them. Some names exist in more than one casing; name each. Labelled 'Technology'."},"company_ecommerce_apps":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Ecommerce Apps","description":"Apps installed on the company's online store, from StoreLeads, matched exactly and case-sensitively: keeps the companies with any of them."},"company_ecommerce_plan":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Ecommerce Plan","description":"Plan of the company's store on its e-commerce platform, from StoreLeads, matched exactly: keeps the companies on any of them. The store is the one StoreLeads matched to the company's domain name, sometimes a namesake's."},"company_ecommerce_combined_followers_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Ecommerce Combined Followers Min","description":"Minimum followers of the online store's social accounts, summed across networks, from StoreLeads. A store with no social account counts as 0; only the companies with no store never match. Labelled 'Combined Followers'. The store is the one StoreLeads matched to the company's domain name, sometimes a namesake's."},"company_ecommerce_combined_followers_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Ecommerce Combined Followers Max","description":"Maximum followers of the online store's social accounts, as the minimum reads them. A store with no social account counts as 0, so a maximum keeps it, about four stores in five. The store is the one StoreLeads matched to the company's domain name, sometimes a namesake's."},"company_ecommerce_avg_price_usd_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Company Ecommerce Avg Price Usd Min","description":"Minimum average product price of the online store, in US dollars, from StoreLeads. Companies with no figure never match. The store is the one StoreLeads matched to the company's domain name, sometimes a namesake's."},"company_ecommerce_avg_price_usd_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Company Ecommerce Avg Price Usd Max","description":"Maximum average product price of the online store, in US dollars, from StoreLeads. Companies with no figure never match. The store is the one StoreLeads matched to the company's domain name, sometimes a namesake's."},"company_employee_count_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Employee Count Min","description":"Minimum number of employees shown on LinkedIn; 0 sets no bound. LinkedIn shows 0 for about a fifth of companies, large ones included; company_employee_ranges reads the declared size. Both this and company_employee_ranges must hold when both are set. Labelled 'Employee count on Linkedin'."},"company_employee_count_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Employee Count Max","description":"Maximum number of employees shown on LinkedIn; 0 sets no bound. It keeps the companies LinkedIn shows 0 for, about a fifth of them, large ones included."},"company_followers_count_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Followers Count Min","description":"Minimum followers of the company's LinkedIn page; 0 sets no bound. Labelled 'Followers count on LinkedIn'."},"company_followers_count_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Followers Count Max","description":"Maximum followers of the company's LinkedIn page; 0 sets no bound."},"company_website_monthly_visits_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Website Monthly Visits Min","description":"Minimum monthly website visits as Similarweb estimated them, its busiest of the three months it reported. Similarweb figures are no longer refreshed and only a few thousand companies have one, so this drops every other company; company_estimated_monthly_traffic_min reads the figure still loaded. There is no maximum."},"company_estimated_monthly_traffic_min":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Company Estimated Monthly Traffic Min","description":"Minimum monthly visits from Google, organic plus paid, as DataForSEO estimates them: the total over the countries it covers, or one country's with company_estimated_monthly_traffic_country_code. Only a few tens of thousands of companies have a figure; the others never match. A different estimate from company_website_monthly_visits_min, and the two do not agree. Labelled 'Monthly visits'."},"company_estimated_monthly_traffic_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Company Estimated Monthly Traffic Max","description":"Maximum monthly visits, on the figure company_estimated_monthly_traffic_min reads. Companies with no figure never match. Not an upper bound on company_website_monthly_visits_min, a different estimate."},"company_estimated_monthly_traffic_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Estimated Monthly Traffic Country Code","description":"ISO 3166-1 alpha-2 country code in upper case, e.g. 'FR': makes the company_estimated_monthly_traffic_* bounds read that country's visits instead of the total over the countries, dropping the companies with no figure for it. Ignored without a bound."},"company_website_languages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Website Languages","description":"ISO 639-1 codes in lower case, e.g. 'fr': keeps the companies whose website is published in any of them, as BuiltWith detects it. A company may publish in other languages too."},"company_employee_ranges":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Employee Ranges","description":"Employee ranges the company declares on LinkedIn: `0-1`, `2-10`, `11-50`, `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000` or `10001+`. Keeps the companies in any of them; a company that declares no range never matches. Labelled 'Declarative range on Linkedin'."},"company_country_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Country Codes","description":"ISO 3166-1 alpha-2 codes in upper case, e.g. 'FR': keeps the companies whose headquarters is in any of these countries. The head office, not where the staff works: company_profile_country_headcount_* counts a company's staff in a country."},"company_region_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Region Names","description":"French administrative regions, matched exactly: keeps the companies whose headquarters is in any of them. Read from the headquarters' postal code, which only about a quarter of French companies have, so it drops the other three quarters; company_country_codes reaches them all."},"company_postal_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Postal Codes","description":"Postal codes of the headquarters, each matched as a prefix, so '75' covers every Paris arrondissement: keeps the companies matching any of them. About 3% of companies have one (a quarter of French ones), from a source that is no longer updated. A prefix matches in every country, so combine it with company_country_codes."},"company_ape_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Ape Codes","description":"French NAF/APE activity codes, each matched as a prefix and written without its dot: '62' is computer programming and consultancy, '5610A' traditional restaurants, and a section letter from A to U covers its divisions, so 'I' is accommodation and food service. Keeps the companies matching any of them, or drops them with company_ape_codes_mode 'exclude'. Labelled 'NAF/APE'. Only French entities have one, and only the companies the French register enrichment matched carry it, a few percent of French companies, so this filter narrows the audience to that small set."},"company_ape_codes_mode":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Company Ape Codes Mode","description":"Whether company_ape_codes keeps or drops its companies; include when unset. Exclude also drops the companies with no APE code."},"company_address":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Address","description":"Address fragments, matched case-insensitively as substrings of the addresses of any of the company's locations on LinkedIn, not only its headquarters: keeps the companies matching any of them."},"company_domain_email_providers_included":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Domain Email Providers Included","description":"Mail providers of the company's domain, read from its MX records: a mailbox provider (Google, Outlook, OVH...), a security gateway (Proofpoint, Mimecast...) or 'Other', which also covers the domains with no MX record at all, about half of 'Other'. Keeps the companies with any of them. Labelled 'Email Provider'."},"company_domain_email_providers_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Domain Email Providers Excluded","description":"Mail providers, as company_domain_email_providers_included reads them: drops the companies with any of them. A domain with no MX record counts as 'Other'."},"company_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Domains","description":"Website domains, matched exactly: keeps the companies with any of them. 'stripe.com' does not match 'uk.stripe.com', and a scheme, a path or 'www.' matches nothing."},"company_domains_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Domains Excluded","description":"Website domains, matched exactly as company_domains matches them: drops the companies with any of them. A subdomain is a company of its own, so it stays."},"company_linkedin_universal_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Linkedin Universal Names","description":"LinkedIn company slugs (linkedin.com/company/<slug>), matched exactly: keeps the companies with any of them."},"company_funded_within_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Funded Within Months","description":"Keeps the companies whose latest funding round is dated within this many months, of 30 days each. Rounds come from Fundable alone, matched to the company by its LinkedIn page, and nearly every one is dated. Fundable is loaded once a month, only with the rounds it recorded from shortly before loading began, so few companies have a round and one whose latest round Fundable recorded earlier never matches. Labelled 'Recently funded'."},"company_last_funding_amount_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Last Funding Amount Min","description":"Minimum amount raised in the company's latest funding round, in US dollars as Fundable reports it. Companies with no amount never match. Labelled 'Amount raised (USD)'."},"company_last_funding_amount_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Last Funding Amount Max","description":"Maximum amount raised in the company's latest funding round, in US dollars as Fundable reports it. Companies with no amount never match."},"company_estimated_sales_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Estimated Sales Min","description":"Minimum yearly sales of the company's online store as StoreLeads estimates them, in US dollars. An estimate, not filed revenue, which company_last_sales_* reads. Labelled 'Estimated yearly sales'. The store is the one StoreLeads matched to the company's domain name, sometimes a namesake's."},"company_estimated_sales_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Estimated Sales Max","description":"Maximum yearly sales of the company's online store as StoreLeads estimates them, in US dollars. The store is the one StoreLeads matched to the company's domain name, sometimes a namesake's."},"company_last_sales_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Last Sales Min","description":"Minimum latest yearly revenue, in euros. Companies with no filed revenue never match. Not the e-commerce estimate company_estimated_sales_* reads. Labelled 'Annual revenue'. The figure comes from the French company register, matched for a few tens of thousands of companies, nearly all of them French: the others never match."},"company_last_sales_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Last Sales Max","description":"Maximum latest yearly revenue, in euros. Companies with no filed revenue never match. The figure comes from the French company register, matched for a few tens of thousands of companies, nearly all of them French: the others never match."},"company_last_funding_stages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Last Funding Stages","description":"Stages of the company's latest funding round, matched exactly: `Seed`, `Series A` to `Series M`, `SAFE`, `Equity`, `Preferred`, `Convertible note`, `Debt financing`, `Grant`, `Crowdfunding`, `Secondary market`, `Non equity assistance`, `Initial coin offering` or `Funding round`. A pre-round reads `Pre seed`, or `Pre-` and the stage, e.g. `Pre-Series A`. Keeps the companies at any of them, or drops them with company_last_funding_stages_mode 'exclude'. Labelled 'Round type'."},"company_last_funding_stages_mode":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Company Last Funding Stages Mode","description":"Whether company_last_funding_stages keeps or drops its companies; include when unset. Exclude also drops the companies with no funding round."},"company_founded_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Founded Year","description":"Year the company was founded, as LinkedIn shows it: keeps the companies founded that year or later, or that year or earlier with company_founded_year_mode 'before'. 0 sets no bound. Companies with no year never match."},"company_founded_year_mode":{"anyOf":[{"type":"string","enum":["before","after"]},{"type":"null"}],"title":"Company Founded Year Mode","description":"Which side of company_founded_year to keep; after when unset."},"company_headcount_increased":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Headcount Increased","description":"true keeps the companies whose headcount rose sharply within a year: the latest monthly LinkedIn headcount, at most 7 months old, against each of the 12 months before it, past a threshold that falls with size, from 50% at 10 to 25 employees to 15% above 500. Companies under 10 employees or with no recent headcount never match. Not a hiring signal: job_offer_* reads job postings. Cannot be combined with company_headcount_decreased. Labelled 'Headcount increase'. false is the same as leaving it unset."},"company_headcount_decreased":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Headcount Decreased","description":"true keeps the companies whose headcount fell sharply within a year, read as company_headcount_increased reads a rise, past a threshold from -25% at 10 to 50 employees to -10% above 500. Companies under 10 employees or with no recent headcount never match. Labelled 'Headcount decrease'. false is the same as leaving it unset."},"company_is_profitable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Is Profitable","description":"true keeps the companies whose latest net result is above zero. Labelled 'Profitable company'. false is the same as leaving it unset. The figure comes from the French company register, matched for a few tens of thousands of companies, nearly all of them French: the others never match."},"company_has_siren":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Has Siren","description":"true keeps the companies with a SIREN, the 9-digit number of a French legal entity. Labelled 'SIREN is present'. false is the same as leaving it unset. Only French entities have one, and only the companies the French register enrichment matched carry it, a few percent of French companies, so this filter narrows the audience to that small set."},"company_has_siret":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Has Siret","description":"true keeps the companies with the SIRET of their head office, the 14-digit number of a French establishment. Labelled 'SIRET is present'. false is the same as leaving it unset. Only French entities have one, and only the companies the French register enrichment matched carry it, a few percent of French companies, so this filter narrows the audience to that small set."},"company_has_ape_code":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Has Ape Code","description":"true keeps the companies with a NAF/APE activity code, whatever it is; company_ape_codes selects particular activities. Labelled 'NAF is present'. false is the same as leaving it unset. Only French entities have one, and only the companies the French register enrichment matched carry it, a few percent of French companies, so this filter narrows the audience to that small set."},"job_offer_title_keywords_included":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Job Offer Title Keywords Included","description":"Words or phrases found in a job posting's title, matched word by word, ignoring case and accents: a term's words in that order, side by side. Keeps the companies with a posting matching any of them. A hyphen, a dot or an apostrophe both separates and joins words, so 'e-commerce' matches 'e commerce' and 'ecommerce', and 'IBM' matches 'I.B.M.'. A final s is ignored on a word of four letters or more, unless it ends in ss, us or is, so 'startup' matches 'startups' and 'business' stays as it is. Labelled 'Job Title' under 'Hiring'. A term holding a word that starts with '.' or ends in '+' or '#' ('.NET', 'C++', 'C# developer') is matched with those symbols, so 'C++ ecommerce' matches 'C++ E-Commerce'; a dot between two of its words then starts a symbol rather than joining them."},"job_offer_title_keywords_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Job Offer Title Keywords Excluded","description":"Words or phrases matched as job_offer_title_keywords_included matches them: a posting whose title contains one cannot be the match. On its own it keeps every company with another posting: it does not drop the companies hiring for those titles."},"job_offer_seniorities_included":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Offer Seniorities Included","description":"Seniorities of a job posting, the vocabulary of profile_seniority_levels read off the posting: keeps the companies with a posting at any of them. Classified from the posting's title, else from the level the provider gives; a posting with no seniority, about a quarter of them, matches none."},"job_offer_seniorities_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Job Offer Seniorities Excluded","description":"Seniorities a posting must not have; a posting with no seniority is kept. On its own it keeps every company with another posting: it does not drop the companies hiring at those levels."},"job_offer_persona_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Job Offer Persona Ids","description":"Ids of personas whose job titles and seniorities join the job_offer_title_keywords_* and job_offer_seniorities_* lists: the company hiring for the persona, not a prospect in it. With several personas their lists merge, so a posting needs a title from any of them and none of any one's excluded titles; it is not matched persona by persona as persona_ids is. An id the customer cannot use refuses the search."},"job_offer_description_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Job Offer Description Keywords","description":"Words or phrases matched as whole words, case-insensitively, in a posting's description, so 'Alan' does not match 'balance': keeps the companies with a posting containing any of them, or all of them with job_offer_description_keywords_mode 'all'. Labelled 'Description contains'."},"job_offer_description_keywords_mode":{"anyOf":[{"type":"string","enum":["any","all"]},{"type":"null"}],"title":"Job Offer Description Keywords Mode","description":"How job_offer_description_keywords combine; any when unset."},"job_offer_posted_within_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Job Offer Posted Within Days","description":"Keeps the companies with a posting dated on or after midnight UTC this many days ago; postings with no date never match. Postings are a monthly snapshot whose newest entries are already weeks old, so a short window can match almost no company. Labelled 'Posted within the last'."},"job_offer_is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Job Offer Is Active","description":"true keeps the companies with a posting a job board still listed as active when the snapshot was taken; false requires a posting every board listed as inactive or deleted, which is not the same as unset. Labelled 'Only show active postings'."},"job_offer_accepts_remote":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Job Offer Accepts Remote","description":"true keeps the companies with a posting marked open to remote work; false requires a posting marked as not. Most postings carry no such mark and match neither, so either setting keeps few companies. Labelled 'Hiring remotely'."},"company_end_buyers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company End Buyers","description":"The function that buys what the company sells, inside its client companies: `Sales`, `Marketing`, `HR`, `Finance`, `Tech & Data`, `Legal`, `Procurement`, `Client support`, `CSE`, `ESG`, `Communication` or `Consumer`. Keeps the companies with any of them, or drops them with company_end_buyers_mode 'exclude'. Labelled 'End buyer'. Classified by an LLM in a feed that is no longer refreshed and covers about 1.5% of companies: the others match no value, in exclude mode as well."},"company_end_buyers_mode":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Company End Buyers Mode","description":"Whether company_end_buyers keeps or drops its companies; include when unset."},"company_business_statuses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Business Statuses","description":"Size and age bucket, computed from the employee count and the years since the company was founded: `Startup` (up to 200 employees and 5 years, or up to 1,000 and 2 years), `MidMarket` (up to 1,000 employees and 14 years, past the Startup limits) or `Corporate` (over 1,000 employees, or 15 years and more). Keeps the companies in any of them; a company missing an input has none, unless the other alone makes it Corporate. Labelled 'GPT category', though no AI is involved."},"company_gpt_industries":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Gpt Industries","description":"Industries in a taxonomy of their own, not LinkedIn's (company_linkedin_industries): keeps the companies in any of them, or drops them with company_gpt_industries_mode 'exclude'. Labelled 'GPT industry'. Classified by an LLM in a feed that is no longer refreshed and covers about 1.5% of companies: the others match no value, in exclude mode as well."},"company_gpt_industries_mode":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Company Gpt Industries Mode","description":"Whether company_gpt_industries keeps or drops its companies; include when unset."},"company_client_focuses":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Client Focuses","description":"Who the company sells to: `B2B`, `B2C`, `B2B/B2C` or `B2G`, matched exactly, so `B2B` does not match `B2B/B2C`. Keeps the companies with any of them. Labelled 'B2B or B2C'. Classified by an LLM in a feed that is no longer refreshed and covers about 1.5% of companies: the others match no value, in exclude mode as well."},"company_business_models":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Company Business Models","description":"Business models: `SaaS`, `Marketplace`, `Ecommerce`, `Service` or `Manufacturing`. Keeps the companies with any of them. Classified by an LLM in a feed that is no longer refreshed and covers about 1.5% of companies: the others match no value, in exclude mode as well."},"company_sales_or_product_led":{"anyOf":[{"$ref":"#/components/schemas/SalesOrProductLed"},{"type":"null"}],"description":"Keeps the companies whose go-to-market motion is this one. Labelled 'Sales Or Product Led'. Classified by an LLM in a feed that is no longer refreshed and covers about 1.5% of companies: the others match no value, in exclude mode as well."},"company_has_physical_stores":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Has Physical Stores","description":"true keeps the companies that run physical stores, false those that do not. Labelled 'Has physical stores'. Classified by an LLM in a feed that is no longer refreshed and covers about 1.5% of companies: the others match no value, in exclude mode as well."},"company_non_profit_excluded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Non Profit Excluded","description":"true drops non-profits: the companies whose domain ends in '.org' and those in LinkedIn's non-profit and civic and social organization industries. A company with no LinkedIn industry is kept. Labelled 'Exclude non-profit'. false is the same as leaving it unset."},"company_public_mode":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Company Public Mode","description":"'include' keeps only public-sector organizations, 'exclude' drops them, judged from the LinkedIn industry: government administration and relations, justice, armed forces and international affairs, public health, policy and safety, every education and hospitals and health care industry (private schools and clinics included), non- profits, and administrative and support services. Not a stock-market listing. A company with no industry is kept by exclude. Labelled 'Only public companies' and 'Exclude public companies'."},"company_online_reviews_exist":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Online Reviews Exist","description":"true keeps the companies with online reviews, false those with none. Labelled 'Has online reviews'. Read from the company's website by the data provider; companies it did not analyze match neither true nor false, so either setting also narrows the audience to the analyzed ones."},"company_api_docs_exist":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Api Docs Exist","description":"true keeps the companies that publish API documentation, false those that do not. Labelled 'Has API docs'. Read from the company's website by the data provider; companies it did not analyze match neither true nor false, so either setting also narrows the audience to the analyzed ones."},"company_pricing_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Pricing Available","description":"true keeps the companies whose website shows prices, false those whose website does not. Labelled 'Pricing available'. Read from the company's website by the data provider; companies it did not analyze match neither true nor false, so either setting also narrows the audience to the analyzed ones."},"company_free_trial_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Free Trial Available","description":"true keeps the companies offering a free trial, false those that do not. Labelled 'Free trial available'. Read from the company's website by the data provider; companies it did not analyze match neither true nor false, so either setting also narrows the audience to the analyzed ones."},"company_demo_available":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Demo Available","description":"true keeps the companies offering a demo, false those that do not. Labelled 'Demo available'. Read from the company's website by the data provider; companies it did not analyze match neither true nor false, so either setting also narrows the audience to the analyzed ones."},"company_is_downloadable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Is Downloadable","description":"true keeps the companies offering downloadable software, false those that do not. Labelled 'Downloadable file/service'. Read from the company's website by the data provider; companies it did not analyze match neither true nor false, so either setting also narrows the audience to the analyzed ones."},"company_mobile_apps_exist":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Company Mobile Apps Exist","description":"true keeps the companies with mobile apps, false those without. Labelled 'Has mobile apps'. Read from the company's website by the data provider; companies it did not analyze match neither true nor false, so either setting also narrows the audience to the analyzed ones."},"department_headcount_department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department Headcount Department Name","description":"Department in which to count the company's staff, matched exactly: its profiles in the warehouse whose latest position is at the company, ended or not, in that department: `Engineering and Technical`, `Operations`, `Sales`, `General Management`, `Other`, `Finance & Accounting`, `Education`, `Medical`, `Administrative`, `Trades`, `Customer Service`, `Project Management`, `Marketing`, `Consulting`, `Human Resources`, `Research`, `Design`, `Legal`, `Product`, `Real Estate` or `C-Suite`. Only Coresignal gives a department, and only when its record shows the profile's current company and title: a profile whose newer record shows another role has none and is not counted. Ignored without department_headcount_min or department_headcount_max, and those are ignored without it. Labelled 'Department'."},"department_headcount_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Department Headcount Min","description":"Minimum staff counted in the department; 0 also keeps the companies with nobody counted in it. Labelled 'Employee count in department'."},"department_headcount_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Department Headcount Max","description":"Maximum staff counted in the department; the companies with nobody counted in it count as 0, so they match."},"company_profile_country_headcount_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Profile Country Headcount Country Code","description":"ISO 3166-1 alpha-2 country code in upper case, e.g. 'FR', in which to count the company's staff: its profiles in the warehouse whose country, as profile_country_codes reads it, is that one and whose latest position is at the company, ended or not. Ignored without company_profile_country_headcount_min or company_profile_country_headcount_max, and those are ignored without it."},"company_profile_country_headcount_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Profile Country Headcount Min","description":"Minimum staff counted in the country; 0 also keeps the companies with nobody counted there. Labelled 'Employee count in country'."},"company_profile_country_headcount_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Profile Country Headcount Max","description":"Maximum staff counted in the country; the companies with nobody counted there count as 0, so they match."},"profile_role_type":{"anyOf":[{"$ref":"#/components/schemas/RoleType"},{"type":"null"}],"description":"How the profile reached their latest position at the company of their latest experience, even if it has ended: `new company` when it was their first position there, `promotion` when they held an earlier one there. Profiles with no experience recorded at that company match neither. With profile_job_changed_within_months, that position must also have started in that window. Labelled 'New Company only' and 'Promotion only'."},"profile_linkedin_activity_keywords":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Linkedin Activity Keywords","description":"Words or phrases matched as whole words, case-insensitively, in the text of the LinkedIn posts collected for the profile (posts only, not comments), so 'AI' does not match 'email': keeps the profiles with any of them in one post. Only about one profile in twenty has posts collected. Labelled 'Post keywords'."},"profile_job_titles_included":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Job Titles Included","description":"Words or phrases found in the title of the profile's current position, matched word by word, ignoring case and accents: a term's words in that order, side by side. Keeps the profiles matching any of them. A hyphen, a dot or an apostrophe both separates and joins words, so 'e-commerce' matches 'e commerce' and 'ecommerce', and 'IBM' matches 'I.B.M.'. A final s is ignored on a word of four letters or more, unless it ends in ss, us or is, so 'startup' matches 'startups' and 'business' stays as it is. A profile whose latest position has ended has no title and never matches. Labelled 'Job Title'. A term holding a word that starts with '.' or ends in '+' or '#' ('.NET', 'C++', 'C# developer') is matched with those symbols, so 'C++ ecommerce' matches 'C++ E-Commerce'; a dot between two of its words then starts a symbol rather than joining them."},"profile_job_titles_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Job Titles Excluded","description":"Words or phrases matched as profile_job_titles_included matches them: drops the profiles matching any of them, and those with no current title."},"profile_seniority_levels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Seniority Levels","description":"Seniority of the current title: `CEO / Founder`, `C-level`, `VP`, `Director / Head of`, `Team lead`, `Assistant`, `Freelance / Consultant`, `Intern / Junior` or `Other`. Keeps the profiles at any of them, or drops them with profile_seniority_levels_mode 'exclude'. Classified from the title, so a title not classified yet has none, and neither does a profile whose latest position has ended."},"profile_seniority_levels_mode":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Profile Seniority Levels Mode","description":"Whether profile_seniority_levels keeps or drops its profiles; include when unset. Exclude also drops the profiles with no seniority."},"profile_country_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Country Codes","description":"ISO 3166-1 alpha-2 codes in upper case, e.g. 'FR', matched exactly: keeps the profiles located in any of these countries. The country is LinkedIn's, from the person's most recent extract that gives one, set to 'FR' when the location reads 'Greater Paris Metropolitan Region' or 'Paris, Ile-de-France' with its accent; when none gives one, it is guessed from city or country names in the location. The location comes from the record that gives the current title, so for a person who moved the two can disagree. The structured form of profile_location_included."},"profile_languages":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Languages","description":"Languages listed on the LinkedIn profile, matched exactly by their English name, e.g. 'English' or 'French': keeps the profiles speaking any of them, or all of them with profile_languages_mode 'and'. Most profiles list none."},"profile_language_proficiencies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Language Proficiencies","description":"LinkedIn proficiency levels, e.g. 'Full Professional' or 'Native or Bilingual': keeps the profiles with a language at any of them, and with profile_languages, one of those languages. Labelled 'Proficiency'."},"profile_languages_mode":{"anyOf":[{"type":"string","enum":["and","or"]},{"type":"null"}],"title":"Profile Languages Mode","description":"How profile_languages combine: 'or' when unset, any of them; 'and', every one."},"profile_skills":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Skills","description":"Skills found in one skill listed on the profile, matched word by word, ignoring case and accents: a term's words in that order, side by side, so 'sql' matches 'SQL Server' but not 'PostgreSQL'. Keeps the profiles listing any of them, or drops them with profile_skills_mode 'exclude'. A hyphen, a dot or an apostrophe both separates and joins words, so 'e-commerce' matches 'e commerce' and 'ecommerce', and 'IBM' matches 'I.B.M.'. A final s is ignored on a word of four letters or more, unless it ends in ss, us or is, so 'startup' matches 'startups' and 'business' stays as it is. A term holding a word that starts with '.' or ends in '+' or '#' ('.NET', 'C++', 'C# developer') is matched with those symbols, so 'C++ ecommerce' matches 'C++ E-Commerce'; a dot between two of its words then starts a symbol rather than joining them."},"profile_skills_mode":{"anyOf":[{"type":"string","enum":["include","exclude"]},{"type":"null"}],"title":"Profile Skills Mode","description":"Whether profile_skills keeps or drops its profiles; include when unset. Exclude keeps the profiles that list no skill."},"profile_connections_count_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Connections Count Min","description":"Minimum LinkedIn connections; 0 is the same as unset. Profiles with no count recorded are kept. Labelled 'Number of connections on LinkedIn'."},"profile_connections_count_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Connections Count Max","description":"Maximum LinkedIn connections; 0 is the same as unset. Profiles with no count recorded are dropped."},"profile_years_of_experience_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Years Of Experience Min","description":"Minimum years since the start of the profile's earliest experience. Profiles with none recorded never match. Labelled 'Total experience'."},"profile_years_of_experience_max":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Years Of Experience Max","description":"Maximum years since the start of the profile's earliest experience. Profiles with none recorded never match."},"profile_job_changed_within_months":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Job Changed Within Months","description":"Keeps the profiles who started a position at the company of their latest experience within this many months, even if it has since ended; 0 is the same as unset. Labelled 'New job'."},"profile_scraped_within_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Scraped Within Days","description":"Keeps the profiles whose LinkedIn record was refreshed within this many days: the record that gives the current title, refreshed by a full extract, by a Sales Navigator search, which refreshes only the title, company, headline and location, or by Coresignal checking the profile, which reloads nothing. Searches account for nearly every profile refreshed within the last month; Coresignal, which supplies nearly every profile, is loaded about once a month. Labelled 'Data refreshed in last...'."},"max_profiles_per_company":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Profiles Per Company","description":"Keeps at most this many profiles of each company: the ones scraped most recently first, then a stable random draw. A profile with no company is never capped. A table mode caps the profiles of its CRM status alone, so a count's in-CRM and not-in-CRM profile figures are the parts of the whole capped set, not what a search under the 'in_crm' or 'new' table mode keeps: that is the count under the same table mode. Labelled 'Max people per company'."},"profile_location_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Location Excluded","description":"Words or phrases matched as profile_location_included matches them: drops the profiles matching any of them, and those with no location."},"profile_location_included":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Location Included","description":"Words or phrases found in the location written on the LinkedIn profile, matched word by word, ignoring case and accents: a term's words in that order, side by side, so 'Ile-de-France' also matches its accented spelling, and 'Lyon' does not match 'Lyons'. Keeps the profiles matching any of them. A hyphen, a dot or an apostrophe both separates and joins words, so 'e-commerce' matches 'e commerce' and 'ecommerce', and 'IBM' matches 'I.B.M.'. Free text; profile_country_codes is the structured country. Labelled 'Location'. A term holding a word that starts with '.' or ends in '+' or '#' ('.NET', 'C++', 'C# developer') is matched with those symbols, so 'C++ ecommerce' matches 'C++ E-Commerce'; a dot between two of its words then starts a symbol rather than joining them."},"profile_linkedin_public_identifiers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Linkedin Public Identifiers","description":"LinkedIn public slugs (linkedin.com/in/<slug>), matched once lowercased and percent-decoded: keeps those profiles. A profile that renamed its slug is found under the old one too."},"profile_education_institutions":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Education Institutions","description":"Words or phrases matched as whole words, case-insensitively, in the name of a school in the profile's education: keeps the profiles matching any of them. Every profile_education_* filter must hold on the same school entry. Labelled 'Institution'."},"profile_education_field_of_study":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Education Field Of Study","description":"Words or phrases matched as whole words, case-insensitively, in the field of study of an education entry, on the entry the other profile_education_* filters match. Labelled 'Field of study'."},"profile_education_graduation_year_from":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Education Graduation Year From","description":"Earliest year an education entry ended; entries with no end year never match. Labelled 'Graduation year'."},"profile_education_graduation_year_to":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Education Graduation Year To","description":"Latest year an education entry ended; entries with no end year never match."},"profile_education_linkedin_urls":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Profile Education Linkedin Urls","description":"LinkedIn school page URLs, matched on the school identifier that ends the URL. Labelled 'Education LinkedIn URL'."},"profile_certification_issuers":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Certification Issuers","description":"Names found in the issuer of a certification on the profile, matched word by word, ignoring case and accents: a term's words in that order, side by side, so 'ISC' does not match 'ISC2'. Keeps the profiles matching any of them. A hyphen, a dot or an apostrophe both separates and joins words, so 'e-commerce' matches 'e commerce' and 'ecommerce', and 'IBM' matches 'I.B.M.'. Every profile_certification_* filter must hold on the same certification. Labelled 'Issuer'. A term holding a word that starts with '.' or ends in '+' or '#' ('.NET', 'C++', 'C# developer') is matched with those symbols, so 'C++ ecommerce' matches 'C++ E-Commerce'; a dot between two of its words then starts a symbol rather than joining them."},"profile_certification_titles":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":1000},{"type":"null"}],"title":"Profile Certification Titles","description":"Names matched as whole words, case-insensitively, in the title of a certification on the profile, so 'AWS' does not match 'Laws': keeps the profiles matching any of them. Labelled 'Title'."},"profile_certification_obtained_year_from":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Certification Obtained Year From","description":"Earliest year a certification was obtained; certifications with no year never match. Labelled 'Obtained year'."},"profile_certification_obtained_year_to":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Certification Obtained Year To","description":"Latest year a certification was obtained; certifications with no year never match."},"profile_not_contacted_within_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Not Contacted Within Days","description":"Drops the profiles the customer's campaigns contacted, on any channel, within this many days; the profiles never contacted are kept. Labelled 'Exclude users already contacted in...'."},"profile_nb_replied_min":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Profile Nb Replied Min","description":"Minimum replies the profile ever sent the customer's campaigns, by email or on LinkedIn, with no time window. A profile never contacted counts as 0. Labelled 'Number of replies'."},"profile_nb_replied_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Profile Nb Replied Max","description":"Maximum replies the profile ever sent the customer's campaigns; 0 keeps the profiles who never replied, the never contacted included."},"profile_nb_sent_min":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Profile Nb Sent Min","description":"Minimum emails the customer's campaigns ever sent the profile, with no time window; LinkedIn messages are not counted. A profile never contacted counts as 0, so 1 asks for the profiles already emailed. Labelled 'Number of messages sent'."},"profile_nb_sent_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Profile Nb Sent Max","description":"Maximum emails the customer's campaigns ever sent the profile; 0 keeps the profiles never emailed."},"outbound_receptiveness_score_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Outbound Receptiveness Score Min","description":"Minimum outbound receptiveness score, from -1 to 5: how far the profile went in any outbound campaign, every customer's counted (4 interested, 3 replied, 2 opened, 1 contacted, else 0), plus how well cold email lands with their company's mail provider (1 for Google, OVH, IONOS, Gandi or Cloudflare, -1 for a security gateway or a privacy-first provider, else 0). A half with no data counts as 0. Labelled 'Outbound Receptiveness Score'."},"outbound_receptiveness_score_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Outbound Receptiveness Score Max","description":"Maximum outbound receptiveness score, as outbound_receptiveness_score_min reads it."},"profile_keys_included":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10000},{"type":"null"}],"title":"Profile Keys Included","description":"Warehouse profile keys: keeps only these profiles."},"profile_keys_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10000},{"type":"null"}],"title":"Profile Keys Excluded","description":"Warehouse profile keys: drops these profiles."},"company_keys_included":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10000},{"type":"null"}],"title":"Company Keys Included","description":"Warehouse company keys: keeps only these companies."},"company_keys_excluded":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10000},{"type":"null"}],"title":"Company Keys Excluded","description":"Warehouse company keys: drops these companies."},"company_semantic_text":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Company Semantic Text","description":"Description of the companies sought, in plain words: keeps the companies semantically closest to it, the closest first, among those the other filters keep. At most the 10,000 closest companies of the index are considered, so with broad other filters the result can miss companies they keep. Labelled 'Describe the companies you're looking for'."},"company_semantic_min_score":{"anyOf":[{"type":"number","exclusiveMaximum":1.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Company Semantic Min Score","description":"Lowest similarity a company needs to company_semantic_text; 0.35 when unset. Needs company_semantic_text. Labelled 'Minimum relevance score'."},"company_semantic_max_results":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Company Semantic Max Results","description":"Keeps at most this many of the companies closest to company_semantic_text. Needs company_semantic_text. Counts ignore it and report every company above the minimum score. Labelled 'Top-N companies admitted'."}},"type":"object","title":"SearchFilter","description":"The filters of an Audience Builder search.\n\nEvery field is optional, and an unset field does not filter; an empty list is the same as\nan unset one. Filters combine with AND, and the values of one list with OR unless its\ndescription says otherwise. Bounds are inclusive.\n\nA company search returns the companies with at least one profile that passes the profile\nfilters, so a company with no profile in the warehouse is never returned. The company table\nholds only the companies with a known website domain. A profile count leaves out the\nprofiles with no company there, and a profile search drops them whenever it filters on\nthe company (the company_* and job_offer_* fields, custom_data_points and the outbound\nreceptiveness score) or returns a company field. Every job_offer_* filter must hold on the\nsame job posting, so two conditions met by two different postings do not match.\n\nCompany and profile records come mostly from Coresignal, loaded about once a month. Job\npostings are Coresignal's alone, a monthly snapshot that replaces the previous one, so the\nnewest postings are already weeks old."},"SearchResultsCount":{"properties":{"company_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Count"},"company_in_crm_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company In Crm Count"},"company_without_persona_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Without Persona Count"},"profile_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Count"},"profile_in_crm_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile In Crm Count"},"profile_in_crm_company_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile In Crm Company Count"},"profile_not_in_crm_company_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Not In Crm Company Count"},"enrichable_company_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enrichable Company Count"},"enrichable_profile_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Enrichable Profile Count"},"profile_not_in_crm_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Not In Crm Count","readOnly":true},"company_not_in_crm_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Not In Crm Count","readOnly":true}},"type":"object","required":["company_count","company_in_crm_count","company_without_persona_count","profile_count","profile_not_in_crm_count","company_not_in_crm_count"],"title":"SearchResultsCount"},"SearchScalaVarsPayload":{"properties":{"search_filters":{"$ref":"#/components/schemas/SearchFilter"},"sample_size":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Sample Size"},"table_mode":{"anyOf":[{"$ref":"#/components/schemas/TableMode"},{"type":"null"}]},"projection":{"anyOf":[{"$ref":"#/components/schemas/InternalProfileSearchProjectionRequest"},{"type":"null"}]},"scala_vars":{"items":{"$ref":"#/components/schemas/CampaignScalaVarsPayload"},"type":"array","title":"Scala Vars"},"language":{"type":"string","title":"Language","default":"fr"}},"additionalProperties":false,"type":"object","required":["search_filters","sample_size","scala_vars"],"title":"SearchScalaVarsPayload","description":"Run a profile search and resolve a declaration list against its hits, in one call.\n\n``ResolveScalaVarsPayload`` with the hydration inverted. There the caller brings the\nprofile keys and the search only fills their columns; here the search defines the\npopulation and the keys fall out of it, which is what a preview sampling an audience\nneeds. Both bodies carry the same ``scala_vars`` shape a campaign publishes, and both\nresolve it through the same ``ScalaVarsMapper``, so the two cannot answer differently\nfor one profile.\n\n``projection`` is what the caller reads off the hits itself, in the shape the internal\nAB search takes. It is not the whole projection the search runs: a declaration is\nresolved off the hydrated row, so the flags its ``audience_builder_field_key`` needs\nare merged in here and the response carries columns the caller never asked for. Asking\nthe caller to project for its own declarations instead is how an under-projected\nrequest resolves to empty tokens rather than to an error.\n\n``search_filters`` is the audience, not a hydration hint as it is on the resolve\nendpoint: it selects the profiles *and* populates the ``computed.*`` intersections,\nsince each is built inside the filter handler that owns it."},"SearchScalaVarsResponse":{"properties":{"profiles":{"items":{"$ref":"#/components/schemas/ProfileSearchResponseV2"},"type":"array","title":"Profiles"},"scala_vars":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Scala Vars"}},"type":"object","required":["profiles","scala_vars"],"title":"SearchScalaVarsResponse","description":"The search hits, and the values the declarations resolved to for them.\n\n``scala_vars`` is keyed by profile_key then by the declaration's ``key``, and carries\nexactly what ``ResolveScalaVarsResponse.results`` carries for the same declarations\nover the same profiles: the ``hpp`` half, every declaration whatever its\n``push_to_crm``, profiles that resolved nothing omitted rather than mapped to an empty\ndict.\n\nTwo fields rather than a value on each hit, because that is the shape both ends\nalready hold it in: the resolver returns one map keyed by profile key, and the caller\noverlays it on rows it has keyed the same way."},"SendBackStrategyCampaignPayload":{"properties":{"to":{"$ref":"#/components/schemas/StrategyCampaignSendBackStatus","description":"The step to return to: the campaign's own, or an earlier one. It and every later step are reviewed again."},"comment":{"type":"string","minLength":1,"title":"Comment","description":"What has to change."},"expected_event_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Event Id","description":"The campaign's `last_event_id` as the decision was taken on it. If the campaign has changed since, the request is a 409 rather than acting on a state its author never saw."}},"additionalProperties":false,"type":"object","required":["to","comment","expected_event_id"],"title":"SendBackStrategyCampaignPayload"},"SequenceStep":{"properties":{"type":{"type":"string","enum":["email","linkedinInvite","linkedinSend"],"title":"Type"},"name":{"type":"string","pattern":"^(?:li_invite|(?:email|li_msg)_[1-9]\\d*)$","title":"Name"},"role":{"$ref":"#/components/schemas/StepRole"},"wait_days":{"type":"integer","minimum":0.0,"title":"Wait Days"},"reply_in_thread":{"type":"boolean","title":"Reply In Thread","default":false}},"type":"object","required":["type","name","role","wait_days","reply_in_thread"],"title":"SequenceStep","description":"A step somebody writes: an email, an invitation or a LinkedIn message."},"SetCreditsEnabledPayload":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"actor":{"anyOf":[{"$ref":"#/components/schemas/CreditActorPayload"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"SetCreditsEnabledPayload"},"SettleReservationPayload":{"properties":{"delivered_amount":{"type":"integer","minimum":0.0,"title":"Delivered Amount","description":"Credits to debit, at most those held."},"delivered_quantity":{"type":"integer","minimum":0.0,"title":"Delivered Quantity"},"vendor_cost":{"anyOf":[{"items":{"$ref":"#/components/schemas/VendorCost-Input"},"type":"array"},{"type":"null"}],"title":"Vendor Cost","description":"What the work cost us, one entry per currency, never converted."}},"additionalProperties":false,"type":"object","required":["delivered_amount","delivered_quantity"],"title":"SettleReservationPayload"},"SignalCompaniesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SignalCompanyResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"SignalCompaniesPage","description":"Companies matching the types, most recent match first."},"SignalCompanyResponse":{"properties":{"company_key":{"type":"string","title":"Company Key"},"latest_occurred_at":{"type":"string","format":"date-time","title":"Latest Occurred At"}},"type":"object","required":["company_key","latest_occurred_at"],"title":"SignalCompanyResponse","description":"A company with at least one matching signal, and when its most recent match occurred."},"SignalEventResponse":{"properties":{"signal_id":{"type":"string","title":"Signal Id"},"signal_type":{"$ref":"#/components/schemas/SignalType"},"category":{"type":"string","enum":["hiring","people_move","funding"],"title":"Category"},"entity_type":{"type":"string","enum":["company","profile"],"title":"Entity Type"},"company_key":{"type":"string","title":"Company Key"},"profile_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Key"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"occurred_at_precision":{"anyOf":[{"type":"string","enum":["day","month"]},{"type":"null"}],"title":"Occurred At Precision"},"detected_at":{"type":"string","format":"date-time","title":"Detected At"},"signal_title":{"type":"string","title":"Signal Title"},"signal_attributes":{"additionalProperties":true,"type":"object","title":"Signal Attributes"},"dedup_key":{"type":"string","title":"Dedup Key"}},"type":"object","required":["signal_id","signal_type","category","entity_type","company_key","profile_key","occurred_at","occurred_at_precision","detected_at","signal_title","signal_attributes","dedup_key"],"title":"SignalEventResponse","description":"One signal. `signal_attributes` holds the fields of its type and nothing else."},"SignalType":{"type":"string","enum":["key_role_opening","hiring_surge","key_person_joined","key_person_left","arrivals_wave","departures_wave","funding_round"],"title":"SignalType","description":"A row of ``final_signal_events``, as dbt accepts it."},"SignalsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SignalEventResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"SignalsPage","description":"Signals matching the keys, most recent first."},"SplitEdgesSearchPayload":{"properties":{"search_url":{"type":"string","maxLength":8000,"pattern":"^https://([a-z]{2,3}\\.)?linkedin\\.com/sales/search/people.+","title":"Search Url","description":"A Sales Navigator people search URL: `https://www.linkedin.com/sales/search/people?…`."}},"type":"object","required":["search_url"],"title":"SplitEdgesSearchPayload"},"StaticCompanyProjectionRequest":{"properties":{"account_crm_id":{"type":"boolean","title":"Account Crm Id","default":false},"captain_data_specialties":{"type":"boolean","title":"Captain Data Specialties","default":false},"captain_data_type":{"type":"boolean","title":"Captain Data Type","default":false},"company_key":{"type":"boolean","title":"Company Key","default":false},"company_linkedin_url":{"type":"boolean","title":"Company Linkedin Url","default":false},"company_location_city":{"type":"boolean","title":"Company Location City","default":false},"company_name":{"type":"boolean","title":"Company Name","default":false},"country_code":{"type":"boolean","title":"Country Code","default":false},"domain_email_provider":{"type":"boolean","title":"Domain Email Provider","default":false},"domain_email_provider_outbound_score":{"type":"boolean","title":"Domain Email Provider Outbound Score","default":false},"domain":{"type":"boolean","title":"Domain","default":false},"emails":{"type":"boolean","title":"Emails","default":false},"phone_numbers":{"type":"boolean","title":"Phone Numbers","default":false},"ecommerce_platforms":{"type":"boolean","title":"Ecommerce Platforms","default":false},"ecommerce_most_recently_published_product_title":{"type":"boolean","title":"Ecommerce Most Recently Published Product Title","default":false},"employees_count":{"type":"boolean","title":"Employees Count","default":false},"employees_range":{"type":"boolean","title":"Employees Range","default":false},"headcount_increased":{"type":"boolean","title":"Headcount Increased","default":false},"headcount_decreased":{"type":"boolean","title":"Headcount Decreased","default":false},"event_manual_funding_last_funding_amount":{"type":"boolean","title":"Event Manual Funding Last Funding Amount","default":false},"event_manual_funding_last_funding_at":{"type":"boolean","title":"Event Manual Funding Last Funding At","default":false},"last_funding_stage":{"type":"boolean","title":"Last Funding Stage","default":false},"last_sales":{"type":"boolean","title":"Last Sales","default":false},"last_profit":{"type":"boolean","title":"Last Profit","default":false},"founded_year":{"type":"boolean","title":"Founded Year","default":false},"gpt_business_model":{"type":"boolean","title":"Gpt Business Model","default":false},"gpt_business_status":{"type":"boolean","title":"Gpt Business Status","default":false},"gpt_client_focus":{"type":"boolean","title":"Gpt Client Focus","default":false},"gpt_description":{"type":"boolean","title":"Gpt Description","default":false},"gpt_end_buyer":{"type":"boolean","title":"Gpt End Buyer","default":false},"gpt_industry":{"type":"boolean","title":"Gpt Industry","default":false},"gpt_ngo_tag":{"type":"boolean","title":"Gpt Ngo Tag","default":false},"gpt_physical_store":{"type":"boolean","title":"Gpt Physical Store","default":false},"gpt_sales_product_led":{"type":"boolean","title":"Gpt Sales Product Led","default":false},"is_hiring":{"type":"boolean","title":"Is Hiring","default":false},"linkedin_id":{"type":"boolean","title":"Linkedin Id","default":false},"linkedin_industry":{"type":"boolean","title":"Linkedin Industry","default":false},"linkedin_universal_name":{"type":"boolean","title":"Linkedin Universal Name","default":false},"matching_job_accepts_remote":{"type":"boolean","title":"Matching Job Accepts Remote","default":false},"matching_job_description":{"type":"boolean","title":"Matching Job Description","default":false},"matching_job_posted_at":{"type":"boolean","title":"Matching Job Posted At","default":false},"matching_job_seniority":{"type":"boolean","title":"Matching Job Seniority","default":false},"matching_job_sources":{"type":"boolean","title":"Matching Job Sources","default":false},"matching_job_title":{"type":"boolean","title":"Matching Job Title","default":false},"matching_job_url":{"type":"boolean","title":"Matching Job Url","default":false},"matching_tags":{"type":"boolean","title":"Matching Tags","default":false},"matching_technologies":{"type":"boolean","title":"Matching Technologies","default":false},"matching_address":{"type":"boolean","title":"Matching Address","default":false},"company_ape_code":{"type":"boolean","title":"Company Ape Code","default":false},"postal_code":{"type":"boolean","title":"Postal Code","default":false},"raw_company_name":{"type":"boolean","title":"Raw Company Name","default":false},"siren":{"type":"boolean","title":"Siren","default":false},"siret":{"type":"boolean","title":"Siret","default":false},"static_tags":{"type":"boolean","title":"Static Tags","default":false},"website_estimated_monthly_visits_growth_rate":{"type":"boolean","title":"Website Estimated Monthly Visits Growth Rate","default":false},"website_estimated_monthly_visits_max_value":{"type":"boolean","title":"Website Estimated Monthly Visits Max Value","default":false},"website_total_non_domestic_traffic":{"type":"boolean","title":"Website Total Non Domestic Traffic","default":false},"website_traffic_repartition":{"type":"boolean","title":"Website Traffic Repartition","default":false}},"additionalProperties":false,"type":"object","title":"StaticCompanyProjectionRequest"},"StaticField":{"properties":{"value":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Value"},"namespace":{"type":"string","const":"static","title":"Namespace","default":"static"}},"type":"object","required":["value"],"title":"StaticField"},"StaticProfileProjectionRequest":{"properties":{"captain_data_competitor_followers_array":{"type":"boolean","title":"Captain Data Competitor Followers Array","default":false},"captain_data_competitor_followers_list":{"type":"boolean","title":"Captain Data Competitor Followers List","default":false},"contact_crm_id":{"type":"boolean","title":"Contact Crm Id","default":false},"country_code":{"type":"boolean","title":"Country Code","default":false},"first_name":{"type":"boolean","title":"First Name","default":false},"full_name":{"type":"boolean","title":"Full Name","default":false},"gender":{"type":"boolean","title":"Gender","default":false},"languages":{"type":"boolean","title":"Languages","default":false},"last_name":{"type":"boolean","title":"Last Name","default":false},"linkedin_id":{"type":"boolean","title":"Linkedin Id","default":false},"linkedin_nb_days_since_last_extract":{"type":"boolean","title":"Linkedin Nb Days Since Last Extract","default":false},"linkedin_post_liker_post_id_list":{"type":"boolean","title":"Linkedin Post Liker Post Id List","default":false},"linkedin_public_identifier":{"type":"boolean","title":"Linkedin Public Identifier","default":false},"linkedin_role_type":{"type":"boolean","title":"Linkedin Role Type","default":false},"linkedin_tenure_start_date":{"type":"boolean","title":"Linkedin Tenure Start Date","default":false},"linkedin_url":{"type":"boolean","title":"Linkedin Url","default":false},"location":{"type":"boolean","title":"Location","default":false},"matching_education":{"type":"boolean","title":"Matching Education","default":false},"matching_linkedin_pages":{"type":"boolean","title":"Matching Linkedin Pages","default":false},"matching_past_xp":{"type":"boolean","title":"Matching Past Xp","default":false},"matching_personas":{"type":"boolean","title":"Matching Personas","default":false},"position_category":{"type":"boolean","title":"Position Category","default":false},"position_seniority":{"type":"boolean","title":"Position Seniority","default":false},"position_title":{"type":"boolean","title":"Position Title","default":false},"profile_id":{"type":"boolean","title":"Profile Id","default":false},"profile_key":{"type":"boolean","title":"Profile Key","default":false},"raw_first_name":{"type":"boolean","title":"Raw First Name","default":false},"raw_full_name":{"type":"boolean","title":"Raw Full Name","default":false},"raw_last_name":{"type":"boolean","title":"Raw Last Name","default":false},"sales_navigator_id":{"type":"boolean","title":"Sales Navigator Id","default":false},"tenure_length_total_month":{"type":"boolean","title":"Tenure Length Total Month","default":false},"nb_years_of_experience":{"type":"boolean","title":"Nb Years Of Experience","default":false},"engagement_score":{"type":"boolean","title":"Engagement Score","default":false},"updated_at":{"type":"boolean","title":"Updated At","default":false}},"additionalProperties":false,"type":"object","title":"StaticProfileProjectionRequest"},"StaticWriteFieldPayload":{"properties":{"namespace":{"type":"string","const":"static","title":"Namespace","default":"static"},"value":{"anyOf":[{"type":"string","minLength":1},{"items":{"type":"string","minLength":1},"type":"array","minItems":1}],"title":"Value"}},"type":"object","required":["value"],"title":"StaticWriteFieldPayload"},"StepRole":{"type":"string","enum":["email_opener","email_follow_up","email_reactivation","linkedin_invitation","linkedin_opener","linkedin_message"],"title":"StepRole","description":"What a step is for, declared on the step and never inferred from its position.\n\nA gap is evidence of intent and not the intent itself: two emails sixty days apart\nare a restart when the author meant one and a slow nurture when they did not, and\nthe writer's rules key on the answer. Whoever states the layout is the only one who\nknows, so the layout states it."},"StepStatus":{"properties":{"status":{"$ref":"#/components/schemas/PlaybookStepStatus"},"progress":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress"}},"type":"object","required":["status","progress"],"title":"StepStatus"},"StoredRecord":{"properties":{"profile_key":{"type":"string","title":"Profile Key"},"company_key":{"type":"string","title":"Company Key"},"profile":{"anyOf":[{"$ref":"#/components/schemas/AudienceRecordProfileDisplay"},{"type":"null"}]},"company":{"anyOf":[{"$ref":"#/components/schemas/AudienceRecordCompanyDisplay"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"A playbook record's enrichment result; an uploaded record's own; null on a searched audience's member."},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"playbook":{"anyOf":[{"$ref":"#/components/schemas/StoredRecordPlaybook"},{"type":"null"}],"description":"Where the record is in its playbook, in a list of a playbook's records."},"extra_data":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Extra Data","description":"The extra columns of a record uploaded with its audience; null on a searched one."},"scala_vars":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Scala Vars","description":"With `include=scala_vars`: what the playbook's variables resolved to for the record, every one that resolved, as the copy receives them; `{}` when the playbook declares none; null until resolved, or for a record they are not resolved for."},"full":{"anyOf":[{"$ref":"#/components/schemas/ProfileSearchResponseV2"},{"type":"null"}],"description":"With `include=full`: the record's whole search row, for a member of its audience's sample, its first 50 active records; null for any other."}},"type":"object","required":["profile_key","company_key","profile","company","email","phone","playbook","extra_data","scala_vars","full"],"title":"StoredRecord"},"StoredRecordPlaybook":{"properties":{"record_id":{"type":"integer","title":"Record Id"},"status":{"$ref":"#/components/schemas/PlaybookRecordStatus","description":"`skipped` when the record was skipped, else `error` when it or its CRM push holds an error, else `done` once its workflow is over, else `in_progress`."},"step":{"$ref":"#/components/schemas/PlaybookRecordWorkflowStep"},"is_skipped":{"type":"boolean","title":"Is Skipped"},"step_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Step Error"},"crm_matched_contact_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Matched Contact Url"},"crm_matched_account_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Matched Account Url"},"crm_pushed_contact_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Pushed Contact Url"},"crm_pushed_account_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Pushed Account Url"}},"type":"object","required":["record_id","status","step","is_skipped","step_error","crm_matched_contact_url","crm_matched_account_url","crm_pushed_contact_url","crm_pushed_account_url"],"title":"StoredRecordPlaybook"},"StrategyCampaignAction":{"type":"string","enum":["proposed","revised","reworked","rework_unanswered","validated","changes_requested","refused","unrefused","retired","started","paused","resumed","adopted","reopened"],"title":"StrategyCampaignAction"},"StrategyCampaignActivationResponse":{"properties":{"lemlist_sync_status":{"anyOf":[{"$ref":"#/components/schemas/LemlistSyncStatus"},{"type":"null"}],"description":"The Lemlist push. Null means it was never queued, or was withdrawn."},"lemlist_sync_attempts":{"type":"integer","title":"Lemlist Sync Attempts","description":"The push's attempts since it was last queued."},"crm_lists_created":{"type":"boolean","title":"Crm Lists Created","description":"A CRM list id is stored for the email channel, the LinkedIn channel, or both."}},"type":"object","required":["lemlist_sync_status","lemlist_sync_attempts","crm_lists_created"],"title":"StrategyCampaignActivationResponse","description":"How far the playbook's push to Lemlist got. Present only at `external_review`.\n\nThe copy's validation queues that push, or, for an adopted campaign, whoever published the\nplaybook before it was adopted.\n\nA campaign sitting there with nothing sent, and a push that keeps failing, shows it\nhere rather than only in the workers' retry state."},"StrategyCampaignAsset":{"type":"string","enum":["audience","copy"],"title":"StrategyCampaignAsset","description":"What a campaign references and reviews, edited where it lives rather than on the campaign."},"StrategyCampaignAudienceResponse":{"properties":{"campaign_id":{"type":"integer","title":"Campaign Id"},"audience_id":{"type":"integer","title":"Audience Id"},"audience_revision":{"type":"integer","title":"Audience Revision"},"source":{"$ref":"#/components/schemas/StrategyCampaignAudienceSource"},"snapshot":{"$ref":"#/components/schemas/StrategyCampaignAudienceSnapshot"}},"type":"object","required":["campaign_id","audience_id","audience_revision","source","snapshot"],"title":"StrategyCampaignAudienceResponse","description":"A campaign's contacts summarized as its audience's last refresh stored them.\n\nAn audience built from uploaded records has no refresh: its contacts are its rows. The\ncontacts themselves are on `GET …/records`."},"StrategyCampaignAudienceSnapshot":{"properties":{"state":{"$ref":"#/components/schemas/AudienceSnapshotState"},"revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Revision","description":"The audience revision the counts and records were stored from; null before the first refresh that stores it, and always on an audience built from uploaded records, which is never refreshed."},"refreshed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Refreshed At"},"counts":{"anyOf":[{"$ref":"#/components/schemas/SearchResultsCount"},{"type":"null"}],"description":"With `source` `playbook`, the contacts the playbook carries, counted on each read: `profile_count` is `record_count`, the CRM split, of the contacts and of the companies, is the one the playbook's matching made, a contact or company not matched yet counting as not in the CRM, and the other fields are null. With `source` `audience`, the search as of the audience's last refresh."},"guardrail":{"anyOf":[{"$ref":"#/components/schemas/AudienceErrorType"},{"type":"null"}],"description":"The size guardrail the last refresh tripped, when it tripped one."},"failed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Failed At","description":"When the refresh of the current revision failed, in state `failed`."},"record_count":{"type":"integer","title":"Record Count","description":"Every record of `source`."}},"type":"object","required":["state","revision","refreshed_at","counts","guardrail","failed_at","record_count"],"title":"StrategyCampaignAudienceSnapshot"},"StrategyCampaignAudienceSource":{"type":"string","enum":["playbook","audience"],"title":"StrategyCampaignAudienceSource","description":"Where a campaign's reviewed contacts are read from.\n\nThe playbook's records once the campaign is live (`external_review`, `running`, `paused`),\nsince they are the contacts it carries: every one it took, whether or not the audience still\nselects it, except those skipped, which never reach the campaign, and those an exclusion took\nout. Before that the playbook holds none, and the audience's active records are what it will\ntake."},"StrategyCampaignDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"intent":{"type":"string","title":"Intent"},"title":{"type":"string","title":"Title"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale","description":"The strategic agent's reasoning, in markdown, as the model wrote it, for its own reflection and for display. Its content and layout are the writer's: no reader expects a format in it or extracts anything from it. A reference written as `<kind>#<id>`, e.g. `audience#1234`, may be rendered as a link. Null when none was written. A campaign a person plans usually has none, their words being the `summary`. Who proposed a campaign is the `proposed` event's actor and caller, never inferred from this field."},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Null until written. The campaign as the SE and the client read it, in markdown, rendered whole, so nothing in it is internal. Its sections, their titles and its language are the writer's: no reader expects any of them or extracts anything from it."},"planned_launch_date":{"type":"string","format":"date","title":"Planned Launch Date","description":"The day the launch is planned for, any day. A plan made to the month or the week names a day in it; nothing records how precise the plan was, and each front end rounds the day for display."},"audience_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audience Id","description":"Null until attached."},"playbook_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playbook Id","description":"Null until attached."},"replaces_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Replaces Id"},"status":{"$ref":"#/components/schemas/StrategyCampaignStatus"},"idea_validated":{"type":"boolean","title":"Idea Validated"},"audience_validated":{"type":"boolean","title":"Audience Validated"},"copy_validated":{"type":"boolean","title":"Copy Validated"},"client_validated":{"type":"boolean","title":"Client Validated","description":"The client validated at `external_review`, which leaves the status there."},"client_review_reopened":{"type":"boolean","title":"Client Review Reopened","description":"An SE reopened the client review after the client had validated it, before the first send: the campaign is at `external_review`, its Lemlist campaigns paused, until the client validates it again, which resumes them. Nothing else starts them meanwhile."},"first_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Sent At","description":"When the first Lemlist send was observed. That observation is what moves the campaign to `running`."},"activation":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignActivationResponse"},{"type":"null"}],"description":"Set at `external_review`: how far the playbook's push to Lemlist got. Null at every other status."},"lemlist_campaigns":{"items":{"$ref":"#/components/schemas/StrategyCampaignLemlistCampaignResponse"},"type":"array","title":"Lemlist Campaigns","description":"The playbook's campaigns in Lemlist, oldest first, whatever the campaign's status: a refused or retired campaign keeps listing them once it has asked Lemlist to pause them. Empty with no playbook, and until the playbook is pushed: by the copy's validation, or before an adopted playbook was adopted. Each is listed only once Lemlist has created it, so the list alone does not say whether one is still to come: `lemlist_campaigns_complete` does."},"lemlist_campaigns_complete":{"type":"boolean","title":"Lemlist Campaigns Complete","description":"Whether `lemlist_campaigns` holds a campaign for each sequence the playbook stores, and every one it holds is `BUILT`. False with no playbook, and until the push has created and built every one: while Lemlist has not created one yet, after its creation failed and waits for a retry or for the team, and while one is `BUILDING`. A playbook that stores no sequence, whose Lemlist campaigns are made outside the push, needs one at least.","default":false},"last_event_id":{"type":"integer","title":"Last Event Id","description":"The id of the newest event: the campaign's version, which a review sends back as `expected_event_id`."},"last_event":{"$ref":"#/components/schemas/StrategyCampaignEventResponse","description":"The newest event, the one `last_event_id` names: who acted last, what it did, and with what comment."},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignSuggestionResponse"},{"type":"null"}],"description":"The campaign's open suggestion, of which it has one at most; null when none is open. Settled ones are read from the customer's suggestions."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"events":{"items":{"$ref":"#/components/schemas/StrategyCampaignEventResponse"},"type":"array","title":"Events"},"latest_review":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignReviewResponse"},{"type":"null"}],"description":"The strategic agent's newest review of the campaign, staff only like the `rationale`; null when it has none. Its history is read from the campaign's reviews."}},"type":"object","required":["id","intent","title","rationale","summary","planned_launch_date","audience_id","playbook_id","replaces_id","status","idea_validated","audience_validated","copy_validated","client_validated","client_review_reopened","first_sent_at","activation","lemlist_campaigns","lemlist_campaigns_complete","last_event_id","last_event","suggestion","created_at","updated_at","events","latest_review"],"title":"StrategyCampaignDetailResponse"},"StrategyCampaignEditResponse":{"properties":{"strategy_campaign_id":{"type":"integer","title":"Strategy Campaign Id"},"previous_status":{"$ref":"#/components/schemas/StrategyCampaignStatus","description":"The campaign's status before the edit. `copy_review`, beside an event at `audience_review`, says the edit sent the campaign back to the audience's review."},"event":{"$ref":"#/components/schemas/StrategyCampaignEventResponse"}},"type":"object","required":["strategy_campaign_id","previous_status","event"],"title":"StrategyCampaignEditResponse"},"StrategyCampaignEventResponse":{"properties":{"action":{"$ref":"#/components/schemas/StrategyCampaignAction"},"status":{"$ref":"#/components/schemas/StrategyCampaignStatus","description":"The status the event left the campaign in, which says what it did: a `validated` reaching `copy_review` validated the audience, one at `external_review` after `external_review` is the client's, a `reopened` reopened the client's review after it was validated, and an `adopted` says whether the playbook was already published (`external_review`) or not (`copy_review`)."},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"string","const":"system"}],"title":"Caller","description":"The machine that wrote the event. `system` is the scheduler, which has no Kinde application: it records the first Lemlist send."},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote the event: its MCP, a person through a front end (`chat`), or the agent working alone. Null from any other caller, and on an event written before ai-agents said."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"asset":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignAsset"},{"type":"null"}],"description":"On a `revised` or `reworked` logged by an edit where the asset lives, rather than on the campaign: `copy` for its playbook's copy replaced, `audience` for what its audience selects changed. Null on every other event."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["action","status","caller","actor","agent_origin","comment","asset","created_at"],"title":"StrategyCampaignEventResponse"},"StrategyCampaignLemlistCampaignResponse":{"properties":{"tool_id":{"type":"string","title":"Tool Id","description":"The campaign's id in Lemlist, its `cam_…`."},"tool_name":{"type":"string","title":"Tool Name","description":"The sender, always `lemlist`."},"campaign_type":{"$ref":"#/components/schemas/CampaignType","description":"Which of the playbook's sequences it carries: `EMAIL` the cross-channel one, `LINKEDIN` the LinkedIn-only one."},"build_state":{"$ref":"#/components/schemas/CampaignBuildState","description":"`BUILT` once its whole sequence is in Lemlist. `BUILDING` while its build has not finished, after a failed attempt included: the campaign exists in Lemlist, its sequence is incomplete, and a retry of the sync finishes this same campaign. One finished and launched in Lemlist instead turns `BUILT` on a retry, or within 15 minutes at `external_review`."}},"type":"object","required":["tool_id","tool_name","campaign_type","build_state"],"title":"StrategyCampaignLemlistCampaignResponse"},"StrategyCampaignRecordsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StoredRecord"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."},"source":{"$ref":"#/components/schemas/StrategyCampaignAudienceSource"},"audience_id":{"type":"integer","title":"Audience Id","description":"The campaign's audience the page was read for, as `GET …/audience` names it."}},"type":"object","required":["items","next_cursor","total_count","source","audience_id"],"title":"StrategyCampaignRecordsPage","description":"A page of a campaign's contacts, from where they are now (`source`)."},"StrategyCampaignReplyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"written_by":{"$ref":"#/components/schemas/StrategyCommentWriter","description":"Whose side wrote it: `customer` for the customer's own people, `scalability` for ours. The front end says, since a Hub user can be either."},"caller":{"$ref":"#/components/schemas/MachineCaller","description":"The machine that wrote it."},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote it; null from any other caller."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"body":{"type":"string","title":"Body"}},"type":"object","required":["id","written_by","caller","actor","agent_origin","created_at","body"],"title":"StrategyCampaignReplyResponse"},"StrategyCampaignResponse":{"properties":{"id":{"type":"integer","title":"Id"},"intent":{"type":"string","title":"Intent"},"title":{"type":"string","title":"Title"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale","description":"The strategic agent's reasoning, in markdown, as the model wrote it, for its own reflection and for display. Its content and layout are the writer's: no reader expects a format in it or extracts anything from it. A reference written as `<kind>#<id>`, e.g. `audience#1234`, may be rendered as a link. Null when none was written. A campaign a person plans usually has none, their words being the `summary`. Who proposed a campaign is the `proposed` event's actor and caller, never inferred from this field."},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Null until written. The campaign as the SE and the client read it, in markdown, rendered whole, so nothing in it is internal. Its sections, their titles and its language are the writer's: no reader expects any of them or extracts anything from it."},"planned_launch_date":{"type":"string","format":"date","title":"Planned Launch Date","description":"The day the launch is planned for, any day. A plan made to the month or the week names a day in it; nothing records how precise the plan was, and each front end rounds the day for display."},"audience_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audience Id","description":"Null until attached."},"playbook_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playbook Id","description":"Null until attached."},"replaces_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Replaces Id"},"status":{"$ref":"#/components/schemas/StrategyCampaignStatus"},"idea_validated":{"type":"boolean","title":"Idea Validated"},"audience_validated":{"type":"boolean","title":"Audience Validated"},"copy_validated":{"type":"boolean","title":"Copy Validated"},"client_validated":{"type":"boolean","title":"Client Validated","description":"The client validated at `external_review`, which leaves the status there."},"client_review_reopened":{"type":"boolean","title":"Client Review Reopened","description":"An SE reopened the client review after the client had validated it, before the first send: the campaign is at `external_review`, its Lemlist campaigns paused, until the client validates it again, which resumes them. Nothing else starts them meanwhile."},"first_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Sent At","description":"When the first Lemlist send was observed. That observation is what moves the campaign to `running`."},"activation":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignActivationResponse"},{"type":"null"}],"description":"Set at `external_review`: how far the playbook's push to Lemlist got. Null at every other status."},"lemlist_campaigns":{"items":{"$ref":"#/components/schemas/StrategyCampaignLemlistCampaignResponse"},"type":"array","title":"Lemlist Campaigns","description":"The playbook's campaigns in Lemlist, oldest first, whatever the campaign's status: a refused or retired campaign keeps listing them once it has asked Lemlist to pause them. Empty with no playbook, and until the playbook is pushed: by the copy's validation, or before an adopted playbook was adopted. Each is listed only once Lemlist has created it, so the list alone does not say whether one is still to come: `lemlist_campaigns_complete` does."},"lemlist_campaigns_complete":{"type":"boolean","title":"Lemlist Campaigns Complete","description":"Whether `lemlist_campaigns` holds a campaign for each sequence the playbook stores, and every one it holds is `BUILT`. False with no playbook, and until the push has created and built every one: while Lemlist has not created one yet, after its creation failed and waits for a retry or for the team, and while one is `BUILDING`. A playbook that stores no sequence, whose Lemlist campaigns are made outside the push, needs one at least.","default":false},"last_event_id":{"type":"integer","title":"Last Event Id","description":"The id of the newest event: the campaign's version, which a review sends back as `expected_event_id`."},"last_event":{"$ref":"#/components/schemas/StrategyCampaignEventResponse","description":"The newest event, the one `last_event_id` names: who acted last, what it did, and with what comment."},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignSuggestionResponse"},{"type":"null"}],"description":"The campaign's open suggestion, of which it has one at most; null when none is open. Settled ones are read from the customer's suggestions."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","intent","title","rationale","summary","planned_launch_date","audience_id","playbook_id","replaces_id","status","idea_validated","audience_validated","copy_validated","client_validated","client_review_reopened","first_sent_at","activation","lemlist_campaigns","lemlist_campaigns_complete","last_event_id","last_event","suggestion","created_at","updated_at"],"title":"StrategyCampaignResponse"},"StrategyCampaignReviewResponse":{"properties":{"id":{"type":"integer","title":"Id"},"report":{"type":"string","title":"Report","description":"The strategic agent's review, in markdown as it wrote it: for display, never a format anything extracts from. Internal: it cites the evidence, other customers' figures included."},"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"The ai-agents run that wrote it. A review sent again under the same run is stored once."},"reviewed_event_id":{"type":"integer","title":"Reviewed Event Id","description":"The campaign's newest event when the review read it: the version reviewed."},"stale":{"type":"boolean","title":"Stale","description":"The campaign has moved since: its newest event is no longer `reviewed_event_id`. What changed is in its events after that one."},"caller":{"$ref":"#/components/schemas/MachineCaller","description":"The machine that stored it."},"actor":{"$ref":"#/components/schemas/ActorResponse","description":"The person who had the agent review it, or the machine when it worked alone."},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it stored it; null from any other caller."},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","report","run_id","reviewed_event_id","stale","caller","actor","agent_origin","created_at"],"title":"StrategyCampaignReviewResponse","description":"A review of a campaign by the strategic agent, and the event it reviewed."},"StrategyCampaignReviewsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyCampaignReviewResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"StrategyCampaignReviewsPage"},"StrategyCampaignSendBackStatus":{"type":"string","enum":["audience_review","copy_review"],"title":"StrategyCampaignSendBackStatus","description":"The review steps a campaign can be sent back to. The idea is only ever refused."},"StrategyCampaignStatus":{"type":"string","enum":["idea_review","audience_review","copy_review","external_review","running","paused","refused","retired"],"title":"StrategyCampaignStatus","description":"The campaign's single state, and its column on a board.\n\nReview is sequential: the idea, then the audience, then the copy written for it. The\ncopy's validation activates the playbook, and `external_review` is the client's window\nbefore the first Lemlist send; `running` is that first send observed. Adopting a playbook\nbuilt outside the workflow skips the steps it supersedes, to `external_review` when it is\nalready published and to `copy_review` when it is not. A request for\nchanges, at the audience and copy steps only, sends the campaign back to that step, so\neverything after it is reviewed again. A running campaign is paused and resumed, which\nstops and restarts its playbook and its Lemlist campaigns, and a paused one may be retired.\n`retired` is terminal, and so is `refused` but for one way out: a refusal made by mistake is\nundone, back to the step it was made at. Otherwise a refused or retired campaign is\nre-proposed as a new campaign rather than reopened. `refused` is a verdict on the idea;\n`retired` withdraws a campaign without one."},"StrategyCampaignSuggestionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"strategy_campaign_id":{"type":"integer","title":"Strategy Campaign Id"},"kind":{"$ref":"#/components/schemas/StrategySuggestionKind","description":"`pause` on a running campaign, `resume` on a paused one. Performing it, through the campaign's own route and from wherever, settles the suggestion `done`."},"reason":{"type":"string","title":"Reason","description":"Why the strategic agent suggests it, in markdown as it wrote it: for display, never a format anything extracts from."},"interested_at_stake":{"type":"number","title":"Interested At Stake","description":"The interested leads at stake over the next 30 days, which suggestions are ranked by."},"figures":{"additionalProperties":{"type":"number"},"type":"object","title":"Figures","description":"The numbers behind the reason, each named by the agent, for display: nothing reads a name in particular."},"replacement_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Replacement Id","description":"On a pause: the campaign proposed to take this one's place. Null otherwise."},"status":{"$ref":"#/components/schemas/StrategySuggestionStatus","description":"`open` until settled: `done` once the action it asks for was performed, `dismissed` when turned down, `closed` when the campaign left the status it applies to some other way."},"caller":{"$ref":"#/components/schemas/MachineCaller","description":"The machine that filed it."},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it filed it; null from any other caller."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"resolution":{"anyOf":[{"$ref":"#/components/schemas/StrategySuggestionResolutionResponse"},{"type":"null"}],"description":"Who settled it, and when: whoever performed the action, dismissed it, or moved the campaign on. Null while it is open."},"dismissal_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dismissal Reason","description":"Why it was dismissed; null unless `dismissed`."}},"type":"object","required":["id","strategy_campaign_id","kind","reason","interested_at_stake","figures","replacement_id","status","caller","actor","agent_origin","created_at","resolution","dismissal_reason"],"title":"StrategyCampaignSuggestionResponse","description":"An action the strategic agent suggests on a campaign, and how it was settled."},"StrategyCampaignSuggestionsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyCampaignSuggestionResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"StrategyCampaignSuggestionsPage"},"StrategyCampaignThreadResponse":{"properties":{"id":{"type":"integer","title":"Id"},"written_by":{"$ref":"#/components/schemas/StrategyCommentWriter","description":"Whose side wrote it: `customer` for the customer's own people, `scalability` for ours. The front end says, since a Hub user can be either."},"caller":{"$ref":"#/components/schemas/MachineCaller","description":"The machine that wrote it."},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote it; null from any other caller."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"strategy_campaign_id":{"type":"integer","title":"Strategy Campaign Id"},"step":{"anyOf":[{"$ref":"#/components/schemas/StrategyCommentStepResponse"},{"type":"null"}],"description":"The step it is about; null for the campaign as a whole."},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Null on a thread that only proposes a rewrite."},"suggestion":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggestion","description":"The rewrite proposed for the step or the quote."},"handled":{"anyOf":[{"$ref":"#/components/schemas/StrategyCommentHandledResponse"},{"type":"null"}],"description":"Who marked the thread handled; null while it is open."},"replies":{"items":{"$ref":"#/components/schemas/StrategyCampaignReplyResponse"},"type":"array","title":"Replies"}},"type":"object","required":["id","written_by","caller","actor","agent_origin","created_at","strategy_campaign_id","step","quote","body","suggestion","handled","replies"],"title":"StrategyCampaignThreadResponse","description":"A comment opening a thread, with its replies, oldest first. The customer reads all of it."},"StrategyCampaignThreadsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyCampaignThreadResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"StrategyCampaignThreadsPage"},"StrategyCampaignsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyCampaignResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"StrategyCampaignsPage"},"StrategyCommentHandledResponse":{"properties":{"caller":{"$ref":"#/components/schemas/MachineCaller"},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["caller","actor","agent_origin","created_at"],"title":"StrategyCommentHandledResponse","description":"Who marked a thread handled, and when."},"StrategyCommentStepPayload":{"properties":{"lemlist_campaign_id":{"type":"string","maxLength":64,"minLength":1,"title":"Lemlist Campaign Id","description":"One of the campaign's `lemlist_campaigns[].tool_id`, its `cam_…`."},"step_id":{"type":"string","maxLength":64,"minLength":1,"title":"Step Id","description":"The step's id in that Lemlist campaign's sequence, its `stp_…`."}},"additionalProperties":false,"type":"object","required":["lemlist_campaign_id","step_id"],"title":"StrategyCommentStepPayload"},"StrategyCommentStepResponse":{"properties":{"lemlist_campaign_id":{"type":"string","title":"Lemlist Campaign Id","description":"The Lemlist campaign, its `cam_…`."},"step_id":{"type":"string","title":"Step Id","description":"The step in its sequence, its `stp_…`."}},"type":"object","required":["lemlist_campaign_id","step_id"],"title":"StrategyCommentStepResponse"},"StrategyCommentWriter":{"type":"string","enum":["customer","scalability"],"title":"StrategyCommentWriter","description":"Whose side wrote a comment. The calling front end says: a Hub user can be either."},"StrategyCopyPath":{"type":"string","enum":["generic","hpp"],"title":"StrategyCopyPath","description":"A copy agent that may write an intent."},"StrategyCopySampleChangeResponse":{"properties":{"kind":{"$ref":"#/components/schemas/StrategyCopySampleKind"},"key":{"type":"string","title":"Key","description":"The sample's key, a set's in an older revision; `library` for the library's."},"operation":{"$ref":"#/components/schemas/StrategyCopySampleOperation"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before","description":"The row's record before the change; null on a creation alone. An older revision's record lacks the fields added since."},"after":{"additionalProperties":true,"type":"object","title":"After","description":"The row's record after it. A retirement or restoration changes no field, so it is the record before."}},"type":"object","required":["kind","key","operation","before","after"],"title":"StrategyCopySampleChangeResponse"},"StrategyCopySampleDetailResponse":{"properties":{"key":{"type":"string","title":"Key"},"intents":{"items":{"type":"string"},"type":"array","title":"Intents","description":"The `strategy_intent` keys it is written for, sorted. How to write for an intent is that intent's guidance."},"name":{"type":"string","title":"Name","description":"The campaign's name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What is particular to it: what it targeted, how its sequences divide the prospects, and the defects it ships with."},"channels":{"items":{"$ref":"#/components/schemas/StrategyCopySampleStepType"},"type":"array","title":"Channels","description":"The step types its copy is written for, sorted."},"copy_steps":{"type":"integer","title":"Copy Steps","description":"How many of its steps hold a message for the prospect, across its sequences: an invitation sent bare holds none."},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At","description":"Set once the library no longer offers it; only a read asking for retired samples returns one."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"The language it is written in, ISO 639-1."},"formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}],"description":"Its register; null where the copy uses neither or none was recorded."},"sequences":{"items":{"$ref":"#/components/schemas/StrategyCopySampleSequenceResponse"},"type":"array","title":"Sequences","description":"One for most samples. When there are several, each prospect runs exactly one of them."},"library_description":{"type":"string","title":"Library Description","description":"What every best copy is read with."},"revision":{"type":"integer","title":"Revision","description":"The library's revision the sample was read at: what a write names as its `base_revision`."}},"type":"object","required":["key","intents","name","description","channels","copy_steps","updated_at","retired_at","language","formality","sequences","library_description","revision"],"title":"StrategyCopySampleDetailResponse"},"StrategyCopySampleKind":{"type":"string","enum":["library","set","sample"],"title":"StrategyCopySampleKind","description":"The kind of row a copy sample library change touched."},"StrategyCopySampleLibraryPatch":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"customer_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customer Description"}},"additionalProperties":false,"type":"object","title":"StrategyCopySampleLibraryPatch"},"StrategyCopySampleOperation":{"type":"string","enum":["create","update","retire","restore"],"title":"StrategyCopySampleOperation"},"StrategyCopySamplePatch":{"properties":{"intents":{"anyOf":[{"items":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$"},"type":"array","minItems":1},{"type":"null"}],"title":"Intents","description":"Replaces the whole list."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"sequences":{"anyOf":[{"items":{"$ref":"#/components/schemas/StrategyCopySampleSequence"},"type":"array"},{"type":"null"}],"title":"Sequences","description":"Replaces every sequence."},"language":{"anyOf":[{"type":"string","pattern":"^\\w{2}$"},{"type":"null"}],"title":"Language"},"formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"StrategyCopySamplePatch"},"StrategyCopySampleRecord":{"properties":{"key":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Key","description":"Unique among its owner's samples, never renamed: other services may store it."},"intents":{"items":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$"},"type":"array","minItems":1,"title":"Intents","description":"The live `strategy_intent` keys whose copy is written from it. An intent no sample names is written with none."},"name":{"type":"string","title":"Name","description":"The campaign's name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What is particular to it: what it targeted, how its sequences divide the prospects, and the defects it ships with."},"sequences":{"items":{"$ref":"#/components/schemas/StrategyCopySampleSequence"},"type":"array","minItems":1,"title":"Sequences","description":"One for most samples. When there are several, each prospect runs exactly one of them."},"language":{"anyOf":[{"type":"string","pattern":"^\\w{2}$"},{"type":"null"}],"title":"Language","description":"The language it is written in, ISO 639-1."},"formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}],"description":"Its register, null where the copy uses neither."}},"additionalProperties":false,"type":"object","required":["key","intents","name","sequences"],"title":"StrategyCopySampleRecord","description":"A best copy's every field."},"StrategyCopySampleRevisionDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}],"description":"Null on a migration's revision."},"actor":{"anyOf":[{"$ref":"#/components/schemas/ActorResponse"},{"type":"null"}],"description":"Who acted, as the caller named them; null on a migration's revision."},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote the revision: its MCP, a chat, or the agent working alone. Null on a migration's revision."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"change_count":{"type":"integer","title":"Change Count","description":"Every change it made, whatever the list asked for."},"changes":{"items":{"$ref":"#/components/schemas/StrategyCopySampleChangeResponse"},"type":"array","title":"Changes","description":"In the order the write sent them, which they do not depend on: a revision applies as one."}},"type":"object","required":["id","created_at","caller","actor","agent_origin","comment","change_count","changes"],"title":"StrategyCopySampleRevisionDetailResponse"},"StrategyCopySampleRevisionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}],"description":"Null on a migration's revision."},"actor":{"anyOf":[{"$ref":"#/components/schemas/ActorResponse"},{"type":"null"}],"description":"Who acted, as the caller named them; null on a migration's revision."},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote the revision: its MCP, a chat, or the agent working alone. Null on a migration's revision."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"change_count":{"type":"integer","title":"Change Count","description":"Every change it made, whatever the list asked for."}},"type":"object","required":["id","created_at","caller","actor","agent_origin","comment","change_count"],"title":"StrategyCopySampleRevisionResponse"},"StrategyCopySampleRevisionsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyCopySampleRevisionResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"StrategyCopySampleRevisionsPage"},"StrategyCopySampleSequence":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/StrategyCopySampleStep"},"type":"array","minItems":1,"title":"Steps","description":"In the order they are sent."}},"additionalProperties":false,"type":"object","required":["steps"],"title":"StrategyCopySampleSequence"},"StrategyCopySampleSequenceResponse":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/StrategyCopySampleStepResponse"},"type":"array","title":"Steps","description":"In the order they are sent."}},"type":"object","required":["steps"],"title":"StrategyCopySampleSequenceResponse"},"StrategyCopySampleStep":{"properties":{"type":{"$ref":"#/components/schemas/StrategyCopySampleStepType"},"wait_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Wait Days","description":"Days after the step before it; null where no whole number was written."},"wait_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait Note","description":"The wait as its author wrote it, where `wait_days` cannot say it all: `2-3 jours ouvrés`, `Après acceptation de l'invitation`."},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"On an email or an InMail. Null on an email sent as a reply in the previous email's thread."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Its message, Liquid and `{{variables}}` as written. Null on an invitation sent without a note."},"variant_b":{"anyOf":[{"$ref":"#/components/schemas/StrategyCopySampleVariant"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["type"],"title":"StrategyCopySampleStep","description":"One step of a sequence, under the names ai-agents' copy samples read it with."},"StrategyCopySampleStepResponse":{"properties":{"type":{"$ref":"#/components/schemas/StrategyCopySampleStepType","description":"Lemlist's step type."},"wait_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Wait Days","description":"Days after the step before it in the same sequence; null where no whole number of days was written."},"wait_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait Note","description":"The wait as its author wrote it, where `wait_days` cannot say it all."},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"On an email or an InMail. Null on an email sent as a reply in the previous email's thread."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Its message, Liquid and `{{variables}}` as written, unrendered. Null on an invitation sent without a note."},"variant_b":{"anyOf":[{"$ref":"#/components/schemas/StrategyCopySampleVariantResponse"},{"type":"null"}],"description":"The B variant of an A/B tested step; null when it is not tested."}},"type":"object","required":["type","wait_days","wait_note","subject","body","variant_b"],"title":"StrategyCopySampleStepResponse"},"StrategyCopySampleStepType":{"type":"string","enum":["email","linkedinInvite","linkedinSend","linkedinInMail","linkedinVoiceNote","sms","whatsappMessage"],"title":"StrategyCopySampleStepType","description":"The Lemlist step types whose message reaches the prospect, under Lemlist's own names."},"StrategyCopySampleSummaryResponse":{"properties":{"key":{"type":"string","title":"Key"},"intents":{"items":{"type":"string"},"type":"array","title":"Intents","description":"The `strategy_intent` keys it is written for, sorted. How to write for an intent is that intent's guidance."},"name":{"type":"string","title":"Name","description":"The campaign's name."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"What is particular to it: what it targeted, how its sequences divide the prospects, and the defects it ships with."},"channels":{"items":{"$ref":"#/components/schemas/StrategyCopySampleStepType"},"type":"array","title":"Channels","description":"The step types its copy is written for, sorted."},"copy_steps":{"type":"integer","title":"Copy Steps","description":"How many of its steps hold a message for the prospect, across its sequences: an invitation sent bare holds none."},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At","description":"Set once the library no longer offers it; only a read asking for retired samples returns one."},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"The language it is written in, ISO 639-1."},"formality":{"anyOf":[{"$ref":"#/components/schemas/Formality"},{"type":"null"}],"description":"Its register; null where the copy uses neither or none was recorded."}},"type":"object","required":["key","intents","name","description","channels","copy_steps","updated_at","retired_at","language","formality"],"title":"StrategyCopySampleSummaryResponse"},"StrategyCopySampleVariant":{"properties":{"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"}},"additionalProperties":false,"type":"object","title":"StrategyCopySampleVariant","description":"The B variant of an A/B tested step."},"StrategyCopySampleVariantResponse":{"properties":{"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject","description":"Its subject, for an email or an InMail."},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body","description":"Its message."}},"type":"object","required":["subject","body"],"title":"StrategyCopySampleVariantResponse"},"StrategyCopySamplesPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyCopySampleSummaryResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."},"revision":{"type":"integer","title":"Revision","description":"The library's revision the page was read at: what a write names as its `base_revision`."}},"type":"object","required":["items","next_cursor","total_count","revision"],"title":"StrategyCopySamplesPage"},"StrategyEventAttendeeList":{"type":"string","enum":["public","to_scrape","absent","unknown"],"title":"StrategyEventAttendeeList","description":"Whether a list of an event's exhibitors or visitors can be had, and how."},"StrategyEventChangeResponse":{"properties":{"key":{"type":"string","title":"Key"},"operation":{"$ref":"#/components/schemas/StrategyEventOperation"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before","description":"The event's record before the change; null on a creation alone. An older revision's record lacks the fields added since."},"after":{"additionalProperties":true,"type":"object","title":"After","description":"The event's record after it. A retirement or restoration changes no field, so it is the record before."}},"type":"object","required":["key","operation","before","after"],"title":"StrategyEventChangeResponse"},"StrategyEventDetailResponse":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"edition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edition","description":"The edition the dates are of, as the event names it."},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On","description":"Null on a one-day event, or when unknown."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recurring","description":"Whether it comes back; null when unknown."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"linkedin_page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Page"},"linkedin_followers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Linkedin Followers"},"audience_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Text","description":"Who takes part, in plain words."},"personas":{"items":{"$ref":"#/components/schemas/StrategyEventPersona"},"type":"array","title":"Personas","description":"The buyer families that take part. Empty when unknown."},"sectors":{"items":{"$ref":"#/components/schemas/StrategyEventSector"},"type":"array","title":"Sectors","description":"The sectors its participants come from. Empty when it is every sector."},"exhibitor_list":{"$ref":"#/components/schemas/StrategyEventAttendeeList"},"visitor_list":{"$ref":"#/components/schemas/StrategyEventAttendeeList"},"sources":{"items":{"$ref":"#/components/schemas/StrategyEventSourceResponse"},"type":"array","title":"Sources","description":"The pages that state what the event's fields say."},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At","description":"Set once the library no longer offers it; only a read asking for retired events returns one."},"revision":{"type":"integer","title":"Revision","description":"The library's revision the event was read at: what a write names as its `base_revision`."}},"type":"object","required":["key","name","edition","starts_on","ends_on","city","country","recurring","website","linkedin_page","linkedin_followers","audience_text","personas","sectors","exhibitor_list","visitor_list","sources","updated_at","retired_at","revision"],"title":"StrategyEventDetailResponse"},"StrategyEventOperation":{"type":"string","enum":["create","update","retire","restore"],"title":"StrategyEventOperation"},"StrategyEventPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"edition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edition"},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recurring"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"linkedin_page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Page"},"linkedin_followers":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Linkedin Followers"},"audience_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Text"},"personas":{"anyOf":[{"items":{"$ref":"#/components/schemas/StrategyEventPersona"},"type":"array"},{"type":"null"}],"title":"Personas","description":"Replaces the whole list."},"sectors":{"anyOf":[{"items":{"$ref":"#/components/schemas/StrategyEventSector"},"type":"array"},{"type":"null"}],"title":"Sectors","description":"Replaces the whole list."},"exhibitor_list":{"anyOf":[{"$ref":"#/components/schemas/StrategyEventAttendeeList"},{"type":"null"}]},"visitor_list":{"anyOf":[{"$ref":"#/components/schemas/StrategyEventAttendeeList"},{"type":"null"}]},"sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/StrategyEventSource"},"type":"array"},{"type":"null"}],"title":"Sources","description":"Replaces the whole list."}},"additionalProperties":false,"type":"object","title":"StrategyEventPatch","description":"The fields to change, every other one kept. Null clears a field that may be null."},"StrategyEventPersona":{"type":"string","enum":["executive","hr","marketing","sales","finance","tech","data_ai","operations","legal","customer","innovation","site_director"],"title":"StrategyEventPersona","description":"The buyer families an event's participants are folded into, to compare with a target."},"StrategyEventRecord":{"properties":{"key":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","title":"Key","description":"Never renamed: other services may store it."},"name":{"type":"string","title":"Name"},"edition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edition","description":"The edition the dates are of, as the event names it: `2026`."},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On","description":"Its last day; null on a one-day event, or when unknown."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recurring","description":"Whether it comes back every year or so; null when unknown."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"linkedin_page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Page"},"linkedin_followers":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Linkedin Followers"},"audience_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Text","description":"Who takes part, in plain words: `DRH de PME et ETI`."},"personas":{"items":{"$ref":"#/components/schemas/StrategyEventPersona"},"type":"array","title":"Personas","description":"The buyer families that take part. Empty when unknown, never for everyone."},"sectors":{"items":{"$ref":"#/components/schemas/StrategyEventSector"},"type":"array","title":"Sectors","description":"The sectors its participants come from. Empty when it is every sector."},"exhibitor_list":{"$ref":"#/components/schemas/StrategyEventAttendeeList"},"visitor_list":{"$ref":"#/components/schemas/StrategyEventAttendeeList"},"sources":{"items":{"$ref":"#/components/schemas/StrategyEventSource"},"type":"array","title":"Sources","description":"The pages that state what the record says, the dates first of all."}},"additionalProperties":false,"type":"object","required":["key","name","personas","sectors","exhibitor_list","visitor_list","sources"],"title":"StrategyEventRecord","description":"An event's every field."},"StrategyEventResponse":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"edition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edition","description":"The edition the dates are of, as the event names it."},"starts_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Starts On"},"ends_on":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Ends On","description":"Null on a one-day event, or when unknown."},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"recurring":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recurring","description":"Whether it comes back; null when unknown."},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"},"linkedin_page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin Page"},"linkedin_followers":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Linkedin Followers"},"audience_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audience Text","description":"Who takes part, in plain words."},"personas":{"items":{"$ref":"#/components/schemas/StrategyEventPersona"},"type":"array","title":"Personas","description":"The buyer families that take part. Empty when unknown."},"sectors":{"items":{"$ref":"#/components/schemas/StrategyEventSector"},"type":"array","title":"Sectors","description":"The sectors its participants come from. Empty when it is every sector."},"exhibitor_list":{"$ref":"#/components/schemas/StrategyEventAttendeeList"},"visitor_list":{"$ref":"#/components/schemas/StrategyEventAttendeeList"},"sources":{"items":{"$ref":"#/components/schemas/StrategyEventSourceResponse"},"type":"array","title":"Sources","description":"The pages that state what the event's fields say."},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At","description":"Set once the library no longer offers it; only a read asking for retired events returns one."}},"type":"object","required":["key","name","edition","starts_on","ends_on","city","country","recurring","website","linkedin_page","linkedin_followers","audience_text","personas","sectors","exhibitor_list","visitor_list","sources","updated_at","retired_at"],"title":"StrategyEventResponse"},"StrategyEventRevisionDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}],"description":"Null on a migration's revision."},"actor":{"anyOf":[{"$ref":"#/components/schemas/ActorResponse"},{"type":"null"}],"description":"Who acted, as the caller named them; null on a migration's revision."},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote the revision: its MCP, a chat, or the agent working alone. Null on a migration's revision."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"change_count":{"type":"integer","title":"Change Count","description":"Every change it made, whatever the list asked for."},"changes":{"items":{"$ref":"#/components/schemas/StrategyEventChangeResponse"},"type":"array","title":"Changes","description":"In the order the write sent them, which they do not depend on: a revision applies as one."}},"type":"object","required":["id","created_at","caller","actor","agent_origin","comment","change_count","changes"],"title":"StrategyEventRevisionDetailResponse"},"StrategyEventRevisionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}],"description":"Null on a migration's revision."},"actor":{"anyOf":[{"$ref":"#/components/schemas/ActorResponse"},{"type":"null"}],"description":"Who acted, as the caller named them; null on a migration's revision."},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote the revision: its MCP, a chat, or the agent working alone. Null on a migration's revision."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"change_count":{"type":"integer","title":"Change Count","description":"Every change it made, whatever the list asked for."}},"type":"object","required":["id","created_at","caller","actor","agent_origin","comment","change_count"],"title":"StrategyEventRevisionResponse"},"StrategyEventRevisionsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyEventRevisionResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"StrategyEventRevisionsPage"},"StrategyEventSector":{"type":"string","enum":["saas_tech","startups","ecommerce_retail","industry","construction_real_estate","health_care","finance_insurance","education","public_sector","consumer_brands","agencies_media","professional_services","hospitality_events","energy_telecom","transport_logistics"],"title":"StrategyEventSector","description":"The sector families an event's participants come from."},"StrategyEventSource":{"properties":{"url":{"type":"string","title":"Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"What the page states, or how it was read: which edition, which dates, what was ruled out."}},"additionalProperties":false,"type":"object","required":["url"],"title":"StrategyEventSource","description":"A page that states what the event's row says."},"StrategyEventSourceResponse":{"properties":{"url":{"type":"string","title":"Url"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note","description":"What the page states, or how it was read: which edition, which dates, what was ruled out."}},"type":"object","required":["url","note"],"title":"StrategyEventSourceResponse"},"StrategyEventsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyEventResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."},"revision":{"type":"integer","title":"Revision","description":"The library's revision the page was read at: what a write names as its `base_revision`."}},"type":"object","required":["items","next_cursor","total_count","revision"],"title":"StrategyEventsPage"},"StrategyIntentCategory":{"type":"string","enum":["people","company","crm","third_party","generic"],"title":"StrategyIntentCategory"},"StrategyIntentPatch":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"category":{"anyOf":[{"$ref":"#/components/schemas/StrategyIntentCategory"},{"type":"null"}]},"theme":{"anyOf":[{"$ref":"#/components/schemas/StrategyIntentTheme"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"timing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timing"},"signal_level":{"anyOf":[{"$ref":"#/components/schemas/StrategyIntentSignalLevel"},{"type":"null"}]},"guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guidance"},"posture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posture"},"anchor_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Field"},"anchor_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Note"},"required":{"anyOf":[{"items":{"type":"string","pattern":"^[a-z][a-zA-Z0-9]*$"},"type":"array"},{"type":"null"}],"title":"Required","description":"Replaces the whole list, in this order."},"recommended":{"anyOf":[{"items":{"type":"string","pattern":"^[a-z][a-zA-Z0-9]*$"},"type":"array"},{"type":"null"}],"title":"Recommended","description":"Replaces the whole list, in this order."},"copy_paths":{"anyOf":[{"items":{"$ref":"#/components/schemas/StrategyCopyPath"},"type":"array"},{"type":"null"}],"title":"Copy Paths"}},"additionalProperties":false,"type":"object","title":"StrategyIntentPatch"},"StrategyIntentRecord":{"properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9]*(_[a-z0-9]+)*$","title":"Key","description":"Never renamed: campaigns and audiences store it."},"label":{"type":"string","title":"Label"},"category":{"$ref":"#/components/schemas/StrategyIntentCategory"},"theme":{"$ref":"#/components/schemas/StrategyIntentTheme"},"description":{"type":"string","title":"Description"},"timing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timing"},"signal_level":{"anyOf":[{"$ref":"#/components/schemas/StrategyIntentSignalLevel"},{"type":"null"}]},"guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guidance","description":"Markdown for the copywriter. Null: the intent is written from `generic`'s."},"posture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posture"},"anchor_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Field","description":"A field of ai-agents' per-contact personalization payload, which this API cannot check. Exclusive with `anchor_note`."},"anchor_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Note","description":"Why the intent has no anchor field. Exclusive with it."},"required":{"items":{"type":"string","pattern":"^[a-z][a-zA-Z0-9]*$"},"type":"array","title":"Required","description":"Token keys, in order. Bound the intent's copy paths: see `copy_paths`."},"recommended":{"items":{"type":"string","pattern":"^[a-z][a-zA-Z0-9]*$"},"type":"array","title":"Recommended","description":"Token keys, in order, after the required ones."},"copy_paths":{"items":{"$ref":"#/components/schemas/StrategyCopyPath"},"type":"array","title":"Copy Paths","description":"The copy agents allowed to write it, any order. A subset of what its required tokens allow: a `not_supported` one allows none, an `hpp_only` or `hpp_enrich` one `hpp` alone, otherwise both. Empty takes it out of copy."}},"additionalProperties":false,"type":"object","required":["key","label","category","theme","description","required","recommended","copy_paths"],"title":"StrategyIntentRecord","description":"An intent's every field, its variables and copy paths included."},"StrategyIntentResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"category":{"$ref":"#/components/schemas/StrategyIntentCategory"},"theme":{"$ref":"#/components/schemas/StrategyIntentTheme"},"description":{"type":"string","title":"Description"},"timing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timing"},"signal_level":{"anyOf":[{"$ref":"#/components/schemas/StrategyIntentSignalLevel"},{"type":"null"}]},"copy_paths":{"items":{"$ref":"#/components/schemas/StrategyCopyPath"},"type":"array","title":"Copy Paths","description":"The copy agents allowed to write the intent, `generic` before `hpp`. Never wider than its required tokens allow: `hpp_only` and `hpp_enrich` exclude `generic`, `not_supported` excludes both. Empty: no copy agent writes it."},"retired_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Retired At","description":"When the library stopped offering it; listed only with `include_retired`. A retired key stays on the campaigns and audiences that hold it."}},"type":"object","required":["key","label","category","theme","description","timing","signal_level","copy_paths","retired_at"],"title":"StrategyIntentResponse"},"StrategyIntentSignalLevel":{"type":"string","enum":["contact","company","company_contact"],"title":"StrategyIntentSignalLevel","description":"Where the intent's signal is read: on the person, on the company, or on both."},"StrategyIntentTheme":{"type":"string","enum":["first_party","hiring","people_moves","company_changes","technology","competition","social","events","relationship","fit"],"title":"StrategyIntentTheme","description":"What the intent's signal is about, where its category says where the data comes from."},"StrategyIntentTokenRole":{"type":"string","enum":["required","recommended"],"title":"StrategyIntentTokenRole"},"StrategyIntentVariableResponse":{"properties":{"token":{"type":"string","title":"Token","description":"A `strategy_token` key."},"role":{"$ref":"#/components/schemas/StrategyIntentTokenRole"}},"type":"object","required":["token","role"],"title":"StrategyIntentVariableResponse"},"StrategyPortfolioCampaignResponse":{"properties":{"id":{"type":"integer","title":"Id"},"intent":{"type":"string","title":"Intent"},"title":{"type":"string","title":"Title"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale","description":"The strategic agent's reasoning, in markdown, as the model wrote it, for its own reflection and for display. Its content and layout are the writer's: no reader expects a format in it or extracts anything from it. A reference written as `<kind>#<id>`, e.g. `audience#1234`, may be rendered as a link. Null when none was written. A campaign a person plans usually has none, their words being the `summary`. Who proposed a campaign is the `proposed` event's actor and caller, never inferred from this field."},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary","description":"Null until written. The campaign as the SE and the client read it, in markdown, rendered whole, so nothing in it is internal. Its sections, their titles and its language are the writer's: no reader expects any of them or extracts anything from it."},"planned_launch_date":{"type":"string","format":"date","title":"Planned Launch Date","description":"The day the launch is planned for, any day. A plan made to the month or the week names a day in it; nothing records how precise the plan was, and each front end rounds the day for display."},"audience_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audience Id","description":"Null until attached."},"playbook_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Playbook Id","description":"Null until attached."},"replaces_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Replaces Id"},"status":{"$ref":"#/components/schemas/StrategyCampaignStatus"},"idea_validated":{"type":"boolean","title":"Idea Validated"},"audience_validated":{"type":"boolean","title":"Audience Validated"},"copy_validated":{"type":"boolean","title":"Copy Validated"},"client_validated":{"type":"boolean","title":"Client Validated","description":"The client validated at `external_review`, which leaves the status there."},"client_review_reopened":{"type":"boolean","title":"Client Review Reopened","description":"An SE reopened the client review after the client had validated it, before the first send: the campaign is at `external_review`, its Lemlist campaigns paused, until the client validates it again, which resumes them. Nothing else starts them meanwhile."},"first_sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Sent At","description":"When the first Lemlist send was observed. That observation is what moves the campaign to `running`."},"activation":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignActivationResponse"},{"type":"null"}],"description":"Set at `external_review`: how far the playbook's push to Lemlist got. Null at every other status."},"lemlist_campaigns":{"items":{"$ref":"#/components/schemas/StrategyCampaignLemlistCampaignResponse"},"type":"array","title":"Lemlist Campaigns","description":"The playbook's campaigns in Lemlist, oldest first, whatever the campaign's status: a refused or retired campaign keeps listing them once it has asked Lemlist to pause them. Empty with no playbook, and until the playbook is pushed: by the copy's validation, or before an adopted playbook was adopted. Each is listed only once Lemlist has created it, so the list alone does not say whether one is still to come: `lemlist_campaigns_complete` does."},"lemlist_campaigns_complete":{"type":"boolean","title":"Lemlist Campaigns Complete","description":"Whether `lemlist_campaigns` holds a campaign for each sequence the playbook stores, and every one it holds is `BUILT`. False with no playbook, and until the push has created and built every one: while Lemlist has not created one yet, after its creation failed and waits for a retry or for the team, and while one is `BUILDING`. A playbook that stores no sequence, whose Lemlist campaigns are made outside the push, needs one at least.","default":false},"last_event_id":{"type":"integer","title":"Last Event Id","description":"The id of the newest event: the campaign's version, which a review sends back as `expected_event_id`."},"last_event":{"$ref":"#/components/schemas/StrategyCampaignEventResponse","description":"The newest event, the one `last_event_id` names: who acted last, what it did, and with what comment."},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/StrategyCampaignSuggestionResponse"},{"type":"null"}],"description":"The campaign's open suggestion, of which it has one at most; null when none is open. Settled ones are read from the customer's suggestions."},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"sf_account_id":{"type":"string","title":"Sf Account Id"}},"type":"object","required":["id","intent","title","rationale","summary","planned_launch_date","audience_id","playbook_id","replaces_id","status","idea_validated","audience_validated","copy_validated","client_validated","client_review_reopened","first_sent_at","activation","lemlist_campaigns","lemlist_campaigns_complete","last_event_id","last_event","suggestion","created_at","updated_at","sf_account_id"],"title":"StrategyPortfolioCampaignResponse"},"StrategyPortfolioCampaignsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyPortfolioCampaignResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."},"unknown_sf_account_ids":{"items":{"type":"string"},"type":"array","title":"Unknown Sf Account Ids","description":"The requested ids naming no active customer as this page is read, in the order given. Their campaigns, if any, are not listed."}},"type":"object","required":["items","next_cursor","total_count","unknown_sf_account_ids"],"title":"StrategyPortfolioCampaignsPage"},"StrategySuggestionKind":{"type":"string","enum":["pause","resume"],"title":"StrategySuggestionKind","description":"What a suggestion asks for, each the verb of a route that performs it."},"StrategySuggestionResolutionResponse":{"properties":{"caller":{"$ref":"#/components/schemas/MachineCaller"},"actor":{"$ref":"#/components/schemas/ActorResponse"},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}]},"at":{"type":"string","format":"date-time","title":"At"}},"type":"object","required":["caller","actor","agent_origin","at"],"title":"StrategySuggestionResolutionResponse","description":"Who settled a suggestion, and when."},"StrategySuggestionStatus":{"type":"string","enum":["open","done","dismissed","closed"],"title":"StrategySuggestionStatus","description":"Where a suggestion stands. Only `open` changes, and once."},"StrategyTaxonomyChangeResponse":{"properties":{"kind":{"$ref":"#/components/schemas/StrategyTaxonomyKind"},"key":{"type":"string","title":"Key"},"operation":{"$ref":"#/components/schemas/StrategyTaxonomyOperation"},"before":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Before","description":"The entry's record before the change; null on a creation alone. An older revision's record lacks the fields added since."},"after":{"additionalProperties":true,"type":"object","title":"After","description":"The entry's record after it. A retirement or restoration changes no field, so it is the record before."}},"type":"object","required":["kind","key","operation","before","after"],"title":"StrategyTaxonomyChangeResponse"},"StrategyTaxonomyIntentResponse":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"category":{"$ref":"#/components/schemas/StrategyIntentCategory"},"theme":{"$ref":"#/components/schemas/StrategyIntentTheme"},"description":{"type":"string","title":"Description"},"timing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timing"},"signal_level":{"anyOf":[{"$ref":"#/components/schemas/StrategyIntentSignalLevel"},{"type":"null"}]},"copy_paths":{"items":{"$ref":"#/components/schemas/StrategyCopyPath"},"type":"array","title":"Copy Paths","description":"The copy agents allowed to write the intent, `generic` before `hpp`. Never wider than its required tokens allow: `hpp_only` and `hpp_enrich` exclude `generic`, `not_supported` excludes both. Empty: no copy agent writes it."},"guidance":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guidance","description":"Markdown for the copywriter. Null when the intent has none of its own."},"posture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Posture"},"anchor_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Field"},"anchor_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Note"},"variables":{"items":{"$ref":"#/components/schemas/StrategyIntentVariableResponse"},"type":"array","title":"Variables","description":"Required first, then recommended."}},"type":"object","required":["key","label","category","theme","description","timing","signal_level","copy_paths","guidance","posture","anchor_field","anchor_note","variables"],"title":"StrategyTaxonomyIntentResponse"},"StrategyTaxonomyKind":{"type":"string","enum":["intent","token"],"title":"StrategyTaxonomyKind","description":"The kind of row a taxonomy change touched."},"StrategyTaxonomyOperation":{"type":"string","enum":["create","update","retire","restore"],"title":"StrategyTaxonomyOperation"},"StrategyTaxonomyResponse":{"properties":{"revision":{"type":"integer","title":"Revision","description":"Every write to the taxonomy creates a new one."},"intents":{"items":{"$ref":"#/components/schemas/StrategyTaxonomyIntentResponse"},"type":"array","title":"Intents","description":"Live intents only."},"tokens":{"items":{"$ref":"#/components/schemas/StrategyTokenResponse"},"type":"array","title":"Tokens","description":"Live tokens only."}},"type":"object","required":["revision","intents","tokens"],"title":"StrategyTaxonomyResponse"},"StrategyTaxonomyRevisionDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}],"description":"Null on a migration's revision."},"actor":{"anyOf":[{"$ref":"#/components/schemas/ActorResponse"},{"type":"null"}],"description":"Who acted, as the caller named them; null on a migration's revision."},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote the revision: its MCP, a chat, or the agent working alone. Null on a migration's revision."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"change_count":{"type":"integer","title":"Change Count"},"changes":{"items":{"$ref":"#/components/schemas/StrategyTaxonomyChangeResponse"},"type":"array","title":"Changes","description":"In the order the write sent them, which they do not depend on: a revision applies as one."}},"type":"object","required":["id","created_at","caller","actor","agent_origin","comment","change_count","changes"],"title":"StrategyTaxonomyRevisionDetailResponse"},"StrategyTaxonomyRevisionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"caller":{"anyOf":[{"$ref":"#/components/schemas/MachineCaller"},{"type":"null"}],"description":"Null on a migration's revision."},"actor":{"anyOf":[{"$ref":"#/components/schemas/ActorResponse"},{"type":"null"}],"description":"Who acted, as the caller named them; null on a migration's revision."},"agent_origin":{"anyOf":[{"$ref":"#/components/schemas/AgentOrigin"},{"type":"null"}],"description":"How ai-agents was reached when it wrote the revision: its MCP, a chat, or the agent working alone. Null on a migration's revision."},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"change_count":{"type":"integer","title":"Change Count"}},"type":"object","required":["id","created_at","caller","actor","agent_origin","comment","change_count"],"title":"StrategyTaxonomyRevisionResponse"},"StrategyTaxonomyRevisionsPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StrategyTaxonomyRevisionResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Pass as `cursor`, with the same filters, for the next page; null on the last one."},"total_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Count","description":"Every item the query matches, across pages, when `with_total_count` is set; null otherwise."}},"type":"object","required":["items","next_cursor","total_count"],"title":"StrategyTaxonomyRevisionsPage"},"StrategyTokenClass":{"type":"string","enum":["standard","attribute","hpp_only","hpp_enrich","not_supported"],"title":"StrategyTokenClass","description":"How a copy token is filled, which bounds the copy paths of an intent requiring it.\n\nA required `standard` or `attribute` token allows both paths, `hpp_only` and `hpp_enrich`\nallow `hpp` alone, and `not_supported` allows none. An intent's `copy_paths` may narrow\nwhat its required tokens allow, never widen it."},"StrategyTokenDraft":{"properties":{"key":{"type":"string","pattern":"^[a-z][a-zA-Z0-9]*$","title":"Key","description":"camelCase, never renamed: published copy spells it."},"class":{"$ref":"#/components/schemas/StrategyTokenClass"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"type":"string","title":"Description"},"source_tier":{"anyOf":[{"$ref":"#/components/schemas/StrategyTokenSourceTier"},{"type":"null"}]},"source_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Field","description":"A field of `source_tier`'s record, set with it. Checked against the Audience Builder's models for every tier but `snowflake`."},"requires_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Requires Filter","description":"`SearchFilter` fields, one of which the search must set for a `computed` source to exist. Set on a computed source alone, never empty."},"formatter":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarsFormatType"},{"type":"null"}]},"is_list":{"type":"boolean","title":"Is List","default":false},"namedrop":{"type":"boolean","title":"Namedrop","default":false},"recommended":{"type":"boolean","title":"Recommended","description":"Offered on every intent.","default":false},"input_required":{"type":"boolean","title":"Input Required","description":"On an `attribute` token alone.","default":false},"generic_liquid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generic Liquid"},"generic_bounds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generic Bounds"},"position":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Position"}},"additionalProperties":false,"type":"object","required":["key","class","description"],"title":"StrategyTokenDraft","description":"A token to create: its position defaults to after every other token."},"StrategyTokenPatch":{"properties":{"class":{"anyOf":[{"$ref":"#/components/schemas/StrategyTokenClass"},{"type":"null"}]},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"source_tier":{"anyOf":[{"$ref":"#/components/schemas/StrategyTokenSourceTier"},{"type":"null"}]},"source_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Field"},"requires_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Requires Filter"},"formatter":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarsFormatType"},{"type":"null"}]},"is_list":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is List"},"namedrop":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Namedrop"},"recommended":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Recommended"},"input_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Input Required"},"generic_liquid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generic Liquid"},"generic_bounds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generic Bounds"},"position":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Position","description":"Positions are unique once the whole revision applies."}},"additionalProperties":false,"type":"object","title":"StrategyTokenPatch"},"StrategyTokenResponse":{"properties":{"key":{"type":"string","title":"Key","description":"What copy spells as `{{key}}`."},"class":{"$ref":"#/components/schemas/StrategyTokenClass"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"description":{"type":"string","title":"Description"},"source_tier":{"anyOf":[{"$ref":"#/components/schemas/StrategyTokenSourceTier"},{"type":"null"}]},"source_field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Field"},"requires_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Requires Filter"},"formatter":{"anyOf":[{"$ref":"#/components/schemas/CampaignScalaVarsFormatType"},{"type":"null"}]},"is_list":{"type":"boolean","title":"Is List"},"namedrop":{"type":"boolean","title":"Namedrop"},"recommended":{"type":"boolean","title":"Recommended","description":"Offered on every intent, whatever its variables."},"input_required":{"type":"boolean","title":"Input Required"},"generic_liquid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generic Liquid"},"generic_bounds":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generic Bounds"},"position":{"type":"integer","title":"Position","description":"Its place in the taxonomy's order, unique across tokens, retired ones included. Tokens are listed in this order."}},"type":"object","required":["key","class","label","description","source_tier","source_field","requires_filter","formatter","is_list","namedrop","recommended","input_required","generic_liquid","generic_bounds","position"],"title":"StrategyTokenResponse"},"StrategyTokenSourceTier":{"type":"string","enum":["profile","company","computed","profile_crm","company_crm","snowflake"],"title":"StrategyTokenSourceTier","description":"Which record a token's `source_field` is read from."},"TableMode":{"type":"string","enum":["all","in_crm","new","no_persona"],"title":"TableMode"},"TaskPlaybookPayload":{"properties":{"is_active":{"type":"boolean","title":"Is Active"},"is_requesting_phone_numbers":{"type":"boolean","title":"Is Requesting Phone Numbers","default":false},"workflow_type":{"type":"string","const":"tasks_v2","title":"Workflow Type","default":"tasks_v2"},"tasks_info":{"$ref":"#/components/schemas/PlaybookTasksInfoPayload"}},"additionalProperties":false,"type":"object","required":["is_active","tasks_info"],"title":"TaskPlaybookPayload"},"ThreadResponse":{"properties":{"id":{"type":"string","title":"Id"},"mailbox":{"$ref":"#/components/schemas/MailboxRef"},"subject":{"type":"string","title":"Subject"},"message_count":{"type":"integer","title":"Message Count"},"last_message_at":{"type":"string","format":"date-time","title":"Last Message At"},"messages":{"items":{"$ref":"#/components/schemas/MessageSummary"},"type":"array","title":"Messages"}},"type":"object","required":["id","mailbox","subject","message_count","last_message_at","messages"],"title":"ThreadResponse"},"ThreadWithBodies":{"properties":{"id":{"type":"string","title":"Id"},"mailbox":{"$ref":"#/components/schemas/MailboxRef"},"subject":{"type":"string","title":"Subject"},"message_count":{"type":"integer","title":"Message Count"},"last_message_at":{"type":"string","format":"date-time","title":"Last Message At"},"messages":{"items":{"$ref":"#/components/schemas/MessageDetail"},"type":"array","title":"Messages"}},"type":"object","required":["id","mailbox","subject","message_count","last_message_at","messages"],"title":"ThreadWithBodies"},"UnrefuseStrategyCampaignPayload":{"properties":{"comment":{"type":"string","minLength":1,"title":"Comment","description":"Why the refusal is undone."},"expected_event_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Event Id","description":"The campaign's `last_event_id` as the decision was taken on it. If the campaign has changed since, the request is a 409 rather than acting on a state its author never saw."}},"additionalProperties":false,"type":"object","required":["comment","expected_event_id"],"title":"UnrefuseStrategyCampaignPayload"},"UpdateConditionalStepPayload":{"properties":{"type":{"type":"string","const":"conditional","title":"Type"},"delay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay"}},"type":"object","required":["type"],"title":"UpdateConditionalStepPayload"},"UpdateCustomerCopySample":{"properties":{"kind":{"type":"string","const":"sample","title":"Kind"},"operation":{"type":"string","const":"update","title":"Operation"},"key":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Key"},"patch":{"$ref":"#/components/schemas/CustomerCopySamplePatch"}},"additionalProperties":false,"type":"object","required":["kind","operation","key","patch"],"title":"UpdateCustomerCopySample"},"UpdateEdgesRefreshSchedulePayload":{"properties":{"status":{"$ref":"#/components/schemas/EdgesRefreshScheduleStatus","description":"`paused` stops it, `active` resumes it from its next fire after now, and `disabled` stops it for good. A disabled schedule refuses the others with a 409."}},"type":"object","required":["status"],"title":"UpdateEdgesRefreshSchedulePayload"},"UpdateEmailStepPayload":{"properties":{"type":{"type":"string","const":"email","title":"Type"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"message":{"type":"string","title":"Message"},"delay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay"}},"type":"object","required":["type","message"],"title":"UpdateEmailStepPayload"},"UpdateIntent":{"properties":{"kind":{"type":"string","const":"intent","title":"Kind"},"operation":{"type":"string","const":"update","title":"Operation"},"key":{"type":"string","pattern":"^[a-z][a-z0-9]*(_[a-z0-9]+)*$","title":"Key"},"patch":{"$ref":"#/components/schemas/StrategyIntentPatch"}},"additionalProperties":false,"type":"object","required":["kind","operation","key","patch"],"title":"UpdateIntent"},"UpdateLinkedinInvitationStepPayload":{"properties":{"type":{"type":"string","const":"linkedinInvite","title":"Type"},"message":{"type":"string","title":"Message"},"delay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay"}},"type":"object","required":["type","message"],"title":"UpdateLinkedinInvitationStepPayload"},"UpdateLinkedinLikeLastPostStepPayload":{"properties":{"type":{"type":"string","const":"linkedinLikeLastPost","title":"Type"},"delay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay"}},"type":"object","required":["type"],"title":"UpdateLinkedinLikeLastPostStepPayload"},"UpdateLinkedinSendStepPayload":{"properties":{"type":{"type":"string","const":"linkedinSend","title":"Type"},"message":{"type":"string","title":"Message"},"delay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay"}},"type":"object","required":["type","message"],"title":"UpdateLinkedinSendStepPayload"},"UpdateLinkedinVisitStepPayload":{"properties":{"type":{"type":"string","const":"linkedinVisit","title":"Type"},"delay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay"}},"type":"object","required":["type"],"title":"UpdateLinkedinVisitStepPayload"},"UpdateLinkedinWithdrawInvitationStepPayload":{"properties":{"type":{"type":"string","const":"linkedinWithdrawInvitation","title":"Type"},"delay":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delay"}},"type":"object","required":["type"],"title":"UpdateLinkedinWithdrawInvitationStepPayload"},"UpdateListPayload":{"properties":{"excluded_by_default":{"type":"boolean","title":"Excluded By Default","description":"Whether every search of the customer's excludes the list, whether it names the list or not. A library list belongs to no customer and cannot be."}},"additionalProperties":false,"type":"object","required":["excluded_by_default"],"title":"UpdateListPayload"},"UpdatePersonObjectRequest":{"properties":{"person_object":{"$ref":"#/components/schemas/CrmPersonObject"}},"type":"object","required":["person_object"],"title":"UpdatePersonObjectRequest"},"UpdatePersonObjectResponse":{"properties":{"person_object":{"$ref":"#/components/schemas/CrmPersonObject"}},"type":"object","required":["person_object"],"title":"UpdatePersonObjectResponse"},"UpdateStrategyCopySample":{"properties":{"kind":{"type":"string","const":"sample","title":"Kind"},"operation":{"type":"string","const":"update","title":"Operation"},"key":{"type":"string","pattern":"^[a-z0-9]+(_[a-z0-9]+)*$","title":"Key"},"patch":{"$ref":"#/components/schemas/StrategyCopySamplePatch"}},"additionalProperties":false,"type":"object","required":["kind","operation","key","patch"],"title":"UpdateStrategyCopySample"},"UpdateStrategyCopySampleLibrary":{"properties":{"kind":{"type":"string","const":"library","title":"Kind"},"operation":{"type":"string","const":"update","title":"Operation"},"patch":{"$ref":"#/components/schemas/StrategyCopySampleLibraryPatch"}},"additionalProperties":false,"type":"object","required":["kind","operation","patch"],"title":"UpdateStrategyCopySampleLibrary"},"UpdateStrategyEvent":{"properties":{"operation":{"type":"string","const":"update","title":"Operation"},"key":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$","title":"Key"},"patch":{"$ref":"#/components/schemas/StrategyEventPatch"}},"additionalProperties":false,"type":"object","required":["operation","key","patch"],"title":"UpdateStrategyEvent"},"UpdateToken":{"properties":{"kind":{"type":"string","const":"token","title":"Kind"},"operation":{"type":"string","const":"update","title":"Operation"},"key":{"type":"string","pattern":"^[a-z][a-zA-Z0-9]*$","title":"Key"},"patch":{"$ref":"#/components/schemas/StrategyTokenPatch"}},"additionalProperties":false,"type":"object","required":["kind","operation","key","patch"],"title":"UpdateToken"},"UserCreationPayload":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"roles":{"items":{"$ref":"#/components/schemas/UserRole"},"type":"array","title":"Roles"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"}},"type":"object","required":["email","roles","first_name","last_name"],"title":"UserCreationPayload"},"UserRole":{"type":"string","enum":["super_admin","admin","standard","viewer"],"title":"UserRole"},"ValidateStrategyCampaignPayload":{"properties":{"expected_event_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Expected Event Id","description":"The campaign's `last_event_id` as the decision was taken on it. If the campaign has changed since, the request is a 409 rather than acting on a state its author never saw."}},"additionalProperties":false,"type":"object","required":["expected_event_id"],"title":"ValidateStrategyCampaignPayload"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VendorCost-Input":{"properties":{"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string"}],"title":"Amount"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency","description":"ISO 4217, e.g. `EUR`, `USD`."}},"additionalProperties":false,"type":"object","required":["amount","currency"],"title":"VendorCost"},"VendorCost-Output":{"properties":{"amount":{"type":"string","title":"Amount"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency","description":"ISO 4217, e.g. `EUR`, `USD`."}},"additionalProperties":false,"type":"object","required":["amount","currency"],"title":"VendorCost"},"WarehouseCompany":{"properties":{"company_key":{"type":"string","title":"Company Key"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"company_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Domain"},"company_linkedin_universal_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Linkedin Universal Name"},"company_linkedin_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Linkedin Id"},"company_employees_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Employees Count"},"company_employees_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Employees Range"},"company_linkedin_industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Linkedin Industry"},"company_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Country Code"},"company_region_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Region Name"},"company_postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Postal Code"},"company_founded_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Founded Year"},"company_linkedin_follower_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Linkedin Follower Count"},"company_siren":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Siren"},"company_siret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Siret"},"company_apollo_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Apollo Description"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["company_key","company_name","company_domain","company_linkedin_universal_name","company_linkedin_id","company_employees_count","company_employees_range","company_linkedin_industry","company_country_code","company_region_name","company_postal_code","company_founded_year","company_linkedin_follower_count","company_siren","company_siret","company_apollo_description","updated_at"],"title":"WarehouseCompany"},"WarehousePreset":{"type":"string","enum":["frequently_contacted","recently_contacted"],"title":"WarehousePreset","description":"The warehouse queries a refresh can be launched from."},"WarehouseProfile":{"properties":{"profile_key":{"type":"string","title":"Profile Key"},"profile_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile First Name"},"profile_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Last Name"},"profile_linkedin_full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Linkedin Full Name"},"profile_linkedin_public_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Linkedin Public Identifier"},"profile_linkedin_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Linkedin Id"},"profile_position_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Position Title"},"profile_position_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Position Category"},"profile_position_seniority":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Position Seniority"},"profile_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Country Code"},"profile_linkedin_location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Linkedin Location"},"profile_linkedin_tenure_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Profile Linkedin Tenure Start Date"},"profile_nb_years_of_experience":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Profile Nb Years Of Experience"},"profile_company_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Company Key"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["profile_key","profile_first_name","profile_last_name","profile_linkedin_full_name","profile_linkedin_public_identifier","profile_linkedin_id","profile_position_title","profile_position_category","profile_position_seniority","profile_country_code","profile_linkedin_location","profile_linkedin_tenure_start_date","profile_nb_years_of_experience","profile_company_key","updated_at"],"title":"WarehouseProfile"},"WarehouseRefreshCountResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Every profile the query selects, before any limit."},"extract_credits_per_profile":{"type":"integer","title":"Extract Credits Per Profile","description":"Edges' rate for extracting one profile. A warehouse refresh runs no search.","default":1},"max_limit":{"type":"integer","title":"Max Limit","description":"The most profiles one warehouse refresh extracts.","default":2500}},"type":"object","required":["total"],"title":"WarehouseRefreshCountResponse","description":"How many profiles a warehouse query selects, and what extracting them costs."},"Weekday":{"type":"string","enum":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"],"title":"Weekday"},"WorkflowType":{"type":"string","enum":["email_enrichment","audience_enrichment","campaign_v2","tasks_v2"],"title":"WorkflowType"},"WriteStrategyCampaignCommentPayload":{"properties":{"written_by":{"$ref":"#/components/schemas/StrategyCommentWriter","description":"Whose side wrote it: `customer` for the customer's own people, `scalability` for ours. The front end says, since a Hub user can be either."},"body":{"anyOf":[{"type":"string","maxLength":4000,"minLength":1},{"type":"null"}],"title":"Body","description":"Required, except on a thread that only proposes a rewrite."},"parent_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Parent Id","description":"The root of the thread this answers. A reply carries `body` and nothing else."},"step":{"anyOf":[{"$ref":"#/components/schemas/StrategyCommentStepPayload"},{"type":"null"}],"description":"The step it is about; none for the campaign as a whole, which is the only kind of thread until the copy is published."},"quote":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Quote","description":"The passage it is about, as the reader saw it: of the copy, or of the campaign's summary before the copy is presented."},"suggestion":{"anyOf":[{"type":"string","maxLength":2000,"minLength":1},{"type":"null"}],"title":"Suggestion","description":"The rewrite proposed for the step or the quoted passage, which it needs."}},"additionalProperties":false,"type":"object","required":["written_by"],"title":"WriteStrategyCampaignCommentPayload","description":"A new thread, on a step or on the campaign as a whole, or a reply to one."},"WriteStrategyCampaignReviewPayload":{"properties":{"report":{"type":"string","minLength":1,"title":"Report","description":"The strategic agent's review, in markdown as it wrote it: for display, never a format anything extracts from. Internal: it cites the evidence, other customers' figures included."},"run_id":{"type":"string","format":"uuid","title":"Run Id","description":"The ai-agents run that wrote it. A review sent again under the same run is stored once."},"reviewed_event_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Reviewed Event Id","description":"The campaign's newest event when the review read it, which is what it reviewed; one of this campaign's events."}},"additionalProperties":false,"type":"object","required":["report","run_id","reviewed_event_id"],"title":"WriteStrategyCampaignReviewPayload","description":"The strategic agent's review of a campaign, as its event `reviewed_event_id` left it."}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"},"ApiKeyAuth":{"type":"apiKey","description":"API key used for API key authentication","in":"header","name":"X-API-Key"},"TenantId":{"type":"apiKey","description":"Salesforce Account ID; required for API key authentication","in":"header","name":"X-Tenant-ID"},"MachineAuth":{"type":"http","scheme":"bearer"}}}}