profiles

Generate profiles

Changed on

Start one generation. operation says what to build:

  • sample — up to 10 real entities, so a schema can be judged before it is used widely. These are real profiles: they are saved to those entities and count toward usage.
  • trigger — one entity, named by entity_id.

Send an Idempotency-Key header. Replaying the same key returns the same job instead of charging twice. Poll status_url from the response until the status is terminal.

post/v2/profiles/jobs/

Request

  • Base URL
    https://api.mem0.ai
  • URL
    https://api.mem0.ai/v2/profiles/jobs/
  • Auth
    API key in header Authorization

Headers

Idempotency-Keystring required

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

Request body

operation'sample' | 'trigger' required

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

entity_type'user' required
entity_idstring

One entity, for trigger.

limitinteger

How many entities to sample.

Response

Job accepted.

job_idstring
statusstring
status_urlstring

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

operationstring
entity_typestring
entity_count_reservedinteger

Entities reserved against usage for this job.

event_idstring nullable
replayedboolean

True when an Idempotency-Key returned an existing job.

sampledinteger

sample only.

entity_idsstring[]

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

Changes