• Introduction
    • How to Handle Async Callback Actions
    • Enrichment
      POST
    • Deanonymization
      POST
    • Linkedin to Phone
      POST
    • Linkedin to HEM
      POST
    • Email to HEM
      POST
    • IP to Company
      POST
    • Organization Domain Finder
      POST
    • Keyword to Lead
      POST

    How to Handle Async Callback Actions

    What Are Asynchronous Callbacks?#

    Some operations don’t return results instantly—like enriching company data or running validations. Instead of keeping the request open, your service can process it in the background and send the result later using a callback.
    A simple way to think about it: the client sends a request and includes a return address. Once your system finishes the job, you send the result back to that address.

    How It Works#

    1. Initial Request#

    When a request is sent to your API, it includes a callback URL.
    This URL is unique for each request and ensures the response is mapped correctly on the client side.
    Example request:
    {
      "companyName": "Acme Logistics",
      "callbackUrl": "https://www.example.com/resolution"
    }

    2. Immediate Response#

    After receiving the request:
    Return a response right away confirming that processing has started
    Do not wait for the full operation to complete
    Example response:
    {
      "status": "processing",
      "message": "The resolution has started. We will send the result to the callback URL you provided on completion."
    }

    3. Sending the Callback#

    Once processing is complete:
    Send a POST request to the provided callbackUrl
    Include the final result in the payload
    Example callback payload:
    {
      "companyName": "Acme Logistics",
      "address": "123 Tech Boulevard",
      "employees": 400
    }

    What Happens on the Client Side#

    The request enters a pending state (e.g., “Awaiting Callback”)
    When the callback is received, the data is automatically updated
    No additional action is required from the user.

    Important Details#

    Dynamic Callback URLs#

    Each request includes its own callback endpoint. This allows precise matching between requests and responses without extra tracking logic.

    Multiple Callbacks#

    If multiple callbacks are sent to the same URL:
    Only the most recent payload will be reflected as the final result
    This behavior helps prevent inconsistencies but should generally be avoided.
    Previous
    Introduction
    Next
    Enrichment
    Built with