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

# Create Alert

> Create an Alert in a Tenderly project. 

Learn more about the different [types of Alert triggers](https://docs.tenderly.co/alerts/alert-types-targets-and-parameters).



## OpenAPI

````yaml /api-reference/openapi.json post /v1/account/{accountSlug}/project/{projectSlug}/alert
openapi: 3.1.0
info:
  version: 1.0.0
  title: Tenderly API
  description: >
    # Introduction


    The Tenderly API provides a programmatic interface for managing Tenderly
    resources using standard HTTP requests.

    It mirrors many functionalities available through the Tenderly Dashboard,
    enabling you to script complex actions. The API documentation includes a
    design and technology overview, followed by detailed endpoint information.


    [Log into your Tenderly account](https://dashboard.tenderly.co/login) to
    automatically populate your API credentials in the documentation. Your
    account ID and project slug will be pre-filled across the documentation,
    excluding the API access token for security reasons. 


    Base URL: `https://api.tenderly.co/api`


    ## Authentication


    The Tenderly API requires an access token to authenticate your requests.
    Learn how to [generate and manage your API access
    keys](https://docs.tenderly.co/account/projects/how-to-generate-api-access-token).


    Add `X-Access-Key` to each request header, e.g.:


    ```bash

    curl
    'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate'
    \
      -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
      ...
    ```


    Do not share your secret API keys in publicly accessible areas such as
    GitHub, client-side code, and so forth.


    Authentication to the API is performed via HTTP Basic Auth. Provide your API
    key as the basic auth username value. You do not need to provide a password.


    If you need to authenticate via bearer auth (e.g., for a cross-origin
    request), use:


    ```bash

    curl
    'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate'
    \
      -H 'Authorization: Bearer <TENDERLY_TOKEN>' \
      ...
    ```


    All API requests must be made over HTTPS. Calls made over plain HTTP will
    fail. API requests without authentication will also fail.


    ## Requests


    Any tool capable of making HTTP requests can interact with the API by
    requesting the appropriate URI. Requests should be made using the HTTPS
    protocol to ensure that traffic is encrypted. 


    The API's response varies with the request method used.


    |Method|Usage|

    |--- |--- |

    |GET|Used to retrieve information about your account, project, or resources.
    The requested information is returned as a JSON object. The attributes
    defined by the JSON object can be used to form additional requests. Requests
    made using the GET method are read-only and will not affect the objects you
    are querying.|

    |DELETE|Used to destroy a resource and remove it from your account and
    project. This methods removes the specified object if it is found. If it is
    not found, the operation will return a response indicating that the object
    was not found. You do not have to check if the resource is available prior
    to issuing a DELETE command. The final state will be the same regardless of
    its existence.|

    |PUT|Used to update the information about a resource in your account. The
    PUT method sets the state of the target using the provided values,
    regardless of their current values. Requests using the PUT method do not
    need to check the current attributes of the object.|

    |PATCH|Some resources support partial modification. In these cases, the
    PATCH method is available. Unlike PUT which generally requires a complete
    representation of a resource, a PATCH request is a set of instructions on
    how to modify a resource updating only specific attributes.|

    |POST|Used to create a new object. The POST request includes all of the
    attributes necessary to create a new object.|


    ## Errors


    The API responds with standard HTTP statuses, including error codes that
    indicate the outcome of requests. In the event of a problem, the status will
    contain the error code, while the

    body of the response will usually contain additional information about the
    problem.


    |Status Code|Type|Description|

    |--- |--- |--- |

    |200|OK|Everything worked as expected.|

    |400|Bad Request|The request was unacceptable, often due to missing a
    required parameter.|

    |401|Unauthorized|No valid API key provided.|

    |402|Request Failed|The parameters were valid but the request failed.|

    |403|Forbidden|The API key doesn’t have permissions to perform the request.|

    |404|Not Found|The requested resource doesn’t exist.|

    |429|Too Many Requests|Too many requests hit the API too quickly. We
    recommend an exponential backoff of your requests.|

    |500, 502, 503, 504|Server Errors|Something went wrong on Tenderly’s end.|


    Both 400 and 500 level errors return a JSON object in the response body,
    containing specific attributes detailing the error.


    |Name|Type|Description|

    |--- |--- |--- |

    |id|string|Endpoints include an error ID that should be provided when
    reporting bugs or opening support tickets to help identify the issue.|

    |slug|string|A short identifier corresponding to the HTTP status code
    returned. For example, the ID for a response returning a 404 status code
    would be "not_found."|

    |message|string|A message providing additional information about the error,
    including details to help resolve it when possible.|


    ### Example error response


    HTTP/1.1 404 Bad request

    ```json

    {

    "error": {
      "id": "596b1dc7-af60-477b-aab3-6c93eb92ddfa",
      "slug": "bad_request",
      "message": "Bad request input parameters"
     }
    }

    ```


    ## Responses


    When a request is successful, a response body will typically be sent back in

    the form of a JSON object. An exception to this is when a DELETE request is

    processed, which will result in a successful HTTP 204 status and an empty

    response body.


    The value of these keys will generally be a JSON object for a request on a

    single object and an array of objects for a request on a collection of

    objects.


    ### Response for a single object


    ```json

    {
      "simulation": {
        "id": "123"
        "...": "..."
      }
    }

    ```


    ### Response for an object collection


    ```json

    {
      "simulations": [
        {
          "id": "123"
          "...": "..."
        },
        {
          "id": "1234"
          "...": "..."
        }
      ]
    }

    ```


    ## Pagination


    By default, 20 objects are returned per page per request.

    You can customize this behavior using the following parameters:


    * **Pagination Limit (perPage)**: To change the number of items per page,

    append `?perPage=[number]` to your request. For example, `?perPage=2` limits

    the results to two items per page. The maximum limit is 100 items per page.

    * **Page Offset (page)**: To navigate through paginated results, use the

    `?page=[number]` parameter. For instance, `?page=3` will take you to the
    third page of the results.

    Only positive integers are valid for this parameter.


    Remember:


    * You can combine these parameters. For example, `?perPage=10&page=2` will
    show the second page with 10 items per page.

    * The maximum number of results per page (`perPage`) is 100.


    ## Rate limits


    Requests through the API are rate limited per `X-Access-Key` API key.
    Current rate limits:


    * **Non-authenticated users:** 100 requests per minute

    * **Authenticated users:** 400 requests per minute


    Once you exceed either limit, you will be rate limited until the next cycle

    starts. Space out any requests that you would otherwise issue in bursts for

    the best results.


    The rate limiting information is contained within the response headers of

    each request. The relevant headers are:


    * **X-Tdly-Limit**: The number of requests that can be made per minute.

    * **X-Tdly-Remaining**: The number of requests that remain before you hit
    your request limit. See the information below for how the request limits
    expire.

    * **X-Tdly-Reset-Timestamp**: This represents the time when the oldest
    request will expire. The value is given in [Unix epoch
    time](http://en.wikipedia.org/wiki/Unix_time). See below for more
    information about how request limits expire.


    As long as the `X-Tdly-Remaining` count is above zero, you will be able

    to make additional requests.


    The way that a request expires and is removed from the current limit count

    is important to understand. Rather than counting all of the requests for a

    minute and resetting the `X-Tdly-Remaining` value at the end of the minute,

    each request instead has its own timer.


    This means that each request contributes toward the `X-Tdly-Remaining`

    count for one complete minute after the request is made. When that request's

    timer runs out, it is no longer counted toward the request limit.


    This has implications on the meaning of the `X-Tdly-Reset-Timestamp` header
    as

    well. Because the entire rate limit is not reset at one time, the value of

    this header is set to the time when the _oldest_ request will expire.


    Keep this in mind if you see your `X-Tdly-Reset-Timestamp` value change, but
    not

    move an entire minute into the future.


    If the `X-Tdly-Remaining` reaches zero, subsequent requests will receive

    a 429 error code until the request reset has been reached. 


    `X-Tdly-Remaining` reaching zero can also indicate that the "burst limit" of
    250 

    requests per minute limit was met, even if the 400 requests per minute limit
    was not. 


    You can see the format of the response in the examples. 


    **Note:** Some endpoints may have special rate limit requirements that

    are independent of the limits defined above.


    ### Sample rate limit headers


    ```bash

    'X-Tdly-Limit': 100

    'X-Tdly-Remaining': 79

    'X-Tdly-Reset-Timestamp': 1402425459

    ```


    ### Sample rate exceeded response


    429 Too Many Requests

    ```bash

    {
      id: "too_many_requests",
      message: "API Rate limit exceeded."
    }

    ```


    ## Parameters


    There are two different ways to pass parameters in a request to the API.


    When passing parameters to create or update an object, parameters should be

    passed as a JSON object containing the appropriate attribute names and

    values as key-value pairs. When you use this format, you should specify that

    you are sending a JSON object in the header. This is done by setting the

    `Content-Type` header to `application/json`. This ensures that your request

    is interpreted correctly.


    When passing parameters to filter a response on GET requests, parameters can

    be passed using standard query attributes. In this case, the parameters

    would be embedded into the URI itself by appending a `?` to the end of the

    URI and then setting each attribute with an equal sign. Attributes can be

    separated with a `&`. Tools like `curl` can create the appropriate URI when

    given parameters and values; this can also be done using the `-F` flag and

    then passing the key and value as an argument. The argument should take the

    form of a quoted string with the attribute being set to a value with an

    equal sign.


    ### Pass parameters as a JSON object


    ```bash

    curl
    'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulate'
    \
      -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
      -H 'content-type: application/json' \
      --data-raw '{"network_id":"1","block_number":null,"transaction_index":null,"from":"0x0000000000000000000000000000000000000000","input":"0x42966c68000000000000000000000000000000000000000000000000000000000000022b","to":"0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c","gas":8000000,"gas_price":"0","value":"0","access_list":[],"generate_access_list":true,"save":true,"block_header":null}' \
      --compressed
    ```


    ### Pass filter parameters as a query string


    ```bash

    curl
    'https://api.tenderly.co/api/v1/account/${TENDERLY_ACCOUNT_SLUG}/project/${TENDERLY_PROJECT_SLUG}/simulations?page=1&perPage=20'
    \
      -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
      --compressed
    ```


    ## Cross origin resource sharing


    In order to make requests to the API from other domains, the API implements

    Cross Origin Resource Sharing (CORS) support.


    CORS support is generally used to create AJAX requests outside of the domain

    that the request originated from. This is necessary to implement projects

    like control panels utilizing the API. This tells the browser that it can

    send requests to an outside domain.


    The procedure that the browser initiates in order to perform these actions

    (other than GET requests) begins by sending a "preflight" request. This sets

    the `Origin` header and uses the `OPTIONS` method. The server will reply

    with the methods it allows and some of the limits it imposes. The

    client then sends the actual request if it falls within the allowed

    constraints.


    This process is usually done by the browser in the background, but you can

    use curl to emulate this process. The headers that will be set to show the
    constraints are:


    * **Access-Control-Allow-Origin**: This is the domain that is sent by the
    client or browser as the origin of the request. It is set through an
    `Origin` header.

    * **Access-Control-Allow-Methods**: This specifies the allowed options for
    requests from that domain. This will generally be all available methods.

    * **Access-Control-Expose-Headers**: This will contain the headers that will
    be available to requests from the origin domain.

    * **Access-Control-Max-Age**: This is the length of time that the access is
    considered valid. After this expires, a new preflight should be sent.

    * **Access-Control-Allow-Credentials**: This will be set to `true`. It
    basically allows you to send your Access token for authentication.


    You should not need to be concerned with the details of these headers,

    because the browser will typically do all of the work for you.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    name: Tenderly Support
    email: support@tenderly.co
  termsOfService: https://tenderly.co/terms-of-service
servers:
  - url: https://api.tenderly.co/api
    description: production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Contracts
    description: >-
      Tenderly allows you to add verified and unverified smart contracts to your
      project to use in development. Once you add a contract, you can start
      inspecting and debugging transactions, simulating transactions with
      modified parameters, or monitoring contract usage.


      Learn more about managing [Smart
      Contracts](https://docs.tenderly.co/monitoring/smart-contracts).
  - name: Wallets
    description: >-
      Similar to contracts, you can also add any public wallet addresses to your
      Tenderly projects. This allows you to keep track of wallet activity, view
      all transactions, simulate transactions, set up wallet alerts, and more.


      Learn more about managing
      [Wallets](https://docs.tenderly.co/monitoring/wallets).
  - name: Simulations
    description: >-
      Transaction Simulations let you preview the exact outcomes of transactions
      before they are sent to the live network. Transactions are simulated on an
      exact replica of the latest state of the specific network, providing the
      most accurate simulation results. 


      The Tenderly API supports simulating single or bundled transactions
      through a single request. 


      **Common use cases for simulations**


      - [Asset and balance
      changes](https://docs.tenderly.co/simulations/asset-balance-changes): Get
      exact dollar values for all balance and asset changes that will happen.

      - [Gas estimation](https:/docs.tenderly.co//simulations/gas-estimation):
      Accurately predict the gas costs before sending the transaction.

      - [State overrides](https://docs.tenderly.co/simulations/state-overrides):
      Modify blockchain conditions like timestamps and contract data to test
      different scenarios.

      - [Preview transaction
      outcomes](https://docs.tenderly.co/simulations/transaction-preview):
      Identify and fix issues that could cause transactions to fail.

      - Access lists: Create lists of addresses and storage slots the
      transaction will access.

      - Human-readable errors: Get complex errors decoded into explanations that
      you can easily understand.


      Learn more about [Transaction
      Simulations](https://docs.tenderly.co/simulations).
  - name: Alerts
    description: >-
      Alerts listen for specific on-chain events and send real-time
      notifications to your desired destination when the event occurs. This can
      be email, your favorite messaging app, an incident monitoring system, or
      webhooks and Web3 Actions.


      Learn more about
      [Alerts](https://docs.tenderly.co/alerts/intro-to-alerts).
  - name: Delivery Channels
    description: >-
      When the desired event triggers your Alert, Tenderly will send the data
      about the event to a designated Alert Destination. The Destination
      (Delivery Channel) will use this data to send you an email notification,
      Discord, or Slack message or send it to another Tenderly system like Web3
      Actions or a Webhook.


      Learn more about [Delivery
      Channels](https://docs.tenderly.co/alerts/configuring-alert-destinations).
  - name: Web3 Actions
    description: >-
      Web3 Actions allow you to execute custom code in response to on-chain and
      off-chain events. They work as programmable hooks for smart contracts. A
      Web3 Action is a regular JS/TS function that is executed on our
      infrastructure. 


      Learn more about [Web3
      Actions](https://docs.tenderly.co/web3-actions/intro-to-web3-actions).
  - name: Virtual Environments
    description: >-
      Virtual Environments are simulated blockchain networks, designed to
      replicate real networks for various stages of dapp development. Use them
      as risk-free development and staging infrastructure that fully tracks real
      network state without the need to use real cryptocurrency or assets.


      Learn more about [Virtual
      Environments](https://docs.tenderly.co/virtual-testnets).
  - name: Environments
    description: >-
      Environments are multi-chain groupings of Virtual Environments, providing
      a coordinated set of simulated networks for end-to-end cross-chain
      testing. Each environment contains a Virtual Environment per configured
      network, and an active instance manages the current state across all
      chains.


      Environments support cross-chain bridge simulation, allowing you to test
      bridging and messaging protocols across networks in a fully isolated and
      reproducible setup.
  - name: Other
    description: >-
      This section contains miscellaneous endpoints that do not fit into other
      categories, such as checking supported networks on the Tenderly platform.
paths:
  /v1/account/{accountSlug}/project/{projectSlug}/alert:
    post:
      tags:
        - Alerts
      summary: Create Alert
      description: >-
        Create an Alert in a Tenderly project. 


        Learn more about the different [types of Alert
        triggers](https://docs.tenderly.co/alerts/alert-types-targets-and-parameters).
      operationId: createAlert
      parameters:
        - name: accountSlug
          in: path
          schema:
            type: string
          required: true
          description: Account slug of the user
          example: me
        - name: projectSlug
          in: path
          schema:
            type: string
          required: true
          description: Project slug of the account
          example: project
      requestBody:
        required: true
        description: Create alert payload
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-alert-payload'
            examples:
              successful_transaction:
                $ref: >-
                  #/components/examples/successful_transaction_create_alert_post_request
              failed_transaction:
                $ref: >-
                  #/components/examples/failed_transaction_create_alert_post_request
              function_called:
                $ref: >-
                  #/components/examples/function_called_create_alert_post_request
              log_emitted:
                $ref: '#/components/examples/log_emitted_create_alert_post_request'
              emitted_log_parameter:
                $ref: >-
                  #/components/examples/emitted_log_parameter_create_alert_post_request
              erc20_transfer_log_emitted:
                $ref: >-
                  #/components/examples/erc20_transfer_log_emitted_create_alert_post_request
              allowlisted_callers:
                $ref: >-
                  #/components/examples/allowlisted_callers_create_alert_post_request
              blocklisted_callers:
                $ref: >-
                  #/components/examples/blocklisted_callers_create_alert_post_request
              eth_balance:
                $ref: '#/components/examples/eth_balance_create_alert_post_request'
              tx_value:
                $ref: '#/components/examples/tx_value_create_alert_post_request'
              state_change:
                $ref: '#/components/examples/state_change_create_alert_post_request'
              view_function:
                $ref: '#/components/examples/view_function_create_alert_post_request'
              highValueTransferWithWhitelist:
                $ref: >-
                  #/components/examples/highValueTransferWithWhitelist_create_alert_post_request
              contractStateAndEvent:
                $ref: >-
                  #/components/examples/contractStateAndEvent_create_alert_post_request
              methodCallWithError:
                $ref: >-
                  #/components/examples/methodCallWithError_create_alert_post_request
              complexDeFiMonitor:
                $ref: >-
                  #/components/examples/complexDeFiMonitor_create_alert_post_request
      responses:
        '200':
          $ref: '#/components/responses/create_alert_post'
        '400':
          $ref: '#/components/responses/bad_request'
        '401':
          $ref: '#/components/responses/unauthorized'
        '403':
          $ref: '#/components/responses/forbidden'
        '404':
          $ref: '#/components/responses/not_found'
        '500':
          $ref: '#/components/responses/server_error'
components:
  schemas:
    create-alert-payload:
      type: object
      properties:
        name:
          title: name
          description: A name of the alert.
          type: string
          example: Failed transaction in Contract XYZ
        description:
          title: description
          description: Alert description.
          type: string
          example: This alert tracks failed transactions on Mainnet
        color:
          title: color
          description: >-
            Hex color indicating the severity of the alert. It can be one of the
            following severity types:


            - Default: #eeeeee

            - Info: #34ace0

            - Warning: #ffda79

            - Danger: #ff5252

            - Success: #33d9b2
          type: string
          enum:
            - '#eeeeee'
            - '#34ace0'
            - '#ffda79'
            - '#ff5252'
            - '#33d9b2'
          example: '#eeeeee'
        simple_type:
          title: simple_type
          description: Alert type.
          type: string
          enum:
            - successful_tx
            - failed_tx
            - allowlisted_callers
            - blocklisted_callers
            - log_emitted
            - erc20_transfer_log_emitted
            - emitted_log_parameter
            - function_called
            - called_function_parameter
            - state_change
            - eth_balance
            - tx_value
            - view_function
          example: failed_tx
        enabled:
          title: enabled
          description: Whether the alert is currently active and monitoring
          type: boolean
          example: true
        expressions:
          title: expressions
          description: List of conditions that trigger the alert when met
          type: array
          items:
            $ref: '#/components/schemas/AlertExpression'
          example:
            - type: contract_address
              expression:
                address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
            - type: network
              expression:
                network_id: '1'
            - type: tx_status
              expression:
                transaction_success: false
        delivery_channels:
          title: delivery_channels
          description: List of notification channels where alerts will be sent
          type: array
          items:
            type: object
            properties:
              enabled:
                title: enabled
                description: Set delivery channel to be enabled or disabled for the alert.
                type: boolean
                example: true
              id:
                title: id
                description: The delivery channel unique identifier.
                type: string
                example: b16b4b75-e034-44c9-a053-f10d769a1d64
          example:
            - enabled: true
              id: b16b4b75-e034-44c9-a053-f10d769a1d64
            - enabled: true
              id: f48f1f9f-1f74-4849-81cf-fce8bd3746b7
      required:
        - name
        - simple_type
        - expressions
        - delivery_channels
    AlertExpression:
      type: object
      description: Defines a specific condition to monitor on the blockchain
      required:
        - type
        - expression
      properties:
        type:
          type: string
          description: |
            Type of blockchain event or condition to monitor.
            Different types require different expression structures.
          enum:
            - method_call
            - whitelisted_caller_addresses
            - blacklisted_caller_addresses
            - contract_address
            - network
            - tag
            - tx_status
            - function_params
            - tx_value
            - emitted_log
            - state_change
            - view_function
            - eth_balance
            - erc20_transfer_matcher
            - tx_error
            - tx_internal_error
            - no_action
            - sandwich_transaction
        expression:
          oneOf:
            - $ref: '#/components/schemas/MethodCallExpression'
            - $ref: '#/components/schemas/WhitelistedCallerExpression'
            - $ref: '#/components/schemas/BlacklistedCallerExpression'
            - $ref: '#/components/schemas/ContractAddressExpression'
            - $ref: '#/components/schemas/NetworkExpression'
            - $ref: '#/components/schemas/TagExpression'
            - $ref: '#/components/schemas/TxStatusExpression'
            - $ref: '#/components/schemas/FunctionParamsExpression'
            - $ref: '#/components/schemas/TxValueExpression'
            - $ref: '#/components/schemas/EmittedLogExpression'
            - $ref: '#/components/schemas/StateChangeExpression'
            - $ref: '#/components/schemas/ViewFunctionExpression'
            - $ref: '#/components/schemas/EthBalanceExpression'
            - $ref: '#/components/schemas/ERC20TransferMatcherExpression'
            - $ref: '#/components/schemas/TxErrorExpression'
            - $ref: '#/components/schemas/TxInternalErrorExpression'
            - $ref: '#/components/schemas/NoActionExpression'
            - $ref: '#/components/schemas/SandwichTransactionExpression'
      discriminator:
        propertyName: type
        mapping:
          method_call:
            $ref: '#/components/schemas/MethodCallExpression'
          whitelisted_caller_addresses:
            $ref: '#/components/schemas/WhitelistedCallerExpression'
          blacklisted_caller_addresses:
            $ref: '#/components/schemas/BlacklistedCallerExpression'
    create-alert-response:
      description: Extended alert information returned by the API
      type: object
      properties:
        alert:
          title: alert
          description: Alert object containing all details of the created alert
          type: object
          properties:
            id:
              title: id
              description: Unique identifier of the alert
              type: string
              format: uuid
              example: d5d5c416-99df-4655-b45c-1e8652f619fa
            project_id:
              title: project_id
              description: ID of the project the alert belongs to
              type: string
              format: uuid
              example: dfdc391a-a15d-4590-9aef-8691259c7df4
            name:
              title: name
              description: Human-readable name of the alert
              type: string
              example: Successful transaction in My new contract name
            description:
              title: description
              description: Optional description of the alert
              type: string
              example: This alert tracks successful transactions on Mainnet
            enabled:
              title: enabled
              description: Whether the alert is currently active
              type: boolean
              example: true
            color:
              title: color
              description: >-
                Hex color indicating the severity of the alert. It can be one of
                the following severity types:


                - Default: #eeeeee

                - Info: #34ace0

                - Warning: #ffda79

                - Danger: #ff5252

                - Success: #33d9b2
              type: string
              enum:
                - '#eeeeee'
                - '#34ace0'
                - '#ffda79'
                - '#ff5252'
                - '#33d9b2'
              example: '#eeeeee'
            severity:
              title: severity
              description: Severity level of the alert
              type: string
              enum:
                - default
                - info
                - warning
                - danger
                - success
              example: default
            created_at:
              title: created_at
              description: Timestamp when the alert was created
              type: string
              format: date-time
              example: '2023-12-13T00:42:34.259670388Z'
            updated_at:
              title: updated_at
              description: Timestamp when the alert was last updated
              type: string
              format: date-time
              example: '2023-12-13T00:42:34.259670468Z'
            is_editable:
              title: is_editable
              description: Whether the alert can be modified
              type: boolean
              example: true
            delivery_channels:
              title: delivery_channels
              description: List of delivery channels that receive this alert
              type: array
              items:
                type: object
                properties:
                  delivery_channel_id:
                    title: delivery_channel_id
                    description: ID of the delivery channel
                    type: string
                    format: uuid
                    example: b16b4b75-e034-44c9-a053-f10d769a1d64
                  enabled:
                    title: enabled
                    description: Whether this channel is enabled for the alert
                    type: boolean
                    example: true
                  created_at:
                    title: created_at
                    description: When this channel was added to the alert
                    type: string
                    format: date-time
                    example: '2023-12-13T00:42:34.324117958Z'
            expressions:
              title: expressions
              description: Conditions that trigger the alert when met
              type: array
              items:
                $ref: '#/components/schemas/AlertExpression'
          required:
            - id
            - project_id
            - name
            - enabled
            - color
            - severity
            - created_at
            - updated_at
            - is_editable
            - expressions
      required:
        - alert
    error:
      type: object
      properties:
        error:
          type: object
          properties:
            id:
              description: >-
                Endpoints include an error ID that should be  provided when
                reporting bugs or opening support tickets to help  identify the
                issue.
              type: string
              example: 4d9d8375-3c56-4925-a3e7-eb137fed17e9
            slug:
              description: >-
                A short identifier corresponding to the HTTP status code
                returned. For  example, the ID for a response returning a 404
                status code would be "not_found."
              type: string
              example: not_found
            message:
              description: >-
                A message providing additional information about the error,
                including  details to help resolve it when possible.
              type: string
              example: The resource you were accessing could not be found.
            data:
              description: Additional context about the error.
              type: object
              properties:
                rid:
                  description: >-
                    Resource identifier indicating which resource type caused
                    the error.
                  type: string
                  enum:
                    - rid:account
                    - rid:project
                    - rid:alert
                    - rid:contract
                    - rid:delivery_channel
                    - rid:network
                    - rid:simulation
                    - rid:vnet
                    - rid:wallet
                    - rid:action
                    - rid:action_call
                  example: rid:project
              additionalProperties: true
          required:
            - id
            - slug
            - message
      required:
        - error
    MethodCallExpression:
      type: object
      description: Monitors specific function calls in smart contracts
      required:
        - line_number
        - call_position
      properties:
        line_number:
          type: integer
          description: >-
            Line number in the source code where the monitored function is
            defined
          example: 123
        call_position:
          type: string
          description: |
            Position of the method call in the transaction execution:
            * first - Must be the first call in the transaction
            * last - Must be the last call in the transaction
            * any - Can occur anywhere in the transaction
          enum:
            - first
            - last
            - any
    WhitelistedCallerExpression:
      type: object
      description: Monitors transactions from specific allowed addresses
      required:
        - addresses
      properties:
        addresses:
          type: array
          description: List of Ethereum addresses that are allowed to trigger the alert
          items:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
          example:
            - '0x6b9ef02657339310e28a7a9d4b5f25f7c1f68d61'
    BlacklistedCallerExpression:
      type: object
      description: Monitors transactions from specific blocked addresses
      required:
        - addresses
      properties:
        addresses:
          type: array
          description: >-
            List of Ethereum addresses that will trigger the alert when they
            interact
          items:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
          example:
            - '0x6b9ef02657339310e28a7a9d4b5f25f7c1f68d61'
    ContractAddressExpression:
      type: object
      description: Monitors interactions with specific contract addresses
      required:
        - address
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Ethereum address of the contract to monitor
        transaction_type:
          type: string
          enum:
            - direct
            - source
            - internal
          description: |
            Type of transaction interaction to monitor:
            * direct - Direct calls to the contract
            * source - Transactions originating from the contract
            * internal - Internal transactions involving the contract
    NetworkExpression:
      type: object
      description: Monitors events on specific blockchain networks
      required:
        - network_id
      properties:
        network_id:
          type: string
          description: Chain ID of the network to monitor
          example: '1'
    TagExpression:
      type: object
      description: Monitors contracts or transactions with specific tags
      required:
        - tag
      properties:
        tag:
          type: string
          description: Tag identifier to monitor
        transaction_type:
          type: string
          enum:
            - direct
            - source
            - internal
          description: |
            Type of transaction to monitor:
            * direct - Direct interactions
            * source - Source transactions
            * internal - Internal transactions
    TxStatusExpression:
      type: object
      description: Monitors transaction status (success/failure)
      properties:
        transaction_success:
          type: boolean
          description: >-
            When true, monitors successful transactions; when false, monitors
            failed transactions
    FunctionParamsExpression:
      type: object
      description: Monitors specific parameters of function calls
      required:
        - address
        - function_line_number
        - parameter_conditions
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Contract address containing the function
        function_line_number:
          type: integer
          description: Line number where the function is defined in the source code
        parameter_conditions:
          type: array
          description: List of conditions to monitor on function parameters
          items:
            $ref: '#/components/schemas/ParameterCondition'
    TxValueExpression:
      type: object
      description: Monitors transaction value amounts
      required:
        - transaction_value
        - operator
      properties:
        transaction_value:
          type: string
          description: Amount of native currency (in wei) to compare against
        operator:
          type: string
          enum:
            - '>'
            - '>='
            - <
            - <=
            - '=='
            - '!='
          description: Comparison operator for the transaction value
    EmittedLogExpression:
      type: object
      description: Monitors event logs emitted by contracts
      required:
        - address
        - event_name
        - event_id
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Contract address emitting the event
        event_name:
          type: string
          description: Name of the event to monitor
        event_id:
          type: string
          description: Keccak-256 hash of the event signature
        match_any:
          type: boolean
          description: If true, matches events from any contract in the project
        decode_events:
          type: boolean
          description: If true, decodes bytes fields as UTF-8 strings
        match_non_project_contracts:
          type: boolean
          description: If true, matches events from contracts outside the project
        parameter_conditions:
          type: array
          description: Conditions to check on event parameters
          items:
            $ref: '#/components/schemas/ParameterCondition'
    StateChangeExpression:
      type: object
      description: Monitors changes in contract state variables
      required:
        - address
        - parameter_conditions
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Contract address to monitor for state changes
        parameter_conditions:
          type: array
          description: List of conditions to monitor on state variables
          items:
            type: object
            required:
              - parameter_name
              - parameter_type
            properties:
              parameter_name:
                type: string
                description: Name of the state variable to monitor
              parameter_type:
                type: string
                description: Solidity type of the state variable
              compare_change:
                type: boolean
                description: If true, alerts when the value changes
              compare_threshold:
                type: boolean
                description: If true, compares value against a threshold
              compare_percentage:
                type: boolean
                description: If true, monitors percentage changes in value
              comparison_value:
                type: string
                description: >-
                  Value to compare against (required for threshold and
                  percentage comparisons)
              operator:
                type: string
                enum:
                  - '>'
                  - <
                  - '=='
                  - '>='
                  - <=
                description: |
                  Comparison operator:
                  * > - Alerts when value goes over threshold
                  * < - Alerts when value goes under threshold
                  * == - Alerts when value equals threshold
                  * >= - Alerts when value increases by percentage
                  * <= - Alerts when value decreases by percentage
    ViewFunctionExpression:
      type: object
      description: Monitors return values of view functions
      required:
        - address
        - input
        - network_id
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Contract address containing the view function
        input:
          type: string
          description: ABI-encoded function call data
        network_id:
          type: string
          description: Chain ID where the contract is deployed
        parameter_condition:
          type: object
          description: Condition to check on the function return value
          properties:
            compare_threshold:
              type: boolean
              description: If true, compares return value against a threshold
            comparison_value:
              type: string
              description: Value to compare against
            operator:
              type: string
              enum:
                - '>'
                - <
                - '=='
                - '>='
                - <=
              description: Comparison operator for the return value
            parameter_type:
              type: string
              description: Solidity type of the return value
    EthBalanceExpression:
      type: object
      description: Monitors ETH balance of addresses
      required:
        - address
        - threshold
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Address to monitor balance for
        threshold:
          type: string
          description: Balance threshold in wei below which to trigger alert
    ERC20TransferMatcherExpression:
      type: object
      description: Monitors ERC20 token transfer consistency
      required:
        - address
        - log_name
        - balances
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Token contract address
        log_name:
          type: string
          description: Name of the transfer event (usually "Transfer")
        balances:
          type: string
          description: Name of the balances mapping in the contract
    TxErrorExpression:
      type: object
      description: Monitors transaction failures (excluding require/assert failures)
      properties:
        addresses_to_ignore:
          type: array
          description: List of contract addresses to ignore errors from
          items:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
    TxInternalErrorExpression:
      type: object
      description: Monitors internal transaction failures in successful transactions
      properties:
        addresses_to_match:
          type: array
          description: List of contract addresses to monitor for internal failures
          items:
            type: string
            pattern: ^0x[a-fA-F0-9]{40}$
    NoActionExpression:
      type: object
      description: Monitors for absence of specific blockchain activities
      required:
        - check_after_seconds
      properties:
        no_log:
          type: object
          description: Configuration for monitoring missing logs
          properties:
            address:
              type: string
              pattern: ^0x[a-fA-F0-9]{40}$
              description: Contract address to monitor
            network_id:
              type: string
              description: Chain ID to monitor
            event_id:
              type: string
              description: Event signature hash
            event_name:
              type: string
              description: Name of the event for display purposes
        no_transaction:
          type: object
          description: Configuration for monitoring missing transactions
          properties:
            address:
              type: string
              pattern: ^0x[a-fA-F0-9]{40}$
              description: Address to monitor
            is_from_address:
              type: boolean
              description: >-
                If true, monitors outgoing transactions; if false, monitors
                incoming
            network_id:
              type: string
              description: Chain ID to monitor
            transaction_success:
              type: boolean
              description: If set, only monitors successful/failed transactions
        check_after_seconds:
          type: integer
          description: >-
            Number of seconds after which to trigger alert if no activity is
            detected
    SandwichTransactionExpression:
      type: object
      description: Monitors for sandwich attack patterns
      required:
        - address
      properties:
        address:
          type: string
          pattern: ^0x[a-fA-F0-9]{40}$
          description: Contract address to monitor
        transaction_type:
          type: string
          enum:
            - direct
            - source
            - internal
          description: |
            Type of transaction to monitor:
            * direct - Direct interactions with contract
            * source - Transactions from contract
            * internal - Internal transactions
    ParameterCondition:
      type: object
      description: Defines conditions for monitoring function parameters or event values
      required:
        - parameter_name
        - operator
        - parameter_type
        - comparison_value
      properties:
        parameter_name:
          type: string
          description: Name of the parameter to monitor
        operator:
          type: string
          enum:
            - '>'
            - '>='
            - <
            - <=
            - '=='
            - '!='
            - contains
            - notContains
          description: |
            Comparison operator:
            * `>` - Greater than
            * `>=` - Greater than or equal
            * `<` - Less than
            * `<=` - Less than or equal
            * `==` - Equal to
            * `!=` - Not equal to
            * `contains` - Array contains value
            * `notContains` - Array does not contain value
        parameter_type:
          type: string
          enum:
            - uint
            - int
            - bool
            - address
            - string
            - byte
          description: Solidity type of the parameter
        nested_parameter_type:
          type: string
          description: For array types, the type of elements in the array
        comparison_value:
          type: string
          description: |
            Value to compare against. Format depends on parameter_type:
            * uint/int - String representation of number
            * bool - "true" or "false"
            * address - Ethereum address
            * string/byte - String value
  examples:
    successful_transaction_create_alert_post_request:
      summary: Successful Transaction Alert
      description: >-
        An example payload object with details about alert of Successful
        Transaction type.
      value:
        name: Successful transaction in My new contract name
        color: '#33d9b2'
        description: ''
        simple_type: successful_tx
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
          - type: network
            expression:
              network_id: '1'
          - type: tx_status
            expression:
              transaction_success: true
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
          - enabled: true
            id: f48f1f9f-1f74-4849-81cf-fce8bd3746b7
    failed_transaction_create_alert_post_request:
      summary: Failed Transaction Alert
      description: >-
        An example payload object with details about alert of Failed Transaction
        type.
      value:
        name: Failed transaction in My new contract name
        color: '#ff5252'
        description: ''
        simple_type: failed_tx
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
          - type: network
            expression:
              network_id: '1'
          - type: tx_status
            expression:
              transaction_success: false
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
          - enabled: true
            id: f48f1f9f-1f74-4849-81cf-fce8bd3746b7
    function_called_create_alert_post_request:
      summary: Function Call Alert
      description: >-
        An example payload object with details about alert of Function Call
        type.
      value:
        name: Function approve called in My new contract name
        color: '#34ace0'
        description: ''
        simple_type: function_called
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
          - type: network
            expression:
              network_id: '1'
          - type: method_call
            expression:
              address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
              line_number: 3775
              function_name: approve
              call_position: any
              signature:
                function_name: approve
                input_types:
                  - address
                  - uint256
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    log_emitted_create_alert_post_request:
      summary: Event Emitted Alert
      description: >-
        An example payload object with details about alert of Event Emitted
        type.
      value:
        name: Event MetadropTaxBasisPointsChanged emitted in My new contract name
        color: '#34ace0'
        description: ''
        simple_type: log_emitted
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
          - type: network
            expression:
              network_id: '1'
          - type: emitted_log
            expression:
              address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
              event_name: MetadropTaxBasisPointsChanged
              event_id: >-
                0xc62aec06e6c0bd9801f57464e310b42dd2d884cbfaf006c84a761b622aea4f08
              match_any: false
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    emitted_log_parameter_create_alert_post_request:
      summary: Event Parameter Alert
      description: >-
        An example payload object with details about alert of Event Parameter
        type.
      value:
        name: Event argument in LiquidityBurned matched in My new contract name
        color: '#34ace0'
        description: ''
        simple_type: emitted_log_parameter
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
          - type: network
            expression:
              network_id: '1'
          - type: emitted_log
            expression:
              address: '0x94c87a7b26980ae7aaa361c5c7e03e632ab36e6c'
              event_name: LiquidityBurned
              event_id: >-
                0x781a9d251db551fc7922f7facbbe49bc3fd61d3e236a8dafa34afd0539ebfa72
              match_any: false
              parameter_conditions:
                - parameter_name: lpTokens
                  parameter_type: uint
                  operator: '>='
                  comparison_value: '100'
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    erc20_transfer_log_emitted_create_alert_post_request:
      summary: ERC20 Token Transfer Alert
      description: >-
        An example payload object with details about alert of ERC20 Token
        Transfer type.
      value:
        name: ERC20 Token Transfer in TetherToken
        color: '#34ace0'
        description: ''
        simple_type: erc20_transfer_log_emitted
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
          - type: network
            expression:
              network_id: '1'
          - type: emitted_log
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
              event_name: ERC20 Transfer
              event_id: >-
                0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
              match_any: false
              parameter_conditions:
                - parameter_name: dst
                  parameter_index: 1
                  parameter_type: address
                  operator: '=='
                  comparison_value: '0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326'
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    allowlisted_callers_create_alert_post_request:
      summary: Allowlisted Callers Alert
      description: >-
        An example payload object with details about alert of Allowlisted
        Callers type.
      value:
        name: Transaction from non-allowlisted address in TetherToken
        color: '#ffda79'
        description: ''
        simple_type: allowlisted_callers
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
          - type: network
            expression:
              network_id: '1'
          - type: whitelisted_caller_addresses
            expression:
              addresses:
                - '0x1f9090aae28b8a3dceadf281b0f12828e676c326'
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    blocklisted_callers_create_alert_post_request:
      summary: Blocklisted Callers Alert
      description: >-
        An example payload object with details about alert of Blocklisted
        Callers type.
      value:
        name: Transaction from blocklisted address in TetherToken
        color: '#ff5252'
        description: ''
        simple_type: blocklisted_callers
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
          - type: network
            expression:
              network_id: '1'
          - type: blacklisted_caller_addresses
            expression:
              addresses:
                - '0x1f9090aae28b8a3dceadf281b0f12828e676c326'
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    eth_balance_create_alert_post_request:
      summary: Balance Change Alert
      description: >-
        An example payload object with details about alert of Balance Change
        type.
      value:
        name: Balance value condition matched in TetherToken
        color: '#eeeeee'
        description: ''
        simple_type: eth_balance
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
          - type: network
            expression:
              network_id: '1'
          - type: eth_balance
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
              threshold: '1500000000000000000'
              operator: <=
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    tx_value_create_alert_post_request:
      summary: Transaction Value Alert
      description: >-
        An example payload object with details about alert of Transaction Value
        type.
      value:
        name: Transaction value condition matched in TetherToken
        color: '#eeeeee'
        description: ''
        simple_type: tx_value
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
          - type: network
            expression:
              network_id: '1'
          - type: tx_value
            expression:
              operator: '!='
              transaction_value: '1345000000000000000'
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    state_change_create_alert_post_request:
      summary: State Change Alert
      description: An example payload object with details about alert of State Change type.
      value:
        name: State variable transactionCount matched in TetherToken
        color: '#eeeeee'
        description: ''
        simple_type: state_change
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
          - type: network
            expression:
              network_id: '1'
          - type: state_change
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
              match_any: false
              parameter_conditions:
                - parameter_name: transactionCount
                  parameter_type: uint
                  compare_threshold: true
                  comparison_value: '25000'
                  operator: '>'
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    view_function_create_alert_post_request:
      summary: View Function Alert
      description: >-
        An example payload object with details about alert of View Function
        type.
      value:
        name: Return value of confirmations matched in TetherToken
        color: '#eeeeee'
        description: ''
        simple_type: view_function
        enabled: true
        expressions:
          - type: contract_address
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
          - type: network
            expression:
              network_id: '1'
          - type: view_function
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
              input: >-
                0x3411c81c00000000000000000000000000000000000000000000000000000000000000050000000000000000000000001f9090aae28b8a3dceadf281b0f12828e676c326
              network_id: '1'
              match_any: false
              parameter_condition:
                parameter_name: confirmations
                parameter_type: bool
                comparison_value: true
                operator: '=='
        delivery_channels:
          - enabled: true
            id: b16b4b75-e034-44c9-a053-f10d769a1d64
    highValueTransferWithWhitelist_create_alert_post_request:
      summary: High Value Transfer from Whitelisted Addresses
      description: Monitors large transfers (>1000 ETH) but only from trusted addresses
      value:
        name: High Value Whitelisted Transfer Monitor
        description: Monitors large transfers (>1000 ETH) but only from trusted addresses
        simple_type: allowlisted_callers
        enabled: true
        expressions:
          - type: tx_value
            expression:
              transaction_value: '1000000000000000000000'
              operator: '>'
          - type: whitelisted_caller_addresses
            expression:
              addresses:
                - '0x6b9ef02657339310e28a7a9d4b5f25f7c1f68d61'
                - '0x904ef6ff8e82478c5604d99884eb9bcd7f73cc36'
        delivery_channels:
          - id: 10159dbf-278e-4f4a-954d-d299c3ddc220
            enabled: true
    contractStateAndEvent_create_alert_post_request:
      summary: Contract State Change with Event Verification
      description: Monitors state changes and verifies corresponding events
      value:
        name: Treasury Balance Change Monitor
        description: >-
          Alerts on significant treasury balance changes with Transfer event
          verification
        enabled: true
        simple_type: emitted_log_parameter
        expressions:
          - type: state_change
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
              parameter_conditions:
                - parameter_name: treasuryBalance
                  parameter_type: uint
                  compare_percentage: true
                  comparison_value: '5'
                  operator: '>='
          - type: emitted_log
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
              event_name: Transfer
              event_id: >-
                0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
              parameter_conditions:
                - parameter_name: value
                  parameter_type: uint
                  operator: '>'
                  comparison_value: '1000000000000'
        delivery_channels:
          - id: 4d09b816-e817-4b14-aa00-2aa8022ef5a8
            enabled: true
    methodCallWithError_create_alert_post_request:
      summary: Critical Method Call with Error Monitoring
      description: Monitors specific method calls and any transaction errors
      value:
        name: Critical Operation Monitor
        description: Monitors critical function calls and alerts on any transaction errors
        enabled: true
        simple_type: function_called
        expressions:
          - type: method_call
            expression:
              line_number: 222
              call_position: any
          - type: tx_error
            expression:
              addresses_to_ignore:
                - '0xdac17f958d2ee523a2206206994597c13d831ec7'
          - type: network
            expression:
              network_id: '1'
        delivery_channels:
          - id: 10159dbf-278e-4f4a-954d-d299c3ddc220
            enabled: true
          - id: 4d09b816-e817-4b14-aa00-2aa8022ef5a8
            enabled: true
    complexDeFiMonitor_create_alert_post_request:
      summary: Complex DeFi Transaction Monitor
      description: Comprehensive monitoring of DeFi operations with multiple conditions
      value:
        name: DeFi Safety Monitor
        description: Monitors large swaps, flash loans, and potential sandwich attacks
        enabled: true
        simple_type: blocklisted_callers
        expressions:
          - type: function_params
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
              function_line_number: 118
              parameter_conditions:
                - parameter_name: amount
                  operator: '>'
                  parameter_type: uint
                  comparison_value: '1000000000000000000000'
          - type: sandwich_transaction
            expression:
              address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
              transaction_type: direct
          - type: no_action
            expression:
              no_log:
                address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
                network_id: '1'
                event_name: FlashLoan
                event_id: >-
                  0x631a333434ae2abd5590106b02c84c22d0899eef53070f2dc5a6a512f2b622b8
              check_after_seconds: 3600
          - type: blacklisted_caller_addresses
            expression:
              addresses:
                - '0x6b9ef02657339310e28a7a9d4b5f25f7c1f68d61'
        delivery_channels:
          - id: 10159dbf-278e-4f4a-954d-d299c3ddc220
            enabled: true
  responses:
    create_alert_post:
      description: A successful response.
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/create-alert-response'
            oneOf:
              - $ref: >-
                  #/components/schemas/successful_transaction_create_alert_post_response
              - $ref: >-
                  #/components/schemas/failed_transaction_create_alert_post_response
              - $ref: >-
                  #/components/schemas/function_called_create_alert_post_response
              - $ref: '#/components/schemas/log_emitted_create_alert_post_response'
              - $ref: >-
                  #/components/schemas/emitted_log_parameter_create_alert_post_response
              - $ref: >-
                  #/components/schemas/erc20_transfer_log_emitted_create_alert_post_response
              - $ref: >-
                  #/components/schemas/allowlisted_callers_create_alert_post_response
              - $ref: >-
                  #/components/schemas/blocklisted_callers_create_alert_post_response
              - $ref: '#/components/schemas/eth_balance_create_alert_post_response'
              - $ref: '#/components/schemas/tx_value_create_alert_post_response'
              - $ref: '#/components/schemas/state_change_create_alert_post_response'
              - $ref: '#/components/schemas/view_function_create_alert_post_response'
    bad_request:
      description: Bad Request
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: bad_request
              message: Bad request input parameters
    unauthorized:
      description: Unauthorized
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: unauthorized
              message: Unauthorized
    forbidden:
      description: Forbidden
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: insufficient_permissions
              message: Insufficient permissions
    not_found:
      description: The resource was not found.
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: resource_not_found
              message: The resource you requested could not be found.
    server_error:
      description: Server error.
      headers:
        X-Tdly-Limit:
          $ref: '#/components/headers/ratelimit-limit'
        X-Tdly-Remaining:
          $ref: '#/components/headers/ratelimit-remaining'
        X-Tdly-Reset-Timestamp:
          $ref: '#/components/headers/ratelimit-reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error:
              id: 596b1dc7-af60-477b-aab3-6c93eb92ddfa
              slug: internal_server_error
              message: Internal server error
  headers:
    ratelimit-limit:
      schema:
        type: integer
      example: 100
      description: >-
        The default limit on number of requests that can be made per minute.
        Current rate limits are:

        * **Non-authenticated users:** 100 requests per minute

        * **Authenticated users:** 400 requests per minute
    ratelimit-remaining:
      schema:
        type: integer
      example: 16
      description: >-
        The number of requests in your quota that remain before you hit your
        request limit.
    ratelimit-reset:
      schema:
        type: integer
      example: 1444931833
      description: >-
        The time when the oldest request will expire. The value is given in Unix
        epoch time.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: X-Access-Key
      in: header
      description: >-
        An API key is a token that a client provides when making API calls. Send
        it as the `X-Access-Key` request header on any endpoint:


        ```bash

        curl '<API_ENDPOINT>' \
          -H 'X-Access-Key: ${TENDERLY_ACCESS_KEY}' \
          ...
        ```


        Learn how to generate API access tokens at [Tenderly
        Docs](https://docs.tenderly.co/account/projects/how-to-generate-api-access-token).
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication (also called token authentication) is an HTTP
        authentication scheme that involves security tokens called bearer
        tokens.

        The bearer token is a cryptic string, usually generated by the server in
        response to a login request. The client must send this token in

        the Authorization header when making requests to protected resources:


        ```bash

        curl '<API_ENDPOINT>' \
          -H 'Authorization: Bearer <TENDERLY_TOKEN>' \
          ...
        ```


        **Note**: Bearer tokens cannot be revoked and expire after 30 days.

````