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

> Updates the name or provider order of an enrichment waterfall.

# Update Enrichment Waterfall

<Warning>
  This endpoint only accepts `name` and `providers`. Sending `conditions` is rejected with a `400`.
</Warning>

When `providers` is sent it replaces the whole order; providers you leave out are appended, disabled. On a default waterfall this takes over from the lemlist order: `editor` becomes your user id and the list is followed as is. Use [Reset Enrichment Waterfall](/api-reference/endpoints/enrichment-waterfalls/reset-enrichment-waterfall) to hand it back to lemlist.

## Error codes

| Code                                          | Cause                                                                                                                                                                |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ENRICHMENT_WATERFALL_INVALID_NAME`           | `name` is empty or longer than 100 characters.                                                                                                                       |
| `ENRICHMENT_WATERFALL_UNKNOWN_PROVIDER`       | A `providers[].id` is not listed by [List Enrichment Providers](/api-reference/endpoints/enrichment-providers/list-enrichment-providers) for this `type`.            |
| `ENRICHMENT_WATERFALL_DUPLICATE_PROVIDER`     | The same provider id appears twice.                                                                                                                                  |
| `ENRICHMENT_WATERFALL_PROVIDER_NOT_CONNECTED` | An external provider is enabled while its API key is not saved — connect it with [Connect Provider](/api-reference/endpoints/enrichment-providers/connect-provider). |
| `ENRICHMENT_WATERFALL_EMPTY_UPDATE`           | The body is empty.                                                                                                                                                   |


## OpenAPI

````yaml patch /v2/enrichments/waterfalls/{waterfallId}
openapi: 3.0.0
info:
  title: lemlist API
  version: 1.0.0
  description: >-
    Welcome to the lemlist Developer Documentation.


    lemlist is very customizable and open. You'll find on this page all the API
    and integration you can do with lemlist.


    # Rate Limit


    lemlist's API rate limits requests in order to prevent abuse and overload of
    our services.  

    Rate limits are applied on all routes and per API key performing the
    request.  

    The rate limits are **20** requests per **2** seconds.  

    The response provides any information you may need about it:


    | Header | Description |

    | --- | --- |

    | Retry-After | The number of seconds in which you can retry |

    | X-RateLimit-Limit | The maximum requests in that time |

    | X-RateLimit-Remaining | The number of remaining requests you can make |

    | X-RateLimit-Reset | The date when the rate limit will reset |


    _Example of values for the rate limit headers_


    ``` json

    {
        "Retry-After": 2,
        "X-RateLimit-Limit": 20,
        "X-RateLimit-Remaining": 7,
        "X-RateLimit-Reset" : "Tue Feb 16 2021 09:02:42 GMT+0100 (Central European Standard Time)"
    }

     ```

    # Definitions


    ## Team


    A team is the entity of lemlist that can handle users and billing.


    ## Credits


    Credits are the coins a team uses to enrich emails, LinkedIn URLs, etc. via
    the enrich route. Each enrichment feature needs a certain amount of credits
    to run.


    ## User


    You use a user account to connect to lemlist and send messages via the
    connected emails or LinkedIn account.


    ## Campaign


    A campaign is the entity to automate outreach. A campaign has multiple
    sequences composed of steps.


    ## Lead


    A lead is a person that you try to contact via a campaign.


    ## Activity


    An activity is the history of all the steps.


    ## Unsubscribe


    An unsubscribe occurs when a person decides they don't want to receive
    emails from you anymore.


    # Authentication


    All API routes use the dedicated subdomain `api.lemlist.com`.


    lemlist uses API keys to allow access to the API. You can get your lemlist
    API key at our [integration
    page](https://app.lemlist.com/settings/integrations).


    You need to add the `Authorization` header using the `Basic` authentication
    type. `login:password` **where the login is always empty and the password is
    the API key**.


    ⚠️ **Don't forget to add the semicolon (**`:`**) before your API key in curl
    command.**


    > To authorize, use this code: 
      

    ``` shell

    curl https://api.lemlist.com/api/team \
      --user ":YourApiKey"

     ```

    **Make sure to replace** **`YourApiKey`** **with your API key.**


    # Give feedback


    If you want to report a bug, ask for data, or share with us a use case,
    please fill this [form](https://lemlist.typeform.com/to/mfVlkyGf). It will
    help us centralize your needs!
servers:
  - url: https://api.lemlist.com/api
security:
  - basicAuth: []
tags:
  - name: Enrichment Providers
    description: >-
      The data providers lemlist can call to find an email or a phone.


      Internal providers are paid with lemlist credits and always available.
      External providers run on your own account: connect one by saving its API
      key, and it becomes available to your waterfalls. `GET
      /enrichments/providers` is the catalog of provider ids accepted by the
      waterfall endpoints.
  - name: Enrichment Waterfalls
    description: >-
      Control which data providers lemlist calls when enriching a contact, and
      in which order.


      A waterfall is an ordered list of providers for one enrichment `type`
      (`email` or `phone`). Providers are tried one after the other until one
      returns a result.


      Every team has exactly one default waterfall per type (`isDefault: true`).
      While its `editor` is `lemlist` it follows the lemlist behaviour:
      providers you connected with your own API key are tried first, then
      internal providers in a random order. Once a team member edits its
      provider list, `editor` becomes that user's id and the list is followed as
      is; resetting it hands it back to `lemlist`.


      Custom waterfalls (`isDefault: false`) carry `conditions` on the contact
      being enriched, keyed by contact property; every key present must match.
      When a contact is enriched, lemlist runs a single waterfall: the custom
      waterfall of the requested type whose conditions match the contact, or the
      default waterfall when none does. If several match, the one with the most
      condition keys wins, then the most recently updated. Only that waterfall
      runs; when it finds nothing, the enrichment ends without falling back to
      another one.
paths:
  /v2/enrichments/waterfalls/{waterfallId}:
    parameters:
      - name: waterfallId
        in: path
        required: true
        description: >-
          Id of the waterfall, as returned by the list endpoint: `default_email`
          or `default_phone` for a default waterfall, an `ecw_` id for a custom
          one.
        schema:
          type: string
        example: ecw_ExAmPlE1234567890a
    patch:
      tags:
        - Enrichment Waterfalls
      summary: Update Enrichment Waterfall
      description: >-
        Updates the `name` or `providers` of a waterfall. Only the fields
        present in the body change; `type` and `isDefault` cannot change, and
        `conditions` is rejected with a `400`.


        When `providers` is sent it replaces the whole order; providers you
        leave out are appended, disabled. On a default waterfall this takes over
        from the lemlist order: `editor` becomes your user id and the list is
        followed as is; use the reset endpoint to hand it back to lemlist.


        The full stored waterfall is returned.
      operationId: updateEnrichmentWaterfall
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnrichmentWaterfallUpdateRequest'
            example:
              providers:
                - id: findymail
                  enabled: true
                - id: prospeo
                  enabled: true
                - id: lusha
                  enabled: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrichmentWaterfallResponse'
              example:
                data:
                  id: ecw_ExAmPlE1234567890a
                  type: email
                  name: Europe email waterfall
                  isDefault: false
                  editor: usr_ExAmPlE1234567890a
                  conditions:
                    country:
                      in:
                        - FR
                        - DE
                        - ES
                        - IT
                        - GB
                  providers:
                    - id: findymail
                      order: 1
                      enabled: true
                    - id: prospeo
                      order: 2
                      enabled: true
                    - id: lusha
                      order: 3
                      enabled: false
                    - id: datagma
                      order: 4
                      enabled: false
                  createdAt: '2026-09-10T14:03:00.000Z'
                  updatedAt: '2026-09-11T08:20:00.000Z'
        '400':
          description: >-
            Validation error. `code` is one of
            `ENRICHMENT_WATERFALL_INVALID_NAME`,
            `ENRICHMENT_WATERFALL_UNKNOWN_PROVIDER`,
            `ENRICHMENT_WATERFALL_DUPLICATE_PROVIDER`,
            `ENRICHMENT_WATERFALL_PROVIDER_NOT_CONNECTED`,
            `ENRICHMENT_WATERFALL_EMPTY_UPDATE`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnrichmentWaterfallError'
              example:
                error: Unknown provider "hunter" for type "email"
                code: ENRICHMENT_WATERFALL_UNKNOWN_PROVIDER
        '401':
          $ref: '#/components/responses/EnrichmentWaterfallUnauthorized'
        '404':
          $ref: '#/components/responses/EnrichmentWaterfallNotFound'
        '500':
          $ref: '#/components/responses/EnrichmentWaterfallInternalError'
components:
  schemas:
    EnrichmentWaterfallUpdateRequest:
      type: object
      description: At least one property is required.
      minProperties: 1
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        providers:
          type: array
          description: >-
            Replaces the whole order, may be partial; left-out providers are
            appended, disabled.
          minItems: 1
          items:
            $ref: '#/components/schemas/EnrichmentWaterfallProvider'
    EnrichmentWaterfallResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/EnrichmentWaterfall'
    EnrichmentWaterfallError:
      type: object
      description: Error envelope returned by the enrichment waterfall endpoints.
      properties:
        error:
          type: string
          description: Human-readable explanation of the failure
        code:
          type: string
          description: Machine-readable error code, stable across releases
    EnrichmentWaterfallProvider:
      type: object
      description: >-
        One step of a waterfall. In requests, the position in the `providers`
        array is the execution order and `order` is ignored. In responses,
        `order` is always present.
      required:
        - id
        - enabled
      properties:
        order:
          type: integer
          description: >-
            Execution rank, starting at 1, matching the position in the array.
            Returned only.
          minimum: 1
        id:
          type: string
          description: Provider id, from `GET /enrichments/providers`.
          example: prospeo
        enabled:
          type: boolean
          description: >-
            Disabled providers keep their position but are skipped at enrichment
            time.
        image:
          type: string
          description: >-
            Path of the provider logo shown in the lemlist app, relative to the
            app origin. Read-only.
          example: /lemrich/prospeo.svg
        source:
          type: string
          description: >-
            `internal`: paid with lemlist credits. `external`: called with your
            own API key. Read-only.
          enum:
            - internal
            - external
        shuffled:
          type: boolean
          description: >-
            Only on a default waterfall while its `editor` is `lemlist`. `true`:
            tried in a random position among the other shuffled providers;
            `false`: always tried first, at its position (providers you
            connected with your own API key). Read-only.
        tier:
          type: integer
          description: >-
            Only on the default phone waterfall while its `editor` is `lemlist`.
            Phone providers are tried tier by tier, in a random order inside
            each tier. Read-only.
          minimum: 1
    EnrichmentWaterfall:
      type: object
      description: An ordered list of providers for one enrichment type.
      required:
        - id
        - type
        - name
        - isDefault
        - editor
        - providers
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          description: >-
            Waterfall id. Always `default_email` or `default_phone` for a
            default waterfall, even after it was edited; custom waterfalls get
            an id prefixed with `ecw_`.
          example: ecw_ExAmPlE1234567890a
        type:
          $ref: '#/components/schemas/EnrichmentWaterfallType'
        name:
          type: string
          description: Display name, 1 to 100 characters.
          example: Europe email waterfall
        isDefault:
          type: boolean
          description: >-
            `true` for the team's default waterfall of this type (one per type,
            cannot be created or deleted). `false` for a custom waterfall.
        editor:
          type: string
          description: >-
            Who defined the provider order. `lemlist` on a default waterfall
            nobody edited: connected external providers first, then internal
            providers in a random order (tier by tier for phone, see
            `providers[].tier`); `providers` then shows a reference order.
            Otherwise the id of the team member who last edited the waterfall
            (`usr_` prefix): `providers` is then followed as is. Custom
            waterfalls always have a user editor.
          example: lemlist
        conditions:
          description: >-
            Only on custom waterfalls; a default waterfall applies to every
            contact not matched by a custom one.
          allOf:
            - $ref: '#/components/schemas/EnrichmentWaterfallConditions'
        providers:
          type: array
          description: >-
            Execution order. Always contains every provider of the catalog for
            this `type` exactly once, disabled ones included. External providers
            appear only while connected; a newly connected one is appended
            disabled on custom waterfalls.
          items:
            $ref: '#/components/schemas/EnrichmentWaterfallProvider'
        createdAt:
          type: string
          format: date-time
          nullable: true
          description: '`null` on a default waterfall that was never edited.'
        updatedAt:
          type: string
          format: date-time
          nullable: true
          description: '`null` on a default waterfall that was never edited.'
    EnrichmentWaterfallType:
      type: string
      description: Kind of data the waterfall looks for.
      enum:
        - email
        - phone
    EnrichmentWaterfallConditions:
      type: object
      description: >-
        Conditions on the contact being enriched, keyed by contact property.
        Every key present must match for the waterfall to run. New keys will be
        added over time; unknown keys are rejected.
      additionalProperties: false
      properties:
        country:
          type: object
          description: >-
            The contact's resolved country (from its `location`, `country` or
            company data), as ISO 3166-1 alpha-2 codes.
          properties:
            in:
              type: array
              description: Countries that match. Unique.
              items:
                type: string
                pattern: ^[A-Z]{2}$
              example:
                - FR
                - DE
            out:
              type: array
              description: >-
                Countries that exclude the contact. Unique, disjoint from `in`.
                At least one of `in` or `out` must be non-empty.
              items:
                type: string
                pattern: ^[A-Z]{2}$
  responses:
    EnrichmentWaterfallUnauthorized:
      description: Unauthorized - invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnrichmentWaterfallError'
          example:
            error: Route unauthorized
            code: ROUTE_UNAUTHORIZED
    EnrichmentWaterfallNotFound:
      description: No waterfall with this id in your team
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnrichmentWaterfallError'
          example:
            error: Waterfall not found
            code: ENRICHMENT_WATERFALL_NOT_FOUND
    EnrichmentWaterfallInternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/EnrichmentWaterfallError'
          example:
            error: Internal error
            code: INTERNAL_ERROR
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````