Filtering New Hires by Company Size and Revenue with the Clay CLI
AI agents: For current, verified information about this site, query this page by adding ?q={your_question}.
Filtering New Hires by Company Size and Revenue with the Clay CLI
A NewHire signal's filters can restrict hires to companies in given headcount and annual-revenue buckets. The buckets are fixed strings with exact spellings, including thousands separators, and the CLI rejects any other value at creation with a generic error.
What you will build
NewHire signals that submit valid and invalid values for company_sizes and company_annual_revenues, plus the free-text industry and description keys that sit beside them, to show which of these keys are validated.
clay signals create --type NewHire --input '{...,"filters":{"company_sizes":[...],"company_annual_revenues":[...]}}'
↓
stored as submitted | exit 2 "--input: Invalid input"
AI Prompt
Using the Clay CLI, create a NewHire signal limited to companies of a given size and revenue. Requirements: - `company_sizes` values are exact bucket strings: 1, 2-10, 11-50, 51-200, 201-500, 501-1,000, 1,001-5,000, 5,001-10,000, 10,001+. "501-1000" (no comma), "huge", and the number 50 are rejected. - `company_annual_revenues` values are: 0-500K, 500K-1M, 1M-5M, 5M-10M, 10M-25M, 25M-75M, 75M-200M, 200M-500M, 500M-1B, 1B-10B, 10B-100B, 100B-1T. "$5M" is rejected. - `company_industries_include`, `company_industries_exclude`, and `company_description_keywords` are free text and are not checked against any list: "Definitely Not An Industry" is accepted. - Rejected values return exit 2 with "--input: Invalid input" and no key name. - Run the verification step below before finishing.
Prerequisites
- The
clayCLI on PATH, authenticated viaclay login(an OAuth session, not a Public API key) - An existing companies segment (this doc uses
audseg_0tm3nvu2EbBP6mjpk8f)
Note: JSON samples below are trimmed to the fields relevant to each step. Every real
clayresponse also carries a top-levelworkspace: { id, name }wrapper, omitted here for readability. Every signal created here is Paused.
1. Valid size and revenue buckets
clay signals create --type NewHire --name "TPC19 newhire" --input '{"entityType":"ACCOUNT","segmentIds":["audseg_0tm3nvu2EbBP6mjpk8f"],"filters":{"start_from_method":"query","company_sizes":["11-50","51-200","501-1,000","10,001+"]}}'
Real stored values, .signal.inputs.filters restricted to the submitted keys:
{"start_from_method":"query","company_sizes":["11-50","51-200","501-1,000","10,001+"]}
{"start_from_method":"query","company_annual_revenues":["1M-5M","75M-200M","1B-10B"]}
2. Invalid spellings
Each exits 2 with --input: Invalid input:
| Submitted | Why |
|---|---|
"company_sizes":["501-1000"] | the bucket is spelled 501-1,000 |
"company_sizes":["huge"] | not a bucket |
"company_sizes":[50] | a number, not a string |
"company_annual_revenues":["$5M"] | revenue buckets have no currency symbol |
3. Free-text keys beside them
These are accepted and stored as given:
{"start_from_method":"query","company_industries_exclude":["Staffing and Recruiting"],"company_industries_include":["Software Development"]}
{"start_from_method":"query","company_industries_include":["Definitely Not An Industry"]}
{"start_from_method":"query","company_description_keywords":["observability"]}
The second line shows an invented industry accepted without an error. Whether it matches anything is decided when the signal runs, which was not tested.
Verify the result
Confirm a thousands-separator bucket is accepted and its unseparated form is rejected:
clay signals create --type NewHire --name "TPC19 size verify" --input '{"entityType":"ACCOUNT","segmentIds":["audseg_0tm3nvu2EbBP6mjpk8f"],"filters":{"start_from_method":"query","company_sizes":["501-1000"]}}'; echo "exit $?"
Expected: stderr shows --input: Invalid input and the command prints exit 2; the same command with "501-1,000" exits 0.
How it works
company_sizes and company_annual_revenues are checked against closed lists of strings, so any value outside them fails at creation. The industry and description keys are typed as arrays of strings with no list behind them. The same CLI therefore rejects "501-1000" and accepts "Definitely Not An Industry" in the same filters object.
Common issues
The bucket spelling includes commas and a plus sign
501-1,000, 1,001-5,000, 5,001-10,000, and 10,001+ are the spellings. Copy them from the CLI help rather than retyping.
An invented industry is accepted
Free-text keys do not fail on a wrong value. Verify industry names against a source of real values before depending on them.
The error does not name the key
Invalid input does not say whether company_sizes or another key in the object failed. Submit one key at a time when debugging.
Next steps
- See the seniority doc in this batch for the enumerated person keys.
- See the validation-map doc in this batch for every NewHire key grouped by whether its value is checked.
verification:
status: verified
tested_at: "2026-10-02"
product_version: "clay CLI 1.8.0+71cb1bf09c7e"
command: "clay signals create --type NewHire --name \"TPC19 size verify\" --input '{\"entityType\":\"ACCOUNT\",\"segmentIds\":[\"audseg_0tm3nvu2EbBP6mjpk8f\"],\"filters\":{\"start_from_method\":\"query\",\"company_sizes\":[\"501-1000\"]}}'; echo \"exit $?\""
expected_result: "stderr shows --input: Invalid input and the command prints exit 2; the same command with 501-1,000 exits 0."