User Upload API

Bulk API to insert User records. This API endpoint accepts POST requests with JSON data containing a list of User records wrapped in a dictionary.

POST /v1/users
{
  "data": [user_1, user_2, user_3]
}

If a record with the same user_id already exists in the dataset, the existing record will be replaced (no partial update is allowed at this time). We recommend limiting your calls to around 100 records at a time to avoid memory issues or timeout risks.

Schema validation

This API validates the inserted records against the API schema. Any schema error will cause the whole request to fail (status_code=422), and none of the records will be inserted. As long as the request passes the schema validation, the API will return status_code=200, but still check whether an individual record has an error.

{
  "errors": true,
  "data": [
    "data.0.user_id is invalid. The attribute was expect…"
  ]
}

Response Format

The API will return a JSON object with a task_id that can be used to retrieve.

Example Successful Response

{
  "data": {
    "task_id": "{task_id}"
  }
}

To check the exact response body of this task_id, make a GET request to the following endpoint:

GET /v1/users/_status/{task_id}

Replace {task_id} with the task_id returned from the response.

Body·
required
application/json
  • data
    Type: array object[] · Data
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/v1/users
curl 'https://api.askmiso.com/v1/users?api_key=YOUR_SECRET_TOKEN' \
  --request POST \
  --header 'Content-Type: application/json' \
  --data '{
  "data": [
    {
      "user_id": "user_1234",
      "created_at": "",
      "updated_at": "",
      "name": "John Doe",
      "profile_image": "",
      "age": 33,
      "gender": "M",
      "city": "Mountain View",
      "state": "California",
      "country": "US",
      "group_id": "Northwind Corp",
      "description": "Engineer from Northwind Corp",
      "custom_attributes": {
        "acquisition_channel": "Facebook Campaign 2020",
        "declared_interests": [
          "Drama",
          "Romance"
        ]
      }
    }
  ]
}'
{
  "message": "success",
  "data": {
    "task_id": "string"
  }
}