Skip to main content
POST
/
v2
/
collections
cURL
curl "https://api.mem.ai/v2/collections" \
     --header "Content-Type: application/json" \
     --header "Authorization: Bearer $MEM_API_KEY" \
     --data '{
         "title": "Acme Corp",
     }'
{
  "created_at": "2025-04-11T04:47:14.457Z",
  "description": "Anything related to Acme Corp; a software company that provides a suite of tools for managing customer relationships.",
  "id": "5e29c8a2-c73b-476b-9311-e2579712d4b1",
  "request_id": "api-request-036ed6c7-de00-459f-a89b-43d26aafe522",
  "title": "Acme Corp",
  "updated_at": "2025-04-11T04:47:19.702Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
title
string
required

Title for the collection. Use a short, stable label suitable for navigation and search. Maximum: 1,000 characters (and no more than 1,000 UTF-8 bytes).

Maximum string length: 1000
Example:

"Acme Corp"

id
string<uuid> | null

Optional caller-provided UUID for the collection. If omitted, Mem generates a new UUID. If the provided ID already exists, this request behaves as an upsert for that collection ID.

description
string | null

Optional descriptive text for collection scope or intent. Maximum: 10,000 characters (and no more than 10,000 UTF-8 bytes).

Maximum string length: 10000
Example:

"Anything related to Acme Corp; a software company that provides a suite of tools for managing customer relationships."

created_at
string<date-time> | null

Optional creation timestamp (ISO 8601). Used only when this request creates a new collection ID. If omitted on create, Mem uses updated_at when provided; otherwise current server time. Ignored when the provided id already exists.

Example:

"2025-04-01T14:30:45Z"

updated_at
string<date-time> | null

Optional "last updated" timestamp for this write (ISO 8601). If omitted, new collections inherit created_at; existing collections use current server time. If provided, Mem uses this value even when the collection ID already exists.

Example:

"2025-04-02T09:15:22Z"

Response

200 - application/json

OK

request_id
string
required

Identifier for this API request. Useful for tracing and support.

id
string<uuid>
required

UUID of the created collection.

title
string
required

Current title of the collection.

description
string | null
required

Optional description text currently stored on the collection.

created_at
string<date-time>
required

Creation timestamp for the collection in ISO 8601 format.

updated_at
string<date-time>
required

Last modification timestamp for the collection in ISO 8601 format.