Create companies

Company accounts are a core resource in the AppDirect platform and contain one or more company memberships. When you create a company, you must create the first company membership with it. The firstUser object in the request body represents the first membership. When the company is created, an activation email is sent to the first user. The user and company remain in a pending activation state until the first user clicks the activation link in the email.

Use the following POST request to create a new company and the associated first user of that company.

POST https://{marketplaceUrl}/api/account/v2/companies

The example in this topic only includes the body parameters required to create a company through the API. You can include additional parameters in your request. Refer to the Create new company API reference for details on authorization rules and the full list of supported body and query parameters.

A unique identifier (uuid) for your company is returned in the response. This identifier is required in requests to create users, payment instruments, and subscriptions, and is often referred to as the companyUuid in those requests. The ID is also required for subscription management API calls.

Request

{
  "name": "Example Inc",
  "countryCode": "US",
  "firstUser": {
       "firstName": "John",
       "lastName": "Smith",
       "email": "john.smith@example.com",
       "roles": [
         "ROLE_SYS_ADMIN"
       ]
  }
}