Skip to main content
POST
Generate profiles

Authorizations

Authorization
string
header
required

API key authentication. Prefix your Mem0 API key with 'Token '. Example: 'Token your_api_key'

Headers

Idempotency-Key
string
required

Makes a retry safe: the same key returns the same job.

Required string length: 8 - 128

Body

application/json
operation
enum<string>
required

What to generate. Optional only when entity_id is set, which means trigger.

Available options:
sample,
trigger
entity_type
enum<string>
required
Available options:
user
entity_id
string

One entity, for trigger.

limit
integer

How many entities to sample.

Required range: 1 <= x <= 10

Response

Job accepted.

job_id
string
status
string
status_url
string

Poll this. Building the path yourself breaks on a route change.

operation
string
entity_type
string
entity_count_reserved
integer

Entities reserved against usage for this job.

event_id
string | null
replayed
boolean

True when an Idempotency-Key returned an existing job.

sampled
integer

sample only.

entity_ids
string[]

sample only: the entity ids picked. Read each with GET /v2/entities/user/{entity_id}/profile/.