### GET /api/v1/usage - 200 OK response Source: https://past.dev/docs/memory-api/api-reference Example JSON response for the usage endpoint. Shows the month window, balance, project usage, and metered flag. Note that 'metered' is false on deployments without a plan, and credit figures are null in that case. ```json { "month": { "from": "2026-09-01T00:00:00Z", "to": "2026-09-15T10:00:00Z", "resetsAt": "2026-10-01T00:00:00Z" }, "balance": { "left": 147340, "included": 150000, "bought": 0, "rolledOver": 0, "spent": 2660 }, "project": { "slug": "acme", "credits": 2660, "ingestions": 412, "recalls": 1804, "creditCap": null, "creditCapLeft": null, "ingestionCap": null, "ingestionCapLeft": null }, "metered": true } ``` -------------------------------- ### List projects response (200 OK) Source: https://past.dev/docs/memory-api/api-reference Example JSON response for the GET /api/v1/projects endpoint. Shows project fields including ingestionCap, creditCap, monthIngestions, and monthCredits. ```json { "projects": [ { "slug": "acme", "name": "Acme", "description": "", "isArchived": false, "memoryCount": 41, "ingestionCap": 50000, "monthIngestions": 1204, "creditCap": null, "monthCredits": 3610, "createdAt": "2026-09-15T10:00:00Z" } ] } ``` -------------------------------- ### GET /api/v1/trace/nodes/{id} - 200 OK response Source: https://past.dev/docs/memory-api/api-reference Example response for a source node. Shows fields like kind, headline, dataPointId, revision, timestamps, validity period, current status, input/output counts, and content truncation. ```json { "id": "b1c2d3e4-5f60-4a7b-8c9d-0e1f2a3b4c5d", "kind": "source", "headline": "Acme runs the pilot in Q4.", "memoryKind": null, "dataPointId": "call-8821", "revision": 1, "occurredAt": "2026-09-15T09:58:00Z", "createdAt": "2026-09-15T10:00:01Z", "readyAt": "2026-09-15T10:00:06Z", "validFrom": null, "validTo": null, "current": true, "replacedId": null, "inputCount": 0, "outputCount": 3, "phase": "indexed", "requestId": "req_7f3a9c21", "content": "Acme runs the pilot in Q4.", "contentTruncated": false } ``` -------------------------------- ### List requests response (200 OK) Source: https://past.dev/docs/memory-api/api-reference Example JSON response for the GET /api/v1/requests endpoint. Shows request details including status, outcome, credits, and ingestionId. ```json { "project": "acme", "from": "2026-09-14T10:00:00Z", "to": "2026-09-15T10:00:00Z", "totalCount": 1, "hasMore": false, "endCursor": null, "payloadRetentionDays": 30, "requests": [ { "requestId": "req_7f3a9c21", "receivedAt": "2026-09-15T10:00:00Z", "method": "POST", "path": "/api/v1/ingest", "status": 202, "errorCode": null, "outcome": "Accepted", "durationMs": 38, "key": { "name": "production", "prefix": "past_sk_9f26" }, "identity": null, "ingestionId": "7d9f2b6a-4c1e-4f8a-9b3d-2e5c8a1f6d40", "phase": "indexed", "credits": 12 } ] } ``` -------------------------------- ### Create project response (201 Created) Source: https://past.dev/docs/memory-api/api-reference Example JSON response for the POST /api/v1/projects endpoint. Shows the created project record with slug, name, and other fields. ```json { "slug": "acme", "name": "Acme", "description": "", "isArchived": false, "memoryCount": 0, "ingestionCap": null, "monthIngestions": 0, "creditCap": null, "monthCredits": 0, "createdAt": "2026-09-15T10:00:00Z" } ``` -------------------------------- ### GET /api/v1/usage Source: https://past.dev/docs/memory-api/authentication Retrieves usage information for the project. Requires the memory:read scope. ```APIDOC ## GET /api/v1/usage ### Description Retrieves usage information for the project. Requires the memory:read scope. ### Method GET ### Endpoint /api/v1/usage ### Response #### Success Response (200) - **usage** (object) - Usage details. #### Error Responses - **401 unauthorized** - Returned when the token is invalid or expired. - **403 insufficient-scope** - Returned when the token does not have the required scope. ``` -------------------------------- ### Get audience with cURL Source: https://past.dev/docs/memory-api/api-reference Sends a GET request to /api/v1/audiences/{slug} to fetch a single audience. Requires a project API key. The slug 'project' returns the default audience; an unknown slug returns 404 not-found. ```bash curl https://api.past.dev/api/v1/audiences/acme \ -H "Authorization: Bearer $PAST_API_KEY" ``` -------------------------------- ### List audiences response (200 OK) Source: https://past.dev/docs/memory-api/api-reference Example JSON response for the GET /api/v1/audiences endpoint. Shows the default 'project' audience first, followed by named audiences. Each audience includes fields like slug, name, kind, memberCount, memoryCount, reachesNobody, recomputedAt, createdAt, identities, and rule. ```json { "audiences": [ { "slug": "project", "name": "Project", "kind": "default", "memberCount": 14, "memoryCount": 320, "reachesNobody": false, "recomputedAt": null, "createdAt": "2026-08-01T00:00:00Z", "identities": null, "rule": null }, { "slug": "acme", "name": "Acme", "kind": "rule", "memberCount": 3, "memoryCount": 41, "reachesNobody": false, "recomputedAt": "2026-09-15T10:00:00Z", "createdAt": "2026-09-15T10:00:00Z", "identities": null, "rule": { "match": "all", "conditions": [ { "trait": "company", "operator": "is", "values": ["acme"] } ] } } ] } ``` -------------------------------- ### GET /api/v1/requests/histogram - 200 OK response Source: https://past.dev/docs/memory-api/api-reference Example response for the histogram endpoint. Shows the bucket interval (bucketMinutes: 60), totals per outcome, and a sample bucket with its start time and counts. ```json { "project": "acme", "from": "2026-09-14T00:00:00Z", "to": "2026-09-15T00:00:00Z", "bucketMinutes": 60, "totals": { "accepted": 412, "failedLater": 1, "rejected": 3 }, "buckets": [ { "start": "2026-09-14T00:00:00Z", "accepted": 17, "failedLater": 0, "rejected": 0 } ] } ``` -------------------------------- ### GET /api/v1/identities/{identity} - 200 OK response Source: https://past.dev/docs/memory-api/api-reference Example response for a successful get request. Includes the audiences array with the slugs the identity currently reaches. ```json { "identity": "dana@example.com", "traits": { "company": "acme", "team": "sales" }, "origin": "api", "lastSeenAt": "2026-09-15T09:58:00Z", "createdAt": "2026-09-15T10:00:00Z", "updatedAt": "2026-09-15T10:00:00Z", "audiences": ["project", "acme", "deal-4410"] } ``` -------------------------------- ### Create project with cURL Source: https://past.dev/docs/memory-api/api-reference Creates a project. Requires the management key. Returns 201 with the project record. A project past the plan's count returns 402 project-limit-reached. ```bash curl -X POST https://api.past.dev/api/v1/projects \ -H "Authorization: Bearer $PAST_MANAGEMENT_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme" }' ``` -------------------------------- ### Create project and project key with management key (cURL) Source: https://past.dev/docs/memory-api/access-control Creates a project named 'Acme' and then mints a project key for it. The second response contains the clear value of the key, which is only returned once. The project slug 'acme' is derived from the name and never changes. ```bash curl -X POST https://api.past.dev/api/v1/projects \ -H "Authorization: Bearer $PAST_MANAGEMENT_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme" }' curl -X POST https://api.past.dev/api/v1/projects/acme/keys \ -H "Authorization: Bearer $PAST_MANAGEMENT_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme production" }' ``` -------------------------------- ### GET /api/v1/identities - 200 OK response Source: https://past.dev/docs/memory-api/api-reference Example response for a successful list request. Shows the identities array, hasMore flag, and endCursor. ```json { "identities": [ { "identity": "dana@example.com", "traits": { "company": "acme", "team": "sales" }, "origin": "api", "lastSeenAt": "2026-09-15T09:58:00Z", "createdAt": "2026-09-15T10:00:00Z", "updatedAt": "2026-09-15T10:00:00Z", "audiences": null } ], "hasMore": false, "endCursor": null } ``` -------------------------------- ### GET /api/v1/trace/lineage/{rootId} - 200 OK response Source: https://past.dev/docs/memory-api/api-reference Example response for the lineage endpoint. Shows the root node, a list of nodes, edges indicating derivation, and hiddenCount. ```json { "root": { "id": "b1c2d3e4-5f60-4a7b-8c9d-0e1f2a3b4c5d", "kind": "source", "headline": "Acme runs the pilot in Q4." }, "nodes": [ { "id": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d", "kind": "memory", "memoryKind": "claim", "headline": "Acme's pilot runs in Q4." } ], "edges": [ { "inputId": "b1c2d3e4-5f60-4a7b-8c9d-0e1f2a3b4c5d", "derivedId": "9a8b7c6d-5e4f-4a3b-2c1d-0e9f8a7b6c5d" } ], "hiddenCount": 0 } ``` -------------------------------- ### Mint project key response (201 Created) Source: https://past.dev/docs/memory-api/api-reference Example JSON response for the POST /api/v1/projects/{slug}/keys endpoint. Shows the key record with id, keyPrefix, keySuffix, and the clear key value. ```json { "id": "k7Qx2", "name": "Acme production", "keyPrefix": "past_sk_7f", "keySuffix": "3d9a", "createdAt": "2026-09-15T10:00:00Z", "key": "past_sk__" } ``` -------------------------------- ### Cursor MCP configuration (mcp.json) Source: https://past.dev/docs/mcp/quickstart Add this JSON to ~/.cursor/mcp.json for all projects or .cursor/mcp.json inside one project. Cursor prompts you to sign in the first time it connects. ```json { "mcpServers": { "past": { "url": "https://app.past.dev/mcp" } } } ``` -------------------------------- ### POST /api/v1/projects Source: https://past.dev/docs/memory-api/api-reference Creates a new project. Requires a management key. Returns 201 with the project record. The slug is derived from the name and should be read from the response. ```APIDOC ## POST /api/v1/projects ### Description Create a project. Management key. Returns `201` with the project record. The slug is the name in lowercase with dashes for spaces and punctuation; read it from the response, since it never changes. A project past the plan's count, archived projects included, returns `402 project-limit-reached`. ### Method POST ### Endpoint /api/v1/projects ### Authentication Management key (Authorization: Bearer $PAST_MANAGEMENT_KEY) ### Parameters #### Request Body - **name** (string) - Required - Display name, up to 255 characters with at least two letters or digits. Anything else returns `400 project-name-invalid`. ### Request Example ``` curl -X POST https://api.past.dev/api/v1/projects \ -H "Authorization: Bearer $PAST_MANAGEMENT_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme" }' ``` ### Response #### Success Response (201) - **slug** (string) - Project slug. - **name** (string) - Project name. - **description** (string) - Project description. - **isArchived** (boolean) - Whether the project is archived. - **memoryCount** (integer) - Number of memories. - **ingestionCap** (integer|null) - Monthly ingestion cap. - **monthIngestions** (integer) - Current month ingestions. - **creditCap** (integer|null) - Monthly credit cap. - **monthCredits** (integer) - Current month credits. - **createdAt** (string) - Creation timestamp. #### Response Example ``` { "slug": "acme", "name": "Acme", "description": "", "isArchived": false, "memoryCount": 0, "ingestionCap": null, "monthIngestions": 0, "creditCap": null, "monthCredits": 0, "createdAt": "2026-09-15T10:00:00Z" } ``` ### Error Handling - `400 project-name-invalid` - Invalid name. - `402 project-limit-reached` - Project limit reached. ``` -------------------------------- ### 202 Accepted response example Source: https://past.dev/docs/memory-api/api-reference Example response when the event is ingested. requestId is the value of the X-Request-Id header. dataPointId is the mapped id, or eventId when the webhook maps none, and ingestionId is the id that GET /api/v1/ingest/{ingestionId} takes. On a dropped event, droppedBy names the filter or the missing content, and ingestionId, dataPointId and unchanged are null. ```json { "eventId": "evt_k3m7q2xw5n6r4t2v", "requestId": "req_h3k7m2qx5nwr", "verdict": "ingested", "droppedBy": null, "ingestionId": "7d9f2b6a-4c1e-4f8a-9b3d-2e5c8a1f6d40", "dataPointId": "SUP-1042", "unchanged": null } ``` -------------------------------- ### GET /api/v1/ingest/{ingestionId} - 200 OK response Source: https://past.dev/docs/memory-api/api-reference Example response when the send is still processing. The status field can be 'processing', 'completed', or 'failed'. The readiness object shows counts for each stage. 'failure' is null for non-failed statuses. ```json { "status": "processing", "settled": false, "blocked": false, "readiness": { "raw": 3, "comprehension": 1, "consolidation": 0, "failed": 0 }, "failure": null } ``` -------------------------------- ### Explain ingestion response (200 OK) Source: https://past.dev/docs/memory-api/api-reference Example JSON response from the explain endpoint. Shows the ingestion phase as 'indexed', a null failure, and an item with its sourceId. The 'next' field provides a human-readable instruction. ```json { "ingestionId": "7d9f2b6a-4c1e-4f8a-9b3d-2e5c8a1f6d40", "requestId": "req_7f3a9c21", "status": 202, "errorCode": null, "acceptedAt": "2026-09-15T10:00:00Z", "settledAt": "2026-09-15T10:00:42Z", "phase": "indexed", "failure": null, "items": [ { "dataPointId": "call-8821", "revision": 1, "status": "created", "searchable": true, "memories": 3, "sourceId": "b1c2d3e4-5f60-4a7b-8c9d-0e1f2a3b4c5d" } ], "itemsOmitted": 0, "credits": 12, "next": "Nothing to fix: the content is searchable and its memories are ready. Read a source's lineage to see them." } ``` -------------------------------- ### Create fixed audience, ingest data point, and recall as user (cURL) Source: https://past.dev/docs/memory-api/access-control Creates a fixed audience 'acme' listing two identities, sends a data point with that audience, and recalls as one of the listed users. Users not in the audience only see project-visible memory. ```bash curl -X PUT https://api.past.dev/api/v1/audiences/acme \ -H "Authorization: Bearer $PAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "kind": "fixed", "name": "Acme", "identities": ["sam@acme.example", "ada@acme.example"] }' curl -X POST https://api.past.dev/api/v1/ingest \ -H "Authorization: Bearer $PAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": "support-2026-04-02-ada", "content": "Ada asked whether the export runs on projects over 50,000 rows. Sam confirmed the fix ships on April 9.", "label": "Support conversation", "timestamp": "2026-04-02T09:15:00Z", "audience": "acme" }' curl -X POST https://api.past.dev/api/v1/recall \ -H "Authorization: Bearer $PAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "query": "When does the export fix ship?", "identity": "ada@acme.example" }' ``` -------------------------------- ### create_api_key Source: https://past.dev/docs/mcp/tools Mints a project key. The clear value is in the result. The tool description tells the assistant to hand the value back to you and put it nowhere else. Store it in your secret store, and revoke it with revoke_api_key if it reaches a transcript you do not control. ```APIDOC ## create_api_key ### Description Mints a project key. The clear value is in the result. The tool description tells the assistant to hand the value back to you and put it nowhere else. Store it in your secret store, and revoke it with revoke_api_key if it reaches a transcript you do not control. ### Method write ### Parameters - **project_id** (string) - Required - The project to create the key for. ### Response - **api_key** (string) - The clear value of the key. Handle as a secret. ### Notes - Not destructive, but the key is a secret. ``` -------------------------------- ### Error response JSON body example Source: https://past.dev/docs/memory-api/errors Example of the JSON error body returned for a 400 Bad Request, showing the fields code, status, debugMessage, and data. ```json { "code": "content-required", "status": 400, "debugMessage": "Content is required", "data": null } ``` -------------------------------- ### get_credit_balance Source: https://past.dev/docs/mcp/tools Returns the credits left, what the month included and bought with the day the bought ones lapse, the reset date, and one project's month: credits spent, ingestions, recalls, and what is left of its caps. Answers a send refused with 402 out-of-credits or 429 project-cap-reached. ```APIDOC ## get_credit_balance ### Description Returns the credits left, what the month included and bought with the day the bought ones lapse, the reset date, and one project's month: credits spent, ingestions, recalls, and what is left of its caps. Answers a send refused with 402 out-of-credits or 429 project-cap-reached. ### Method read ### Parameters - **project_id** (string) - Required - The project to query. ### Response - **credits_left** (number) - Credits remaining. - **month_included** (number) - Credits included in the month. - **month_bought** (number) - Credits bought. - **bought_lapse_date** (date) - Day the bought credits lapse. - **reset_date** (date) - The reset date. - **project_month** (object) - Credits spent, ingestions, recalls, and remaining caps for the project. ### Notes - Project Read permission required. ``` -------------------------------- ### Good example: raw chat log text with header and speaker/time lines Source: https://past.dev/docs/memory-api/sending-data Shows the recommended format for a chat log data point: a header line naming the channel and day, followed by lines with time, speaker, and message. Keep the text raw and complete, with speaker and time on each message. ```plaintext #support, 2026-04-02 [09:15] Ada (Acme): Does the export run on projects over 50,000 rows? [09:21] Sam (Tamtam): It fails today on the migration step. The fix ships on April 9. [09:22] Ada (Acme): Thanks. Finance needs the quarterly export on April 12. ``` -------------------------------- ### 200 OK response for estimate request Source: https://past.dev/docs/memory-api/api-reference Example response from the estimate endpoint. Shows the detected file kind, data point count, credits, batch details with idempotency key, and balance information. The response indicates the request fits within credits and the time zone used. ```json { "files": [ { "path": "support/acme.md", "kind": "documentation", "detectedBy": "extension .md", "points": 1, "bytes": 42, "credits": 1, "skipped": null } ], "dataPoints": 1, "bytes": 42, "credits": 1, "batches": [ { "index": 0, "from": 0, "to": 0, "points": 1, "bytes": 42, "credits": 1, "idempotencyKey": "import-9f26c1-0" } ], "points": [ { "id": "file:support/acme.md#1", "kind": "documentation", "path": "support/acme.md", "label": "Onboarding", "timestamp": null, "identity": null, "audience": null, "bytes": 42, "credits": 1, "preview": "Onboarding. Acme runs the pilot in Q4.", "content": null, "metadata": null } ], "pointsOmitted": 0, "balance": { "left": 27340, "resetsAt": "2026-10-01T00:00:00Z", "projectCapLeft": null, "ingestionCapReached": false }, "fits": true, "fitsFirst": 1, "metered": true, "timeZone": "Europe/Paris" } ``` -------------------------------- ### GET /api/v1/identities Source: https://past.dev/docs/memory-api/authentication Lists identities associated with the project. Requires the memory:read scope. ```APIDOC ## GET /api/v1/identities ### Description Lists identities associated with the project. Requires the memory:read scope. ### Method GET ### Endpoint /api/v1/identities ### Response #### Success Response (200) - **identities** (array) - List of identity objects. #### Error Responses - **401 unauthorized** - Returned when the token is invalid or expired. - **403 insufficient-scope** - Returned when the token does not have the required scope. ``` -------------------------------- ### 200 OK response for POST /api/v1/recall Source: https://past.dev/docs/memory-api/api-reference Example response showing the recall results with asOf, usedEvidenceTokens, and results array containing document details, artifact, and sources. ```json { "asOf": "2026-09-22T10:00:00Z", "usedEvidenceTokens": 18, "results": [ { "id": "39d9d745-c9f4-4884-a602-e538def76815", "rank": 1, "occurredAt": "2026-07-28T16:00:00Z", "content": "Acme pilot budget: currently 40k.", "artifact": { "id": "9f74f854-d11d-4bc4-bf68-5b2012ac9c15", "kind": "claim", "occurredAt": "2026-07-28T16:00:00Z" }, "sources": [ { "sourceId": "call-8821", "occurredAt": "2026-07-28T16:00:00Z", "label": "Email from Nadia", "excerpts": [ "Budget for the Acme pilot moved to 40k." ] } ] } ] } ``` -------------------------------- ### GET /api/v1/identities/{identity} Source: https://past.dev/docs/memory-api/authentication Retrieves a specific identity by its identifier. Requires the memory:read scope. ```APIDOC ## GET /api/v1/identities/{identity} ### Description Retrieves a specific identity by its identifier. Requires the memory:read scope. ### Method GET ### Endpoint /api/v1/identities/{identity} ### Parameters #### Path Parameters - **identity** (string) - Required - The identity identifier. ### Response #### Success Response (200) - **identity** (object) - The identity details. #### Error Responses - **401 unauthorized** - Returned when the token is invalid or expired. - **403 insufficient-scope** - Returned when the token does not have the required scope. ``` -------------------------------- ### Mint project key with cURL Source: https://past.dev/docs/memory-api/api-reference Mints a project key for a specific project. Requires the management key. Returns 201 with the key record; the clear key value is returned only in this response. ```bash curl -X POST https://api.past.dev/api/v1/projects/acme/keys \ -H "Authorization: Bearer $PAST_MANAGEMENT_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme production" }' ``` -------------------------------- ### GET /api/v1/ingest/{ingestionId} Source: https://past.dev/docs/memory-api/authentication Retrieves the status or details of a specific ingestion job. Requires the memory:read scope. ```APIDOC ## GET /api/v1/ingest/{ingestionId} ### Description Retrieves the status or details of a specific ingestion job. Requires the memory:read scope. ### Method GET ### Endpoint /api/v1/ingest/{ingestionId} ### Parameters #### Path Parameters - **ingestionId** (string) - Required - The unique identifier of the ingestion job. ### Response #### Success Response (200) - **ingestion** (object) - The ingestion job details. #### Error Responses - **401 unauthorized** - Returned when the token is invalid or expired. - **403 insufficient-scope** - Returned when the token does not have the required scope. ``` -------------------------------- ### POST /api/v1/projects/{slug}/keys Source: https://past.dev/docs/memory-api/api-reference Mints a new project key for a specific project. Requires a management key. Returns 201 with the key record, including the clear key value which is only shown once. ```APIDOC ## POST /api/v1/projects/{slug}/keys ### Description Mint a project key for one project. Management key. Returns `201` with the key record; `key` is the clear value, returned in this response only. The console can reveal it again. A slug the organization does not hold returns `404 not-found`. ### Method POST ### Endpoint /api/v1/projects/{slug}/keys ### Authentication Management key (Authorization: Bearer $PAST_MANAGEMENT_KEY) ### Parameters #### Path Parameters - **slug** (string) - Required - The project slug. #### Request Body - **name** (string) - Required - Key name, 1 to 64 characters. Anything else returns `400 key-name-invalid`. ### Request Example ``` curl -X POST https://api.past.dev/api/v1/projects/acme/keys \ -H "Authorization: Bearer $PAST_MANAGEMENT_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Acme production" }' ``` ### Response #### Success Response (201) - **id** (string) - Key ID. - **name** (string) - Key name. - **keyPrefix** (string) - Key prefix. - **keySuffix** (string) - Key suffix. - **createdAt** (string) - Creation timestamp. - **key** (string) - The clear key value, returned only in this response. #### Response Example ``` { "id": "k7Qx2", "name": "Acme production", "keyPrefix": "past_sk_7f", "keySuffix": "3d9a", "createdAt": "2026-09-15T10:00:00Z", "key": "past_sk__" } ``` ### Error Handling - `400 key-name-invalid` - Invalid key name. - `404 not-found` - Project slug not found. ```