> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# createOneHook



**mutation** `createOneHook(input: CreateOneHookInput!): Hook!`

## Arguments

**`input`**: `CreateOneHookInput!` (required)

## Returns

`Hook!`

**`account`**: `Account`

---

**`configuration`**: `JSON`

Per-event-type configuration, keyed by event log type. Currently only ENTITLEMENT_USAGE_EXCEEDED uses this: an array of usage-percentage thresholds (e.g. [50, 80, 100]) that each fire the webhook once when crossed. Other event types don’t require any configuration.

---

**`createdAt`**: `DateTime`

Timestamp of when the record was created

---

**`description`**: `String`

Webhook description

---

**`endpoint`**: `String!`

The Webhook endpoint URL

---

**`environment`**: `Environment`

---

**`environmentId`**: `UUID!`

The unique identifier for the environment

---

**`eventLogTypes`**: `[EventLogType!]!`

The event types that the webhook will be triggered on

---

**`id`**: `UUID!`

Unique identifier for the entity

---

**`secretKey`**: `String`

Secret key for the webhook

---

**`status`**: `HookStatus!`

The status of the webhook

## Examples

```graphql Mutation
mutation CreateOneHook($input: CreateOneHookInput!) {
  createOneHook(input: $input) {
    account {
      accessMethod
      accountEmailDomain
      accountStatus
      defaultSSORoles {
        accountRole
        nonProductionRole
        productionRole
      }
      displayName
      emailDomains {
        accountId
        domain
        id
      }
    }
    configuration
    createdAt
    description
    endpoint
    environment {
      account {
        accessMethod
        accountEmailDomain
        accountStatus
        defaultSSORoles {
          __typename
        }
        displayName
        emailDomains {
          __typename
        }
      }
      apiKeys {
        createdAt
        description
        displayName
        environmentId
        expireAt
        id
      }
      color
      createdAt
      description
      displayName
    }
  }
}
```

```json Variables
{
  "input": {
    "hook": {}
  }
}
```

```json Response
{
  "data": {
    "createOneHook": {
      "account": {
        "accessMethod": "AUTHORIZED_DOMAIN",
        "accountEmailDomain": "string",
        "accountStatus": "ACTIVE",
        "defaultSSORoles": {
          "accountRole": "MEMBER",
          "nonProductionRole": "ADMIN",
          "productionRole": "ADMIN"
        },
        "displayName": "string",
        "emailDomains": [
          {
            "accountId": "value",
            "domain": "string",
            "id": "value"
          }
        ]
      },
      "configuration": "value",
      "createdAt": "value",
      "description": "string",
      "endpoint": "string",
      "environment": {
        "account": {
          "accessMethod": "AUTHORIZED_DOMAIN",
          "accountEmailDomain": "string",
          "accountStatus": "ACTIVE",
          "defaultSSORoles": {
            "__typename": "AccessRoles"
          },
          "displayName": "string",
          "emailDomains": [
            {
              "__typename": "AccountEmailDomain"
            }
          ]
        },
        "apiKeys": [
          {
            "createdAt": "value",
            "description": "string",
            "displayName": "string",
            "environmentId": "value",
            "expireAt": "value",
            "id": "value"
          }
        ],
        "color": "string",
        "createdAt": "value",
        "description": "string",
        "displayName": "string"
      }
    }
  }
}
```


## Related topics

- [CreateOneHookInput](https://docs.stigg.io/graphql-reference/types/CreateOneHookInput.md)
- [CreateHook](https://docs.stigg.io/graphql-reference/types/CreateHook.md)
- [createOneProduct](https://docs.stigg.io/graphql-reference/mutations/createOneProduct.md)
- [createOneCustomer](https://docs.stigg.io/graphql-reference/mutations/createOneCustomer.md)
- [createOneExperiment](https://docs.stigg.io/graphql-reference/mutations/createOneExperiment.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.