---
updatedAt: 2026-07-29T13:28:59.000Z
agentTools:
  projectIndex: https://dev.dengage.com/llms.txt
---

# UpsertData-Async-V2

## UpsertData-Async-V2

There are two versions of **UpsertData** API calls, synchronous and asynchronous. This particular version is the asynchronous version (V2) where no more than 1000 records rows are subject to be inserted/updated on a data table at in a single call. 

The method is used to insert bulk new records or update existing ones on a data table except **master_contact** table. 

If the target data table has **primary key** values, **UpsertData** call has to include these primary key values in input data rows as well as the rest of the to-be-updated column values.

If the target data table has no primary key values, **UpsertData** appends input data rows to the data table.

Input data row has to include all the column values of the target data table, otherwise an error will be returned.

If the operation is successful, the async upsert request will be sent to the system. This request returns a job id (transactionId) assigned to this async upsert job. This job id can be used to check the status of the job via this endpoint:
**[GetAsyncUpsertDataJobDetails-V2](ref:getasyncupsertdatajobdetailsv2)** 

> **Important Notes** <br>
> - If there is multiple data affecting the same row, the data in the last request will be upserted.
> - You can form the request body in two different ways by using either of the following input parameters

OPTION 1: Using **tableId** which is the uuid of the data table
OPTION 2: Using **tableName** which is the name of the data table

**DateTime Format**: 
* yyyy-MM-dd
* yyyy-MM-dd HH:mm
* yyyy-MM-ddTHH:mm
* yyyy-MM-dd HH:mm:ss
* yyyy-MM-ddTHH:mm:ss
* yyyy-MM-dd HH:mm:ss.f
* yyyy-MM-dd HH:mm:ss.ff
* yyyy-MM-dd HH:mm:ss.fff
* yyyy-MM-ddTHH:mm:ss.f
* yyyy-MM-ddTHH:mm:ss.ff
* yyyy-MM-ddTHH:mm:ss.fff
* yyyy-MM-ddTHH:mm:ssZ
* yyyy-MM-ddTHH:mm:ss.fffZ

# OpenAPI definition

