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 returns a conflict.

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). If provided, it must include a timezone offset and cannot be in the future. If omitted, Mem uses updated_at when provided; otherwise current server time.

Example:

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

updated_at
string<date-time> | null

Optional "last updated" timestamp for this write (ISO 8601). If provided, it must include a timezone offset and cannot be in the future. If omitted, Mem uses created_at for the initial collection write.

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.