Skip to content

Read a memory

GET
/v1/spaces/{space_id}/memories/{memory_id}
curl --request GET \
--url https://api.metaphorlabs.io/v1/spaces/personal/memories/4f1c9a7e2b8d06c3a5e9f17b20d4c8e6 \
--header 'Authorization: Bearer <token>' \
--header 'metaphor-user: customer-4821'

Needs memories:read. A memory the acting user can neither see nor wrote answers as if it did not exist. So does one that was forgotten or that a newer one replaced, though a recall line about an earlier version can still name a replaced memory’s ID.

space_id
required

personal for the acting user’s own space, or a shared space’s ID: 1 to 63 lowercase letters, digits and hyphens, starting with a letter or digit. personal always answers: before the user’s first write it holds nothing.

string
/^[a-z0-9][a-z0-9-]{0,62}$/

Example

personal

personal for the acting user’s own space, or a shared space’s ID: 1 to 63 lowercase letters, digits and hyphens, starting with a letter or digit. personal always answers: before the user’s first write it holds nothing.

memory_id
required

A memory’s ID, made from its source with a key of its space’s own. The same source gets a different ID in every space, and an ID names a memory only within its space. A write answers with it.

string
/^[0-9a-f]{32}$/

Example

4f1c9a7e2b8d06c3a5e9f17b20d4c8e6

A memory’s ID, made from its source with a key of its space’s own. The same source gets a different ID in every space, and an ID names a memory only within its space. A write answers with it.

metaphor-user

A member’s ID, which Metaphor issued and which starts with metaphor:, or your own ID for an end user: 1 to 256 visible ASCII characters but " and \, not starting with metaphor:. Metaphor keeps an end user’s ID as you send it only on a key held to that user. A service user’s ID is issued by Metaphor, so it starts with metaphor: too.

string
>= 1 characters <= 256 characters /^[!#-[\]-~]+$/

Example

customer-4821

The user this request acts for. Required for a key of your own server; a key held to a user may leave it out, or send that user’s ID. A server key acts for a member only where the owner turned that on for the project, and each such request is recorded.

The memory.

Media typeapplication/json
object
id
required

A memory’s ID, made from its source with a key of its space’s own. The same source gets a different ID in every space, and an ID names a memory only within its space. A write answers with it.

string
/^[0-9a-f]{32}$/
content
required
string
source
required
object
name
required

The source’s name, as it was written. Null for a memory written before sources were kept, or written from the console’s playground.

string | null
id
required

The item’s ID at the source, as it was written. It is kept with the memory and erased with it. Null when name is.

string | null
url
required
string | null
author
required
object
user_id
required

Null when the author is an end user other than the acting user: Metaphor keeps no other end user’s ID as you send it, so it has none to show.

string | null
agent
required

The agent that wrote it, if any.

string | null
audience
required

Who may see it. An entry naming an end user other than the acting user is left out, for the same reason.

Array<string>
audience_omitted
required

How many entries were left out of audience.

integer
occurred_at
required
string format: date-time
received_at
required
string format: date-time
status
required

stored: kept. It is the one value served today, and does not say whether the memory is ready for recall. Other values may be added.

string
last_recalled_at
required

When a recall last returned it, to the minute. Null when none has in the last 90 days. Forgetting it clears this, and an undo does not bring it back.

string | null format: date-time

Example

{
"id": "4f1c9a7e2b8d06c3a5e9f17b20d4c8e6",
"occurred_at": "2027-01-31T09:30:00Z",
"received_at": "2027-01-31T09:30:00Z",
"last_recalled_at": "2027-01-31T09:30:00Z"
}

The request is not valid, or names no user to act for.

Media typeapplication/json
object
error
required
object
code
required

One of ErrorCode, or a code added since. Treat a code you do not know by its status.

string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

No valid API key was sent.

Media typeapplication/json
object
error
required
object
code
required

One of ErrorCode, or a code added since. Treat a code you do not know by its status.

string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The API key does not allow this, or not for this user.

Media typeapplication/json
object
error
required
object
code
required

One of ErrorCode, or a code added since. Treat a code you do not know by its status.

string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

not-found: no such memory, or no such shared space. not-ready: the memory was accepted and is waiting to be written; read it again in a few seconds. not-saved: the memory was accepted but could not be written in 24 hours, so it was dropped and nothing of it is kept; write it again. not-saved is answered for 31 days, then not-found.

Media typeapplication/json
object
error
required
object
code
required

One of ErrorCode, or a code added since. Treat a code you do not know by its status.

string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

user-erased: the acting user was erased after the request was let in. Nothing was done. space-refused: the space cannot be served as it stands. Nothing was done. Sending the request again will not help.

Media typeapplication/json
object
error
required
object
code
required

One of ErrorCode, or a code added since. Treat a code you do not know by its status.

string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The API key sent more than 600 requests in a minute, the user’s keys together more than 2000, or the tenant’s keys together more than 6000. Wait the seconds Retry-After gives.

Media typeapplication/json
object
error
required
object
code
required

One of ErrorCode, or a code added since. Treat a code you do not know by its status.

string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

Something went wrong. Try again.

Media typeapplication/json
object
error
required
object
code
required

One of ErrorCode, or a code added since. Treat a code you do not know by its status.

string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

The request could not be checked. Try again.

Media typeapplication/json
object
error
required
object
code
required

One of ErrorCode, or a code added since. Treat a code you do not know by its status.

string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}