Papr Memory API (1.0.0)

API for managing personal memory items with authentication and user-specific data.

Authentication

This API supports three authentication methods:

  • API Key: Include your API key in the X-API-Key header

    X-API-Key: <your-api-key>
  • Session Token: Include your session token in the X-Session-Token header

    X-Session-Token: <your-session-token>
  • Bearer Token: Include your OAuth2 token from Auth0 in the Authorization header

    Authorization: Bearer <token>

All endpoints require one of these authentication methods.

Download OpenAPI description
Languages
Servers
Papr Memory API
https://platform.papr.ai/_mock/apis/
Production server
https://memory.papr.ai/

v1

Operations

User

Operations

Create User

Request

Create a new user or link existing user to developer

Headers
x-api-keystring(X-Api-Key)required
Bodyapplication/jsonrequired
emailEmail (string) or Email (null)(Email)
Example: "user@example.com"
Any of:
string(email)(Email)
external_idstring(External Id)required
Example: "user123"
metadataMetadata (object) or Metadata (null)(Metadata)
Example: {"name":"John Doe","preferences":{"theme":"dark"}}
Any of:
object(Metadata)
typestring(UserType)
Default "developerUser"
Enum"developerUser""user""agent"
Example: "developerUser"
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"
  }'

Responses

Successful Response

Bodyapplication/json
codeinteger(Code)required

HTTP status code

Example: 200
statusstring(Status)required

'success' or 'error'

Example: "success"
user_idUser Id (string) or User Id (null)(User Id)
Example: "abc123"
Any of:
string(User Id)
emailEmail (string) or Email (null)(Email)
Example: "user@example.com"
Any of:
string(Email)
external_idExternal Id (string) or External Id (null)(External Id)
Example: "user123"
Any of:
string(External Id)
metadataMetadata (object) or Metadata (null)(Metadata)
Example: {"name":"John Doe","preferences":{"theme":"dark"}}
Any of:
object(Metadata)
created_atCreated At (string) or Created At (null)(Created At)
Example: "2024-03-20T10:00:00.000Z"
Any of:
string(Created At)
updated_atUpdated At (string) or Updated At (null)(Updated At)
Example: "2024-03-20T10:00:00.000Z"
Any of:
string(Updated At)
errorError (string) or Error (null)(Error)
Any of:
string(Error)
detailsDetails (any) or Details (null)(Details)
Any of:
any(Details)
Response
application/json
{ "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" }

List Users

Request

List users for a developer

Query
pageinteger(Page)>= 1
Default 1
page_sizeinteger(Page Size)[ 1 .. 100 ]
Default 10
external_idExternal Id (string) or External Id (null)(External Id)
Any of:
string(External Id)
emailEmail (string) or Email (null)(Email)
Any of:
string(Email)
Headers
x-api-keystring(X-Api-Key)required
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'

Responses

Successful Response

Bodyapplication/json
codeinteger(Code)required

HTTP status code

Example: 200
statusstring(Status)required

'success' or 'error'

Example: "success"
dataArray of Data (objects) or Data (null)(Data)
Example: [{"created_at":"2024-03-20T10:00:00.000Z","email":"user1@example.com","external_id":"user123","metadata":{"name":"John Doe","preferences":{"theme":"dark"}},"updated_at":"2024-03-20T10:00:00.000Z","user_id":"abc123"}]
Any of:
totalTotal (integer) or Total (null)(Total)
Example: 1
Any of:
integer(Total)
pagePage (integer) or Page (null)(Page)
Example: 1
Any of:
integer(Page)
page_sizePage Size (integer) or Page Size (null)(Page Size)
Example: 10
Any of:
integer(Page Size)
errorError (string) or Error (null)(Error)
Any of:
string(Error)
detailsDetails (any) or Details (null)(Details)
Any of:
any(Details)
Response
application/json
{ "code": 200, "data": [ {} ], "page": 1, "page_size": 10, "status": "success", "total": 1 }

Get User

Request

Get user details by user_id (_User.objectId) and developer association

Path
user_idstring(User Id)required
Headers
x-api-keystring(X-Api-Key)required
curl -i -X GET \
  'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
  -H 'x-api-key: string'

Responses

Successful Response

Bodyapplication/json
codeinteger(Code)required

