> ## 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.

# Update a Call

> Completes a call logged through the API with its status, note, duration, recording or transcript.

Reach the call by the `_id` the log answered, or by the `externalId` you sent. Only calls logged through [`POST /calls`](https://developer.lemlist.com/api-reference/endpoints/calls/log-call) can be updated here: the status, the note and the media of a call made with the lemlist dialer, Aircall or Ringover are lemlist's own, and such a call answers `404 CALLS_API_CALL_NOT_UPDATABLE` even though [`GET /calls/{id}`](https://developer.lemlist.com/api-reference/endpoints/calls/get-call) reads it.

The status, the note and the duration reach the CRM call. The recording is fetched in the background: read the call back with [`GET /calls/{id}`](https://developer.lemlist.com/api-reference/endpoints/calls/get-call) until `hasRecording` turns `true`, and send the `PATCH` again with a reachable URL when it does not.


## OpenAPI

````yaml patch /calls/{id}
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:
  /calls/{id}:
    patch:
      tags:
        - Calls
      summary: Update a Call
      description: >-
        Completes a call logged through `POST /calls` with what your dialer
        learns afterwards: the call status, a note, the duration, the recording,
        the transcript. Send at least one field; the others stay as they are. A
        field sent as `null` counts as absent.


        `{id}` is the `_id` the log answered, or the `externalId` you sent. Only
        calls logged through the API are reachable: a call made with the lemlist
        dialer keeps its own media.


        `callStatus` runs the status's automations as `POST /calls` does. `note`
        rewrites the call's note when one exists and creates it otherwise.
        `recordingUrl` and `transcript` behave as on `POST /calls`: the
        recording is fetched in the background, the transcript is stored and
        feeds the AI summary and the CRM call note.


        **Plan.** Email Pro and above.
      parameters:
        - name: id
          in: path
          required: true
          description: The call's `_id` (`act_…`) or its `externalId`.
          example: trellus-8f2c1
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                callStatus:
                  type: string
                  description: >-
                    A key of the team's call statuses (`GET /call-statuses`).
                    Runs the automations that status carries, as the team
                    configured them, and reaches the CRM call.
                  example: left-voicemail
                note:
                  type: string
                  maxLength: 10000
                  example: Left a voicemail, call back Thursday.
                duration:
                  type: integer
                  minimum: 0
                  maximum: 86400
                  description: >-
                    Seconds. Moves the end of the call accordingly, and reaches
                    the CRM call (HubSpot, Salesforce, Pipedrive).
                  example: 45
                recordingUrl:
                  type: string
                  format: uri
                  maxLength: 2048
                  description: >-
                    An `https` URL of the recording, reachable from the public
                    internet. An empty string means no recording, so it does not
                    count as a field to update.
                  example: https://recordings.dialer.example/8f2c1.mp3
                transcript:
                  type: string
                  maxLength: 200000
                  description: The transcript as plain text.
                  example: Hi Jane, this is Alex from lemlist…
            example:
              callStatus: left-voicemail
              duration: 45
              recordingUrl: https://recordings.dialer.example/8f2c1.mp3
      responses:
        '200':
          description: >-
            The call, re-read after the update. `hasRecording` turns `true` once
            the recording is stored, a moment later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    $ref: '#/components/schemas/Call'
              example:
                success: true
                data:
                  _id: act_Z8gP3xYq2bKd9mLn7
                  externalId: trellus-8f2c1
                  contactId: ctc_7Ks2PqW9mXb4Lc1Td
                  leadId: lea_2Hn8VbQ4wRz6Ym3Jk
                  campaignId: cam_5Fd9LpX2cVt7Nq8Wb
                  taskId: opp_9Xw4RtY7kLm2Pq6Zc
                  userId: usr_3Bv7GhT5nJk8Lm2Qx
                  direction: outbound
                  from: '+33100000000'
                  to: '+33612345678'
                  startedAt: '2026-10-21T09:30:00.000Z'
                  endedAt: '2026-10-21T09:30:45.000Z'
                  duration: 45
                  callStatus: left-voicemail
                  note: Left a voicemail, call back Thursday.
                  phoneProvider: api
                  provider: trellus
                  hasRecording: false
                  hasTranscript: true
                  createdAt: '2026-10-21T09:30:00.000Z'
        '400':
          description: >-
            The body or `{id}` is refused: a malformed id, an unknown status, an
            unsafe recording URL. `error.code` names the case, `error.message`
            explains it.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Error code: `VALIDATION_ERROR`,
                          `CALLS_API_NO_FIELD_TO_UPDATE`,
                          `CALLS_UNKNOWN_CALL_STATUS`,
                          `CALLS_API_UNSAFE_RECORDING_URL`,
                          `CALLS_API_USER_NOT_IN_TEAM` (neither the call nor the
                          API key names a rep).
                      message:
                        type: string
              examples:
                validation-error:
                  summary: >-
                    A field is missing or malformed: the message names the field
                    and the shape expected
                  value:
                    success: false
                    error:
                      code: VALIDATION_ERROR
                      message: >-
                        Match error: Expected an integer number of seconds
                        between 0 and 86400 in field duration
                calls-api-no-field-to-update:
                  summary: The body carries no field
                  value:
                    success: false
                    error:
                      code: CALLS_API_NO_FIELD_TO_UPDATE
                      message: >-
                        Send at least one of callStatus, note, duration,
                        recordingUrl or transcript.
                calls-unknown-call-status:
                  summary: '`callStatus` is not one of the team''s keys'
                  value:
                    success: false
                    error:
                      code: CALLS_UNKNOWN_CALL_STATUS
                      message: >-
                        Unknown call status for this team. Valid keys:
                        no-answer, left-voicemail, wrong-number, connected,
                        connected-positive, connected-negative,
                        connected-neutral, busy, gatekeeper, not-in-service
                calls-api-unsafe-recording-url:
                  summary: '`recordingUrl` is not a public https URL'
                  value:
                    success: false
                    error:
                      code: CALLS_API_UNSAFE_RECORDING_URL
                      message: >-
                        recordingUrl must be an https URL that resolves to a
                        public address.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Unauthorized
        '402':
          description: >-
            The team's plan does not include the calls API (Email Pro and
            above).
        '404':
          description: No call logged through the API matches `{id}` in the team.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Error code: `CALLS_CALL_NOT_FOUND`, or
                          `CALLS_API_CALL_NOT_UPDATABLE` on a call made with the
                          lemlist dialer, Aircall or Ringover: only calls logged
                          through this API can be updated.
                      message:
                        type: string
              examples:
                calls-api-call-not-updatable:
                  summary: 'A dialer call: only API-logged calls can be updated'
                  value:
                    success: false
                    error:
                      code: CALLS_API_CALL_NOT_UPDATABLE
                      message: >-
                        This call was not logged through the API: a call made
                        with the lemlist dialer, Aircall or Ringover cannot be
                        updated here.
                calls-call-not-found:
                  summary: No call logged through the API matches
                  value:
                    success: false
                    error:
                      code: CALLS_CALL_NOT_FOUND
                      message: Call not found.
        '405':
          description: >-
            Method not allowed: this path accepts GET and PATCH. The body is the
            plain `{ "error": "Route bad method" }`.
          content:
            application/json:
              example:
                error: Route bad method
        '500':
          description: >-
            Unexpected failure, alerted to lemlist. The same `PATCH` can be sent
            again: every field it sets is idempotent.
          content:
            application/json:
              example:
                success: false
                error:
                  code: INTERNAL_ERROR
                  message: Internal error
components:
  schemas:
    Call:
      type: object
      description: A call logged through `POST /calls`, as the calls API returns it.
      properties:
        _id:
          type: string
          description: >-
            The call's activity id, which `PATCH /calls/{id}` and `DELETE
            /activities/{activityId}/recording-transcript` take.
          example: act_Z8gP3xYq2bKd9mLn7
        externalId:
          type: string
          nullable: true
          description: >-
            Your own id of the call, as sent; `null` on a call another dialer
            made.
          example: trellus-8f2c1
        contactId:
          type: string
          nullable: true
          example: ctc_7Ks2PqW9mXb4Lc1Td
        leadId:
          type: string
          nullable: true
          description: The lead the call attached to, when it belongs to a campaign.
          example: lea_2Hn8VbQ4wRz6Ym3Jk
        campaignId:
          type: string
          nullable: true
          example: cam_5Fd9LpX2cVt7Nq8Wb
        taskId:
          type: string
          nullable: true
          description: The call task the call completed.
          example: opp_9Xw4RtY7kLm2Pq6Zc
        userId:
          type: string
          nullable: true
          description: The rep the call is attributed to.
          example: usr_3Bv7GhT5nJk8Lm2Qx
        direction:
          type: string
          nullable: true
          enum:
            - inbound
            - outbound
          example: outbound
        from:
          type: string
          nullable: true
          description: >-
            The caller's number: the rep's line on an outbound call, the
            contact's on an inbound one.
          example: '+33100000000'
        to:
          type: string
          nullable: true
          description: The number called.
          example: '+33612345678'
        startedAt:
          type: string
          format: date-time
          nullable: true
          example: '2026-10-21T09:30:00.000Z'
        endedAt:
          type: string
          format: date-time
          nullable: true
          description: '`startedAt` plus `duration`; absent without a duration.'
          example: '2026-10-21T09:31:30.000Z'
        duration:
          type: integer
          nullable: true
          description: Seconds.
          example: 90
        callStatus:
          type: string
          nullable: true
          description: The key of the call status set on the call.
          example: connected-positive
        note:
          type: string
          nullable: true
          example: Asked for a demo next week.
        phoneProvider:
          type: string
          nullable: true
          description: >-
            `api` for a call logged through this API; the dialer that made it
            otherwise (`twilio` for the lemlist dialer, `aircall`, `ringover`)
            on a call read back by `_id`.
          example: api
        provider:
          type: string
          nullable: true
          description: >-
            The dialer's name a call was logged with through this API
            (`provider`), lowercase; `null` when none was sent and on any other
            call.
          example: trellus
        hasRecording:
          type: boolean
          description: >-
            True once the call has a recording in lemlist: a `recordingUrl` just
            sent is still on its way.
          example: false
        hasTranscript:
          type: boolean
          example: true
        createdAt:
          type: string
          format: date-time
          nullable: true
          description: 'The call''s time in lemlist: `startedAt`.'
          example: '2026-10-21T09:30:00.000Z'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````

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