API for managing personal memory items with authentication and user-specific data.
API for managing personal memory items with authentication and user-specific data.
This API supports three authentication methods:
X-API-Key
headerX-API-Key: <your-api-key>
X-Session-Token
headerX-Session-Token: <your-session-token>
Authorization
headerAuthorization: Bearer <token>
All endpoints require one of these authentication methods.
curl -i -X POST \
https://platform.papr.ai/_mock/apis/v1/user \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"email": "user@example.com",
"external_id": "user123",
"metadata": {
"name": "John Doe",
"preferences": {
"theme": "dark"
}
},
"type": "developerUser"
}'
{ "code": 200, "created_at": "2024-03-20T10:00:00.000Z", "email": "user@example.com", "external_id": "user123", "metadata": { "name": "John Doe", "preferences": { … } }, "status": "success", "updated_at": "2024-03-20T10:00:00.000Z", "user_id": "abc123" }
curl -i -X GET \
'https://platform.papr.ai/_mock/apis/v1/user?email=string&external_id=string&page=1&page_size=10' \
-H 'X-API-Key: string'
{ "code": 200, "data": [ { … } ], "page": 1, "page_size": 10, "status": "success", "total": 1 }
curl -i -X GET \
'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
-H 'X-API-Key: string'
{ "code": 200, "created_at": "2024-03-20T10:00:00.000Z", "email": "user@example.com", "external_id": "user123", "metadata": { "name": "John Doe", "preferences": { … } }, "status": "success", "updated_at": "2024-03-20T10:00:00.000Z", "user_id": "abc123" }
curl -i -X PUT \
'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"email": "updated.user@example.com",
"external_id": "updated_user_123",
"metadata": {
"name": "Updated User",
"preferences": {
"theme": "light"
}
},
"type": "developerUser"
}'
{ "code": 200, "created_at": "2024-03-20T10:00:00.000Z", "email": "user@example.com", "external_id": "user123", "metadata": { "name": "John Doe", "preferences": { … } }, "status": "success", "updated_at": "2024-03-20T10:00:00.000Z", "user_id": "abc123" }
curl -i -X DELETE \
'https://platform.papr.ai/_mock/apis/v1/user/{user_id}?is_external=false' \
-H 'X-API-Key: string'
Successful Response
ID of the user attempted to delete
ID of the user attempted to delete
ID of the user attempted to delete
Success or error message
Success or error message
Success or error message
Error message if failed
Error message if failed
Error message if failed
{ "code": 200, "message": "User and association deleted successfully", "status": "success", "user_id": "abc123" }
curl -i -X POST \
https://platform.papr.ai/_mock/apis/v1/user/batch \
-H 'Content-Type: application/json' \
-H 'X-API-Key: string' \
-d '{
"users": [
{
"email": "user@example.com",
"external_id": "user123",
"metadata": {
"name": "John Doe",
"preferences": {
"theme": "dark"
}
},
"type": "developerUser"
}
]
}'
{ "code": 200, "data": [ { … } ], "page": 1, "page_size": 10, "status": "success", "total": 1 }