HTTP status code

Example: 200
statusstring(Status)required

'success' or 'error'

Example: "success"
user_idUser Id (string) or User Id (null)(User Id)
Example: "abc123"
Any of:
string(User Id)
emailEmail (string) or Email (null)(Email)
Example: "user@example.com"
Any of:
string(Email)
external_idExternal Id (string) or External Id (null)(External Id)
Example: "user123"
Any of:
string(External Id)
metadataMetadata (object) or Metadata (null)(Metadata)
Example: {"name":"John Doe","preferences":{"theme":"dark"}}
Any of:
object(Metadata)
created_atCreated At (string) or Created At (null)(Created At)
Example: "2024-03-20T10:00:00.000Z"
Any of:
string(Created At)
updated_atUpdated At (string) or Updated At (null)(Updated At)
Example: "2024-03-20T10:00:00.000Z"
Any of:
string(Updated At)
errorError (string) or Error (null)(Error)
Any of:
string(Error)
detailsDetails (any) or Details (null)(Details)
Any of:
any(Details)
Response
application/json
{ "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" }

Update User

Request

Update user details by user_id (_User.objectId) and developer association

Path
user_idstring(User Id)required
Headers
x-api-keystring(X-Api-Key)required
Bodyapplication/jsonrequired
emailEmail (string) or Email (null)(Email)
Example: "updated.user@example.com"
Any of:
string(Email)
external_idExternal Id (string) or External Id (null)(External Id)
Example: "updated_user_123"
Any of:
string(External Id)
metadataMetadata (object) or Metadata (null)(Metadata)
Example: {"name":"Updated User","preferences":{"theme":"light"}}
Any of:
object(Metadata)
typeUserType (string) or null
Example: "developerUser"
Any of:
string(UserType)
Enum"developerUser""user""agent"
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"
  }'

Responses

Successful Response

Bodyapplication/json
codeinteger(Code)required

HTTP status code

Example: 200
statusstring(Status)required

'success' or 'error'

Example: "success"
user_idUser Id (string) or User Id (null)(User Id)
Example: "abc123"
Any of:
string(User Id)
emailEmail (string) or Email (null)(Email)
Example: "user@example.com"
Any of:
string(Email)
external_idExternal Id (string) or External Id (null)(External Id)
Example: "user123"
Any of:
string(External Id)
metadataMetadata (object) or Metadata (null)(Metadata)
Example: {"name":"John Doe","preferences":{"theme":"dark"}}
Any of:
object(Metadata)
created_atCreated At (string) or Created At (null)(Created At)
Example: "2024-03-20T10:00:00.000Z"
Any of:
string(Created At)
updated_atUpdated At (string) or Updated At (null)(Updated At)
Example: "2024-03-20T10:00:00.000Z"
Any of:
string(Updated At)
errorError (string) or Error (null)(Error)
Any of:
string(Error)
detailsDetails (any) or Details (null)(Details)
Any of:
any(Details)
Response
application/json
{ "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" }

Delete User

Request

Delete user association with developer and the user itself by user_id (_User.objectId)

Path
user_idstring(User Id)required
Headers
x-api-keystring(X-Api-Key)required
curl -i -X DELETE \
  'https://platform.papr.ai/_mock/apis/v1/user/{user_id}' \
  -H 'x-api-key: string'

Responses

Successful Response

Bodyapplication/json
codeinteger(Code)required

HTTP status code

Example: 200
statusstring(Status)required

'success' or 'error'

Example: "success"
user_idUser Id (string) or User Id (null)(User Id)

ID of the user attempted to delete

Example: "abc123"
Any of:

ID of the user attempted to delete

string(User Id)

ID of the user attempted to delete

messageMessage (string) or Message (null)(Message)

Success or error message

Example: "User and association deleted successfully"
Any of:

Success or error message

string(Message)

Success or error message

errorError (string) or Error (null)(Error)

Error message if failed

Any of:

Error message if failed

string(Error)

Error message if failed

detailsDetails (any) or Details (null)(Details)

Additional error details or context

Any of:

Additional error details or context

any(Details)

Additional error details or context

Response
application/json
{ "code": 200, "message": "User and association deleted successfully", "status": "success", "user_id": "abc123" }