> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/010_company_management/002__create_company_client_secret.md).

# Create Company Client Secret

GraphQL endpoint: `/user`

Creates API credentials (client ID and secret) for a company, which can be used to authenticate as the company and access the Company API. Requires an admin-level connection (ADMIN, OWNER, EXTERNAL\_ADMIN) with the company. An optional description helps manage multiple secrets. The clientSecret is only shown once at creation time — store it securely.

## Query

```graphql
mutation (
  $companyId: ID!
  $description: String
) {
  createCompanyClientSecret (
    companyId: $companyId
    description: $description
  ) {
    clientId
    clientSecret
    description
  }
}

```

## Variables

```json
{
  "companyId": "00000000-0000-4000-8000-000000000002",
  "description": "nice client secret"
}
```

## Response

```json
{
  "data": {
    "createCompanyClientSecret": {
      "clientId": "00000000-0000-4000-8000-000000000001",
      "clientSecret": "br3NX6QY0RgIOC+pmLcVhQ",
      "description": "nice client secret"
    }
  }
}
```
