Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Create companies

Batch endpoint (batch-first): create one or more companies with domains. Supports partial success - each company is created independently.

POST/companies
Authorization
AuthorizationBearer token · headerrequired

Organization API key (modem_…).

Header parameters
Idempotency-Keystring

Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.

max length 255
Request body
requiredapplication/json
companiesobject[]required
min items 1 · max items 50
Show properties
Array of object
domainstringrequired
min length 1 · max length 255
namestringrequired
min length 1 · max length 255
Responses
200

OK

resultsobject[]required
Show properties
Array of object
dataobject
Show properties
domainsstring[]required
firstSeenAtstring<date-time> | null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
idstringrequired
matches ^\d+$
lastSeenAtstring<date-time> | null
Show properties
Any of:
string<date-time>
string<date-time>
null
null
logoUrlstring<uri> | nullrequired

Company logo image URL.

Show properties
Any of:
string<uri>
string<uri>
null
null
messageCountintegerrequired
namestringrequired

Company name.

personCountintegerrequired
primaryDomainstring | nullrequired
Show properties
Any of:
string
string
null
null
domainstringrequired
errorstring
namestringrequired
successbooleanrequired
400

Invalid request (validation failed).

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

401

Missing or invalid API key.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

403

The API key does not have access to this resource.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

404

The requested resource was not found.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

409

The request conflicts with an existing resource or idempotency operation.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

429

Rate limit exceeded.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

500

Internal server error.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.modem.dev/v1/companies' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "companies": [
    {
      "domain": "string",
      "name": "string"
    }
  ]
}'
Response
{
  "results": [
    {
      "data": {
        "domains": [
          "string"
        ],
        "firstSeenAt": "2019-08-24T14:15:22Z",
        "id": "string",
        "lastSeenAt": "2019-08-24T14:15:22Z",
        "logoUrl": "http://example.com",
        "messageCount": 0,
        "name": "string",
        "personCount": 0,
        "primaryDomain": "string"
      },
      "domain": "string",
      "error": "string",
      "name": "string",
      "success": true
    }
  ]
}

Was this page helpful?