> For the complete documentation index, see [llms.txt](https://docs.pyck.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pyck.cloud/graphql-api/mutations/registercompany.md).

# Register Company

registerCompany Mutation

Registers a new company in the pyck system along with an initial admin user. This is typically the first operation performed when setting up a new tenant.

## Arguments

| Name    | Type                    | Description                                           |
| ------- | ----------------------- | ----------------------------------------------------- |
| `input` | `RegisterCompanyInput!` | Input data for registering the company and admin user |

## Return Type

`RegisterCompanyResponse!` - Contains the success status of the registration operation.

## Input Fields

`RegisterCompanyInput`:

| Field            | Type      | Description                                       |
| ---------------- | --------- | ------------------------------------------------- |
| `name`           | `String!` | Required company name                             |
| `adminUsername`  | `String!` | Required username for the initial admin user      |
| `adminEmail`     | `String!` | Required email address for the initial admin user |
| `adminFirstName` | `String!` | Required first name of the initial admin user     |
| `adminLastName`  | `String!` | Required last name of the initial admin user      |
| `adminPassword`  | `String!` | Required password for the initial admin user      |

## Usage Example

```graphql
mutation {
  registerCompany(
    input: {
      name: "Acme Logistics Co.",
      adminUsername: "admin",
      adminEmail: "admin@acme-logistics.com",
      adminFirstName: "John",
      adminLastName: "Smith",
      adminPassword: "securePassword123!"
    }
  ) {
    success
  }
}
```

## JavaScript Example

```javascript
const registerCompanyMutation = `
  mutation RegisterCompany($input: RegisterCompanyInput!) {
    registerCompany(input: $input) {
      success
    }
  }
`;

const variables = {
  input: {
    name: "Acme Logistics Co.",
    adminUsername: "admin",
    adminEmail: "admin@acme-logistics.com",
    adminFirstName: "John",
    adminLastName: "Smith",
    adminPassword: "securePassword123!"
  }
};

// Using fetch or your preferred GraphQL client
const response = await fetch('/graphql', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    query: registerCompanyMutation,
    variables: variables
  })
});

const result = await response.json();
console.log('Company registration result:', result.data.registerCompany);
```

## Notes

* This mutation creates both the company entity and the initial admin user
* The admin user will have full administrative privileges within the new company tenant
* Password requirements may apply based on system security policies
* Company names should be unique within the system
* This operation typically requires system-level permissions or may be publicly accessible for initial setup


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.pyck.cloud/graphql-api/mutations/registercompany.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
