Companies

Create companies in bulk

Changed on

Creates up to 50 companies under the caller's agency in one request. Each item follows the exact same rules as POST /api/v1/companies (including the websiteUrl-or-linkedinUrl requirement, and the relationship default of none that keeps a company out of the default GET /api/v1/companies).

Items are processed independently and run a few at a time, so they do not necessarily complete in request order; results are always reported in request order via index. An item that fails — e.g. its websiteUrl / linkedinUrl already belongs to an existing company, it references an unknown custom attribute, or an unexpected internal error occurs — is reported in the response with status: "failed" and does not abort the remaining items. Internal errors carry a generic error message and are safe to retry only when the message says the item was not processed; when the failure happened after the company row was already persisted, the error says so and includes the created company id — do not retry that item as-is (its identity now exists, so a retry returns a conflict); verify the company and complete any missing fields via PATCH /api/v1/companies/{id} instead. Identity conflicts include the existing company id and should not be retried as-is.

The response is always 200 with one result per input item (matched by index, the zero-based position in the request array) plus a summary of created/failed counts. A request-level validation error (malformed item, more than 50 items, or the same company named by two items — see the request body) is rejected as a whole with 422 and creates nothing. Created items return the new company id only — read full details via GET /api/v1/companies/{id}.

post/api/v1/companies/batch

Request

Request body

Example request

{
  "companies": [
    {
      "name": "Acme Corp",
      "websiteUrl": "https://acme.com",
      "linkedinUrl": "https://linkedin.com/company/acme",
      "summary": "B2B SaaS",
      "size": "51-200",
      "industry": [
        "Information Technology & Services"
      ],
      "relationship": "client",
      "employeeCount": 150,
      "ticker": "AAPL",
      "location": {
        "name": "London, UK",
        "locality": "London",
        "region": "England",
        "metro": "new york, new york",
        "country": "United Kingdom",
        "streetAddress": "123 Baker Street",
        "addressLine2": "Suite 200",
        "postalCode": "NW1 6XE",
        "raw": "123 Baker Street, London NW1 6XE, United Kingdom",
        "latitude": 51.523767,
        "longitude": -0.158519
      }
    }
  ]
}

Response

Batch processed — check each result item (and the summary) for per-item outcomes

status'ok' required

Example response

{
  "summary": {
    "total": 2,
    "created": 1,
    "failed": 1
  }
}

Changes

    • info

      added the new undefined enum value to the request property //

    • info

      added the new undefined enum value to the request property //

    • info

      added the optional property to the response with the status