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

# CreateWebhooksInput

> Input for creating webhooks. Reference for the CreateWebhooksInput input object in the Codex API: every field, its type, and the operations that accept it.

## GraphQL

```
input CreateWebhooksInput {
  tokenPairEventWebhooksInput: CreateTokenPairEventWebhooksInput
  rawTransactionWebhooksInput: CreateRawTransactionWebhooksInput
  marketCapWebhooksInput: CreateMarketCapWebhooksInput
  tokenPriceEventWebhooksInput: CreateTokenPriceEventWebhooksInput
  tokenTransferEventWebhooksInput: CreateTokenTransferEventWebhooksInput
  predictionTradeWebhooksInput: CreatePredictionTradeWebhooksInput
  predictionMarketMetricsEventWebhooksInput: CreatePredictionMarketMetricsEventWebhooksInput
  tokenLaunchEventWebhooksInput: CreateTokenLaunchEventWebhooksInput
}

enum AlertRecurrence {
  INDEFINITE
  ONCE
}

input StringEqualsConditionInput {
  eq: String!
}

input IntEqualsConditionInput {
  eq: Int!
}

input ComparisonOperatorInput {
  gt: String
  gte: String
  lt: String
  lte: String
  eq: String
}

input PriceEventWebhookConditionInput {
  tokenAddress: StringEqualsConditionInput!
  networkId: IntEqualsConditionInput!
  priceUsd: ComparisonOperatorInput!
  pairAddress: StringEqualsConditionInput
  volumeUsd: ComparisonOperatorInput
  liquidityUsd: ComparisonOperatorInput
}

input RetrySettingsInput {
  maxTimeElapsed: Int
  minRetryDelay: Int
  maxRetryDelay: Int
  maxRetries: Int
}

input BucketKeyInput {
  bucketId: String!
  bucketSortKey: String!
}

enum PublishingType {
  BATCH
  SINGLE
}

input CreatePriceWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: PriceEventWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
  publishingType: PublishingType
  deduplicate: Boolean
}

input CreatePriceWebhooksInput {
  webhooks: [CreatePriceWebhookArgs!]!
}

input OneOfNumberConditionInput {
  oneOf: [Int!]!
}

enum TokenPairEventType {
  SWAP
  MINT
  BURN
  SYNC
  BUY
  SELL
  COLLECT
  COLLECT_PROTOCOL
}

input TokenPairEventTypeConditionInput {
  oneOf: [TokenPairEventType!]!
}

input TokenPairEventWebhookConditionInput {
  networkId: OneOfNumberConditionInput
  maker: StringEqualsConditionInput
  pairAddress: StringEqualsConditionInput
  exchangeAddress: StringEqualsConditionInput
  tokenAddress: StringEqualsConditionInput
  swapValue: ComparisonOperatorInput
  eventType: TokenPairEventTypeConditionInput
}

input CreateTokenPairEventWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: TokenPairEventWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
  publishingType: PublishingType
  deduplicate: Boolean
}

input CreateTokenPairEventWebhooksInput {
  webhooks: [CreateTokenPairEventWebhookArgs!]!
}

input StringContainsConditionInput {
  contains: [String!]
  notContains: [String!]
}

input RawTransactionWebhookConditionInput {
  networkId: OneOfNumberConditionInput
  to: StringEqualsConditionInput
  from: StringEqualsConditionInput
  toOrFrom: StringEqualsConditionInput
  input: StringContainsConditionInput
  ignoreTokenPairEvents: Boolean
}

input CreateRawTransactionWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: RawTransactionWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
  publishingType: PublishingType
  deduplicate: Boolean
}

input CreateRawTransactionWebhooksInput {
  webhooks: [CreateRawTransactionWebhookArgs!]!
}

input MarketCapEventWebhookConditionInput {
  tokenAddress: StringEqualsConditionInput!
  networkId: IntEqualsConditionInput!
  fdvMarketCapUsd: ComparisonOperatorInput
  circulatingMarketCapUsd: ComparisonOperatorInput
  volumeUsd: ComparisonOperatorInput
  liquidityUsd: ComparisonOperatorInput
}

input CreateMarketCapWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: MarketCapEventWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
  publishingType: PublishingType
  deduplicate: Boolean
}

input CreateMarketCapWebhooksInput {
  webhooks: [CreateMarketCapWebhookArgs!]!
}

input TokenPriceEventWebhookConditionInput {
  address: StringEqualsConditionInput!
  networkId: IntEqualsConditionInput!
  priceUsd: ComparisonOperatorInput!
}

input CreateTokenPriceEventWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: TokenPriceEventWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
  publishingType: PublishingType
  deduplicate: Boolean
}

input CreateTokenPriceEventWebhooksInput {
  webhooks: [CreateTokenPriceEventWebhookArgs!]!
}

enum TokenTransferDirection {
  FROM
  TO
}

input OneOfTokenTransferDirectionConditionInput {
  oneOf: [TokenTransferDirection!]!
}

input TokenTransferEventWebhookConditionInput {
  tokenAddress: StringEqualsConditionInput
  networkId: OneOfNumberConditionInput
  address: StringEqualsConditionInput
  direction: OneOfTokenTransferDirectionConditionInput
}

input CreateTokenTransferEventWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: TokenTransferEventWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
  publishingType: PublishingType
  deduplicate: Boolean
}

input CreateTokenTransferEventWebhooksInput {
  webhooks: [CreateTokenTransferEventWebhookArgs!]!
}

enum PredictionTradeEventType {
  TRADE
  BUY
  SELL
  BUY_COUNTERPARTY
  SELL_COUNTERPARTY
  POSITION_REDEEMED
}

input PredictionTradeEventTypeConditionInput {
  oneOf: [PredictionTradeEventType!]!
}

input PredictionTradeWebhookConditionInput {
  traderId: StringEqualsConditionInput
  marketId: StringEqualsConditionInput
  eventId: StringEqualsConditionInput
  eventType: PredictionTradeEventTypeConditionInput
  tradeValueUsd: ComparisonOperatorInput
  amountToken: ComparisonOperatorInput
}

input CreatePredictionTradeWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: PredictionTradeWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
}

input CreatePredictionTradeWebhooksInput {
  webhooks: [CreatePredictionTradeWebhookArgs!]!
}

input WindowedPredictionMarketMetricsEventMarketConditionInput {
  volumeUsd: ComparisonOperatorInput
  trades: ComparisonOperatorInput
  volumeChange: ComparisonOperatorInput
  tradesChange: ComparisonOperatorInput
}

input PredictionMarketMetricsEventMarketConditionInput {
  min5: WindowedPredictionMarketMetricsEventMarketConditionInput
  hour1: WindowedPredictionMarketMetricsEventMarketConditionInput
  hour4: WindowedPredictionMarketMetricsEventMarketConditionInput
  hour12: WindowedPredictionMarketMetricsEventMarketConditionInput
  day1: WindowedPredictionMarketMetricsEventMarketConditionInput
  week1: WindowedPredictionMarketMetricsEventMarketConditionInput
}

input WindowedPredictionMarketMetricsEventOutcomeConditionInput {
  price: ComparisonOperatorInput
  priceChange: ComparisonOperatorInput
  volumeUsd: ComparisonOperatorInput
  volumeChange: ComparisonOperatorInput
  trades: ComparisonOperatorInput
  tradesChange: ComparisonOperatorInput
}

input PredictionMarketMetricsEventOutcomeConditionInput {
  min5: WindowedPredictionMarketMetricsEventOutcomeConditionInput
  hour1: WindowedPredictionMarketMetricsEventOutcomeConditionInput
  hour4: WindowedPredictionMarketMetricsEventOutcomeConditionInput
  hour12: WindowedPredictionMarketMetricsEventOutcomeConditionInput
  day1: WindowedPredictionMarketMetricsEventOutcomeConditionInput
  week1: WindowedPredictionMarketMetricsEventOutcomeConditionInput
}

input PredictionMarketMetricsEventWebhookConditionInput {
  marketId: StringEqualsConditionInput!
  market: PredictionMarketMetricsEventMarketConditionInput
  outcome0: PredictionMarketMetricsEventOutcomeConditionInput
  outcome1: PredictionMarketMetricsEventOutcomeConditionInput
  anyOutcome: PredictionMarketMetricsEventOutcomeConditionInput
}

input CreatePredictionMarketMetricsEventWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: PredictionMarketMetricsEventWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
  publishingType: PublishingType
  deduplicate: Boolean
}

input CreatePredictionMarketMetricsEventWebhooksInput {
  webhooks: [CreatePredictionMarketMetricsEventWebhookArgs!]!
}

input OneOfStringConditionInput {
  oneOf: [String!]!
}

input TokenLaunchEventWebhookConditionInput {
  creatorAddress: StringEqualsConditionInput
  launchpadName: OneOfStringConditionInput
  networkId: OneOfNumberConditionInput
  tokenAddress: StringEqualsConditionInput
}

input CreateTokenLaunchEventWebhookArgs {
  name: String!
  callbackUrl: String!
  securityToken: String!
  alertRecurrence: AlertRecurrence!
  conditions: TokenLaunchEventWebhookConditionInput!
  retrySettings: RetrySettingsInput
  bucketKey: BucketKeyInput
  publishingType: PublishingType
  deduplicate: Boolean
}

input CreateTokenLaunchEventWebhooksInput {
  webhooks: [CreateTokenLaunchEventWebhookArgs!]!
}
```

### Used By

**Used as input by**

* [createWebhooks](https://docs.codex.io/api-reference/mutations/createwebhooks.md): Create event webhooks for price, token/pair, transfer, market cap, and prediction market trades.


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