v1

latestOpenAPI 3.0.02026-07-24311994.6 KB
Company Management

Add Company

Add a new company to the authenticated user's account. The request must include the company name and at least one initial asset value across domains, apks, and/or external_domains.

If the authenticated user belongs to an organization with synced_data: true, only the user with organization.role: "owner" can call this endpoint. Other members receive 403 Forbidden.

post/companies

Request body

namestring required

Display name of the new company. Alphanumeric only (no spaces or special characters), 1-100 characters.

domainsstring[]

Initial primary domains for the company

apksstring[]

Initial APK package names for the company

external_domainsstring[]

Initial external (third-party) domains for the company

Example request

{
  "name": "AcmeCorp",
  "domains": [
    "acme.com"
  ],
  "apks": [
    "com.acme.app"
  ],
  "external_domains": [
    "vendor.com"
  ],
  "webhook": {
    "url": "https://example.com/webhooks/acme",
    "token": "11111111-2222-3333-4444-555555555555",
    "auth_header": "Authorization"
  }
}

Response

Updated list of companies for the authenticated user

Example response

{
  "companies": [
    {
      "_id": "65f0a1b2c3d4e5f6a7b8c9d0",
      "name": "Acme Corp",
      "data": {
        "domains": [
          "acme.com"
        ],
        "apks": [
          "com.acme.app"
        ],
        "external_domains": [
          "vendor.com"
        ],
        "webhook": {
          "url": "https://example.com/webhooks/acme",
          "token": "11111111-2222-3333-4444-555555555555",
          "auth_header": "Authorization"
        }
      }
    }
  ]
}