````json
{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "email": "tech@dengage.com",
      "name": "dEngage",
      "url": "https://www.dengage.com"
    },
    "description": "## Working with Standard APIs\nThe D·engage API provides programmatic access to D·engage Platform, providing the required tools to exploit and trigger system functionality remotely, enabling our customers to integrate their IT applications swiftly.\n\nAPI aims to provide you with almost the same functionality as in D·engage Platform GUIs including configuration, data management, automation, advanced reporting. We are happy to support you on missing functionalities in this version of the API. Please contact our support teams at tech@dengage.com for further discussions.\n\n<span style=\"color:red;font-size:20px;font-weight:bold\">You can send a maximum of 30 requests per second on an IP basis.</span>\n\n-----\n\n## DateTime Formats:\n```\n* yyyy-MM-dd\n* yyyy-MM-dd HH:mm\n* yyyy-MM-ddTHH:mm\n* yyyy-MM-dd HH:mm:ss\n* yyyy-MM-ddTHH:mm:ss\n* yyyy-MM-dd HH:mm:ss.f\n* yyyy-MM-dd HH:mm:ss.ff\n* yyyy-MM-dd HH:mm:ss.fff\n* yyyy-MM-ddTHH:mm:ss.f\n* yyyy-MM-ddTHH:mm:ss.ff\n* yyyy-MM-ddTHH:mm:ss.fff\n* yyyy-MM-ddTHH:mm:ssZ\n```\n\n## APIs\n\n### Authorization API\nAuthorization API allow users to get authenticated in the system for API calls. This is the first call to be made by the calling clients.\n\n[**Login**](/cdmp/docs/authorization/login#login) authenticates the calling client by a valid userKey/passwpord token pair.\n\n\n### Contact API\nOnce your dataspace is ready and data sources are synched with the relational database. \nYou can make the below API calls to manage your contacts in the system.\n\n[**GetContact**](/cdmp/docs/contact/getcontactlist) queries and returns all related information of a given contact.\n\n[**GetUpdateLog**](/cdmp/docs/contact/getcontactupdatelog#getupdatelog) retrieves the status and permission changes of a contact such as ContactStatus, EmailStatus, GsmStatus, EmailPermission, GsmPermission.\n\n### Dataspace API\nDataspace APIs are developed to provide a set of functions and procedures that allow a robust interaction with dEngage Platform's relational database. The set of Dataspace APIs allow users to setup connections among different data records and to use those connections to view, manage and manipulate data to fit your own dynamic business needs.\n\nThe power of our relational database is its structure that enables you to recognize relations among stored items of information. By connecting rows in different tables through the use of primary and foreign keys, you can create views, reports, and other slices of information to access data for email segmenting, selection and personalization.\nUpon creating your account, it is recommended to create your own dataspace in the system and synching your data sources by using these APIs. \n\nDataspace APIs and their main functions are as follows:\n\n[**CreateTable**](/cdmp/docs/dataspace/createtable#createtable) API call is made to create new tables in the relational database while defining the table structures with its columns, rows and primary keys.\n\n[**TruncateTable**](/cdmp/docs/dataspace/truncatetable#truncatetable) deletes all the data in a data table.\n\n[**DropTable**](/cdmp/docs/dataspace/droptable#droptable) deletes the data table from the relational database.\n\n[**Synchronous DeleteData**](/cdmp/docs/dataspace/deletedata#deletedata) deletes no more than 1000 records / API call in a data table. \n\n[**Asynchronous DeleteData**](/cdmp/docs/dataspace/postdataspaceasyncdelete#deletedata-async) deletes a vast amount of data from a data table (more than 1000 and no upper limit). The job is chunked into different threads in the background.\n\n[**Synchronous Upsert Data**](/cdmp/docs/dataspace/postdataspacesyncupsert#upsertdata) inserts/updates no more than 1000 new records / API call in a given data table.\n\n[**Asynchronous Upsert Data**](/cdmp/docs/dataspace/updatedataasynch#upsertdata-async) inserts/updates a vast amount of data to a data table (more than 1000 and no upper limit)\n\n[**GetAsyncJobStatus**](/cdmp/docs/dataspace/getstatusofasyncjob#getstatusofasyncjob) returns the status of a given asynchronous API call job in the system.\n\n### Content API\nSince your dataspace is ready, your data is synchronized and contacts are updated, you are ready to create contents that are subject to your target audience.\n\nYou can make the below API calls to manage your send contents in the system.\n\n[**CreateEmailContent**](/cdmp/docs/content/createcontent#createemailcontent) creates an email content with subject & content optimization, delivery & tracking options and stores it in the system with an assigned uuid.\n\n[**UpdateEmailContent**](/cdmp/docs/content/updateemailcontent#updateemailcontent) updates a given email content’s body, subject & content optimization, delivery & tracking options and stores it in the system with a uuid.\n\n[**DeleteEmailContent**](/cdmp/docs/content/deleteemailcontent#deleteemailcontent) deletes the content of a given Email uuid.\n\n[**GetEmailContent**](/cdmp/docs/content/getemailcontent#getemailcontent) returns the email content of a given uuid.\n\n[**CreateSmsContent**](/cdmp/docs/content/createsmscontent#createsmscontent) creates an SMS content with delivery & tracking options and stores it in the system with an assigned uuid.\n\n[**UpdateSmsContent**](/cdmp/docs/content/updatesmscontent#updatesmscontent) updates a given SMS content’s body, delivery & tracking options and stores it in the system with a uuid.\n\n[**DeleteSmsContent**](/cdmp/docs/content/deletesmscontent#deletesmscontent) returns the content of a given SMS uuid.\n\n[**GetSmsContent**](/cdmp/docs/content/getsmscontent#getsmscontent) returns the SMS content of a given uuid.\n\n### Settings API\nSettings APIs allow users to retrieve some global options from the system set by system administrators.\n\n[**GetEmailFroms**](/cdmp/docs/settings/getemailfroms#getemailfroms) returns the “EmailFrom” options defined in the system.\n\n[**GetBulkVmtaList**](/cdmp/docs/settings/getbulkvmtalist#getbulkvmtalist) returns the list of Virtual Message Transfer Agents (VMTA) that are handling bulk message send functions.\n\n[**GetTransactionalVmtaList**](/cdmp/docs/settings/gettransactionalvmtalist#gettransactionalvmtalist) returns the list of Virtual Message Transfer Agents (VMTA) that are handling transactional message send functions.\n\n### Logs API\n[**GetEmailBounceLogs**](/cdmp/docs/logs/getlogsemailbounce#getlogsemailbounce) retrieves the list of bounce-related events about a target email send.\n\n[**GetEmailLogs**](/cdmp/docs/logs/getemaillogs#getemaillogs)\nretrieves the list of events about a target email send.\n\n[**GetEmailSpamLogs**](/cdmp/docs/logs/getlogsemailspam#getlogsemailspam)\nretrieves the list of spam-related events about a target email send.\n\n[**GetEmailUnsubscribeLogs**](/cdmp/docs/logs/getemailunsubscribelogs#getemailunsubscribelogs) retrieves the list of unsubscribe events about a target email send.\n\n### Transactional API\n[**GetTransactionalEmailReport**](/cdmp/docs/transactional/gettransactionalemailreport#gettransactionalemailreport)\nretrieves the report of a target transactional email send.\n\n[**GetTransactionalSmsReport**](/cdmp/docs/transactional/gettransactionalsms#gettransactionalsms)\nretrieves the report of a target transactional sms send.\n\n[**SendTransactionalEmail**](/cdmp/docs/transactional/sendtransactionalemail#sendtransactionalemail)\nsends a transactional email message to group of target recipients.\n\n[**SendTransactionalSms**](/cdmp/docs/transactional/sendtransactionalsms#sendtransactionalsms)\nsends a transactional SMS message to group of target recipients.",
    "title": "Standard API Documentation",
    "version": "1.0.0"
  },
  "paths": {
    "/dataspace/async/upsert_v2": {
      "post": {
        "description": "## UpsertData-Async-V2\n\nThere are two versions of **UpsertData** API calls, synchronous and asynchronous. This particular version is the asynchronous version (V2) where no more than 1000 records rows are subject to be inserted/updated on a data table at in a single call. \n\nThe method is used to insert bulk new records or update existing ones on a data table except **master_contact** table. \n\nIf the target data table has **primary key** values, **UpsertData** call has to include these primary key values in input data rows as well as the rest of the to-be-updated column values.\n\nIf the target data table has no primary key values, **UpsertData** appends input data rows to the data table.\n\nInput data row has to include all the column values of the target data table, otherwise an error will be returned.\n\nIf the operation is successful, the async upsert request will be sent to the system. This request returns a job id (transactionId) assigned to this async upsert job. This job id can be used to check the status of the job via this endpoint:\n**[GetAsyncUpsertDataJobDetails-V2](ref:getasyncupsertdatajobdetailsv2)** \n\n> **Important Notes** <br>\n> - If there is multiple data affecting the same row, the data in the last request will be upserted.\n> - You can form the request body in two different ways by using either of the following input parameters\n\nOPTION 1: Using **tableId** which is the uuid of the data table\nOPTION 2: Using **tableName** which is the name of the data table\n\n**DateTime Format**: \n* yyyy-MM-dd\n* yyyy-MM-dd HH:mm\n* yyyy-MM-ddTHH:mm\n* yyyy-MM-dd HH:mm:ss\n* yyyy-MM-ddTHH:mm:ss\n* yyyy-MM-dd HH:mm:ss.f\n* yyyy-MM-dd HH:mm:ss.ff\n* yyyy-MM-dd HH:mm:ss.fff\n* yyyy-MM-ddTHH:mm:ss.f\n* yyyy-MM-ddTHH:mm:ss.ff\n* yyyy-MM-ddTHH:mm:ss.fff\n* yyyy-MM-ddTHH:mm:ssZ\n* yyyy-MM-ddTHH:mm:ss.fffZ",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "columns": {
                    "description": "The columns to be upserted",
                    "items": {
                      "type": "string"
                    },
                    "type": "array",
                    "x-examples": [
                      [
                        "contact_key",
                        "name",
                        "surname",
                        "event_name"
                      ]
                    ]
                  },
                  "rows": {
                    "description": "The rows to be upserted.",
                    "items": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "type": "array",
                    "x-examples": [
                      [
                        [],
                        [],
                        []
                      ]
                    ]
                  },
                  "tableId": {
                    "description": "the id of the table to be upserted. **tableId** OR **tableName** is required.",
                    "type": "string"
                  },
                  "tableName": {
                    "description": "the name of the table to be upserted. **tableId** OR **tableName** is required.",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "description": "**tableId** OR **tableName** is required."
        },
        "responses": {
          "202": {
            "description": "The operation is successful and the async upsert request has been sent to the system. This request returns a job id (transactionId) assigned to this async upsert job. Please use this jobId to check the status of your job. ",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {},
                    "message": {
                      "type": "string"
                    },
                    "transactionId": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "value": {
                      "code": 0,
                      "data": {},
                      "message": "Successful",
                      "transactionId": "90bdcaca-e2fa-4781-9639-e039f12b45bd"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "nullable": true
                    },
                    "message": {
                      "type": "string"
                    },
                    "transactionId": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "value": {
                      "code": 1,
                      "data": null,
                      "message": "tableID must be in UUID format!",
                      "transactionId": "aa1e48f6-915a-455f-b6ea-a051db8c3715"
                    }
                  }
                }
              },
              "TooManyRequest": {
                "examples": {
                  "response": {
                    "value": {
                      "code": 429,
                      "data": null,
                      "message": "Too many concurrent request attemption!!! Please decrease concurrency.",
                      "transactionId": "6364cd75-ac74-4184-935f-ca67514fb9ad"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Not-authenticated. Please re-login."
          },
          "403": {
            "description": "The operation is not allowed. Your api user is not authorized to use this api. ",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {
                      "properties": {
                        "allPermissionsRequired": {
                          "type": "boolean"
                        },
                        "missingPermissions": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "message": {
                      "type": "string"
                    },
                    "transactionId": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "value": {
                      "code": 10,
                      "data": {
                        "allPermissionsRequired": true,
                        "missingPermissions": [
                          "dataSpace.manage"
                        ]
                      },
                      "message": "Access not allowed!",
                      "transactionId": "8dd83a52-2932-4505-a501-edf270bbd764"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Table not found.",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "data": {},
                    "message": {
                      "type": "string"
                    },
                    "transactionId": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                },
                "examples": {
                  "response": {
                    "value": {
                      "code": 5,
                      "data": {
                        "null": null
                      },
                      "message": "Table not found!",
                      "transactionId": "dd1e17dc-f55b-486d-b0d9-23342c909e69"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests"
          }
        },
        "summary": "UpsertData-Async-V2",
        "tags": [
          "Dataspace"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Dataspace"
    }
  ],
  "servers": [
    {
      "url": "https://api.dengage.com/rest",
      "description": "Production(TR) Environment"
    },
    {
      "url": "https://dev-api.dengage.com/rest",
      "description": "Development Environment"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Access token obtained from the /login endpoint. Paste the raw token; the \"Bearer \" prefix is added automatically."
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "security": [
    {
      "bearerAuth": []
    }
  ]
}
````