nodestash

Companies

Manage organizations and link them to contacts

Companies represent organizations in your CRM. Link contacts to companies, track industries, and add custom fields.

Data Model

FieldTypeDescription
idstringUnique ID with co_ prefix
namestringCompany name (required, max 200 chars)
domainstring | nullWebsite domain (unique per workspace, max 255 chars)
industrystring | nullIndustry vertical (max 100 chars)
sizestring | nullCompany size (max 50 chars)
custom_fieldsobjectCustom field key-value pairs
tagsstring[]Tags for categorization (max 20, each max 50 chars)
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Create a Company

curl -X POST https://api.nodestash.io/v1/companies \
  -H "Authorization: Bearer $NODESTASH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corp",
    "domain": "acme.com",
    "industry": "Technology",
    "size": "51-200",
    "tags": ["enterprise", "saas"]
  }'
const company = await client.companies.create({
  name: 'Acme Corp',
  domain: 'acme.com',
  industry: 'Technology',
  size: '51-200',
  tags: ['enterprise', 'saas'],
})

Relationship to Contacts

Contacts can be linked to a company via company_id. When you retrieve a company, you can include its contacts:

# Get company with contact count
curl "https://api.nodestash.io/v1/companies/co_abc123?include=contact_count" \
  -H "Authorization: Bearer $NODESTASH_API_KEY"

# Get company with full contacts list
curl "https://api.nodestash.io/v1/companies/co_abc123?include=contacts" \
  -H "Authorization: Bearer $NODESTASH_API_KEY"
// List contacts for a company
const { data: contacts } = await client.contacts.list({
  company_id: 'co_abc123',
})

Deleting a company does not delete linked contacts. Instead, their company_id is set to null.

Search and Filter

# Filter by domain (substring match)
curl "https://api.nodestash.io/v1/companies?domain=acme.com" \
  -H "Authorization: Bearer $NODESTASH_API_KEY"

# Filter by industry
curl "https://api.nodestash.io/v1/companies?industry=Technology&sort=name" \
  -H "Authorization: Bearer $NODESTASH_API_KEY"
const { data } = await client.companies.list({
  industry: 'Technology',
  sort: 'name',
  limit: 50,
})

Available Filters

ParameterMatch TypeDescription
nameSubstring (case-insensitive)Filter by company name
domainSubstring (case-insensitive)Filter by domain
industrySubstring (case-insensitive)Filter by industry
sizeSubstring (case-insensitive)Filter by company size
tagsAll matchComma-separated, must have all specified tags

API Reference

On this page