This endpoint allows you to create or update user profiles in bulk. It is an idempotent operation, meaning you can safely retry requests without creating duplicate profiles.
Path Parameters
The slug of the Guru to which the profiles belong.
Your API key for authentication. You can obtain your API key from the Gurubase.io dashboard.
Body Parameters
An array of user profile objects to upsert. Show User Object Properties
A uuid for the user from your system. If you want to use this with “Ask Question” endpoint, you need to provide the same external_user_id there.
A JSON object containing the user’s profile data or “memory”. The structure of this object is up to you.
Example Request
{
"users" : [
{
"external_user_id" : "user1-id" ,
"memory" : {
"name" : "John Doe" ,
"email" : "[email protected] "
}
},
{
"external_user_id" : "user2-id" ,
"memory" : {
"name" : "Jane Doe" ,
"plan" : "premium"
}
}
]
}
Response
The response provides a detailed breakdown of the upsert operation.
Indicates the overall status of the request. Will be “success” if the request was accepted and partially or fully processed.
The total number of users in the request payload.
The number of users successfully processed.
An array of result objects, one for each user in the request, in the same order. The index of the user in the original request array.
The external user ID provided.
Whether the upsert was successful for this user.
A list of errors if the upsert failed for this user.
{
"status" : "success" ,
"total_users" : 2 ,
"processed_users" : 2 ,
"users_results" : [
{
"user_index" : 0 ,
"external_user_id" : "user1-id" ,
"success" : true ,
"errors" : []
},
{
"user_index" : 1 ,
"external_user_id" : "user2-id" ,
"success" : true ,
"errors" : []
}
]
}