--- title: "Update API | Darwinium" slug: "update-api" description: "Use the Darwinium Update API to revise or enrich existing event data, with request formats and integration guidance." updated: 2026-02-17T03:34:40Z published: 2026-02-17T03:34:40Z canonical: "docs.darwinium.com/update-api" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.darwinium.com/llms.txt > Use this file to discover all available pages before exploring further. # Update API The Darwinium Update API allows you to update attributes or run workflows against events that have already been processed by Darwinium. No new Darwinium risk assessment The Update API does not return a new risk assesment. It is used to update attributes and context of a previous one. ### Example Use Cases 1. **Run ruleset that can update the `event_type` after an action completes successfully** - Example: Change from `account_login` to `account_login_success` after successful authentication 2. **Enrich an event with additional data that becomes available after processing** - Example: Update a signup attempt event with the customer token assigned after the account is successfully created 3. **Apply labels or run workflows on historical events** - Example: Add a "challenge_passed" label to device identifier + customer token combination after succeeding a one time passcode stepup The diagram illustrates a typical use case for the Update API ![Image](https://cdn.document360.io/db6f7316-640d-4099-b5a1-b01b4dbd17fc/Images/Documentation/update_api2.png?sv=2026-02-06&spr=https&st=2026-11-26T16%3A38%3A43Z&se=2026-11-26T17%3A38%3A43Z&sr=b&sp=r&sig=vr%2B3GXN4E3OHejxy7UTv5DWaEDMCcrM5iZFw3mitWnY%3D) In this flow, the Update API is called asynchronously after successful signup to: 1. Pass into status attribute success, which will lead to change in event_type in a .rules file. Ensuring features in subsequent events can calculate against successful signups only 2. Add the assigned customer identifier to the risk assessment event. That allows the customer's signup journey to be retrieved for future investigations and in feature computations. ## Authentication The Update API uses the same certificate-based authentication (Mutual TLS) as the Event API. ## Creating a Darwinium Update API Step You create and deploy the Update API Step from your Darwinium journey file. ### Journey Configuration Example **Important:** The Update API step must specify `api_name: UPDATE` in the journey configuration. The step_name can be any name. Example .journey.yaml file: ``` steps: - step_name: outcome event_type: misc_other api_event: trigger: api_name: UPDATE models: - name: outcome_rules execute_code: outcome.rules ``` **Workflows on Update API Steps:** Rulesets can be attached to an Update API step to perform conditional operations: - **Set Attributes** - Modify attribute values based on logic - **Add/Remove Labels** - Apply or remove labels conditionally Example outcome.rules file: ``` version: 2 checksum: SnLVbZILbtXdin5og0nvvw== decision_type: scoringModel rules: - type: condition condition: custom.general_purpose['update_status'] = 'success' signal: SET_ACCOUNT_CREATION remediations: - type: setAttribute attribute: event_type value: "'account_creation'" ``` ## Calling the Update API ### URL Format ``` https://your-host.node.darwinidentity.com:9443/api/update/// ``` **URL Parameters:** - `your-host`: Your node's subdomain (retrieve from Darwinium Portal > Admin > Nodes) - `<journey>`: The `journey_name` specified in your deployed `.journey.yaml` file - `<step>`: The `step_name` of the Update API step you created in your `.journey.yaml` file - `<identifier>`: **Required** - The Darwinium identifier from the original event you wish to update **Example URL:** ``` https://your-host.node.darwinidentity.com:9443/api/update/authjourney/outcome/2cb7594d12ec4378ac03be04cad971f0 ``` ### Headers ``` Content-Type: application/json Accept: application/json ``` ### Request Body The Update API accepts the same request body attributes as the Event API. **Important:** - Any attributes contained in the Update API request payload will **replace** the value on the event. - Non-input atttributes like `event_type` should be set in a .rules file assigned to the update step, not provided on API request body. **Example: Update signup event after successful account creation** Update a signup risk assessment event with the customer identifier (assigned only after successful signup) and status, which a rule condition will use to change the event type: ``` { "identity": { "ACCOUNT":{ "customer_token":{ "customer_token": "customer_123456789" } } }, "custom": { "general_purpose": { "update_status": "success" } } } ``` ### Response Body The response body returns the updated event data in the same format as the Event API response. ### Error Responses **Missing identifier (400 Bad Request):** ``` { "error": "missing_identifier" } ``` **Identifier not found (500 Internal Server Error):** Returned when the identifier does not refer to a prior Darwinium event. ## Awareness and Limitations - The identifier **must** refer to an existing Darwinium event. API will return error if identifier not found on previous Event. - Any attribute present in the Update API request body will **overwrite** those in the original event. - **Workflows** are executed to set attributes or apply/remove labels, but **not for risk assessments** (no model scoring) - You **cannot set `event_type` to NULL** - Non-input attributes like `event_type` should be **set in a .rules file**, not sent in API payload. - Event data is only available for updates within the standard retention period ## Best Practices #### Asynchronous Processing Since the Update API is typically used to update a prior event after additional processing has completed, it is usually called **asynchronously** from your main application flow. This means: - Update API calls happen after the user interaction is complete - Failures in Update API calls should not block your application's primary workflow - May wish to still implement appropriate retry logic upon errors (network failures, timeouts, 5xx responses) - Consider using a message queue or background job system for reliability #### Proactive Success Approach **Assume events represent failed or incomplete attempts unless proactively updated with success.** This pattern provides several benefits: - Risk assessments reflect worst-case scenarios by default - If Update API calls fail, events retain their original "attempt" state - More accurate reporting when systems experience issues - Easier to identify incomplete workflows **Example:** - Initial Event API: `event_type: account_login` (status pending) - Update API: Ruleset set upon success: `event_type: account_login_success` (status confirmed successful) If the Update API call fails or never happens, the event remains as an "attempt" which is appropriate for risk analysis. ## Full Schema The full Darwinium API schema is available from: ``` GET https://your-host.node.darwinidentity.com:9443/api/schema ```