nodestash
Companies

Create a new company

Creates a new company in the authenticated workspace. If a `domain` is provided it must be unique within the workspace.

POST
/companies
AuthorizationBearer <token>

API key from your nodestash dashboard. Pass as a Bearer token in the Authorization header.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.nodestash.io/v1/companies" \  -H "Content-Type: application/json" \  -d '{    "name": "Acme Corp",    "domain": "acme.com",    "industry": "Technology",    "size": "51-200",    "custom_fields": {      "tier": "enterprise"    },    "tags": [      "partner",      "enterprise"    ]  }'
{
  "data": {
    "id": "co_7rT4mK9pQsVwXyZaB2cD4",
    "type": "company",
    "attributes": {
      "id": "co_7rT4mK9pQsVwXyZaB2cD4",
      "name": "Acme Corp",
      "domain": "acme.com",
      "industry": "Technology",
      "size": "51-200",
      "custom_fields": {
        "tier": "enterprise"
      },
      "tags": [
        "partner",
        "enterprise"
      ],
      "created_at": "2026-01-10T09:00:00Z",
      "updated_at": "2026-01-10T09:00:00Z"
    }
  },
  "meta": {
    "request_id": "req_8kP5sW3xLqNvRyZbD4eG6"
  }
}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed",
    "details": [
      {
        "field": "email",
        "message": "Invalid email"
      }
    ]
  },
  "meta": {
    "request_id": "req_abc123def456"
  }
}
{
  "error": {
    "code": "INVALID_API_KEY",
    "message": "Missing or invalid Authorization header"
  },
  "meta": {
    "request_id": "req_abc123def456"
  }
}
{
  "error": {
    "code": "CONFLICT",
    "message": "A contact with email 'jane@acme.com' already exists in this workspace"
  },
  "meta": {
    "request_id": "req_abc123def456"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded"
  },
  "meta": {
    "request_id": "req_abc123def456"
  }
}