Get Companies
machship_get_companiesRetrieve a list of companies accessible to your authenticated Machship account. Filter by company hierarchy to find specific company IDs for use in other tools.
Instructions
Returns all companies accessible to the authenticated user.
Args:
atOrBelowCompanyId (number, optional): Filter to companies at or below this company in the hierarchy
response_format ('json' | 'markdown'): Output format (default: 'json')
Returns: Array of company objects, each containing: { "id": number, // Company ID — use this in other tool calls "name": string, // Display name of the company "isActive": boolean, // Whether the company is active "parentCompanyId": number | null }
Examples:
Use when: "List all companies I have access to"
Use when: "What company ID does Acme Corp have?" -> call this, then search by name
Don't use when: You need carrier/service info (use machship_get_company_carriers instead)
Error Handling:
Error 401: Check MACHSHIP_API_TOKEN is set correctly
Error 403: Token lacks permission to list companies
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| atOrBelowCompanyId | No | Limit to companies at or below this company ID in the hierarchy | |
| response_format | No | Output format: 'json' (machine-readable, default) or 'markdown' (human-readable) | json |