Share with a group or the organization
const url = 'https://api.asklucy.eu/v1/memory/share';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ids":["example"],"scope":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.asklucy.eu/v1/memory/share \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ids": [ "example" ], "scope": "example" }'Copies things from your own memory to a group you belong to or to the organization; yours stay as they are. Facts, entities and relations are copied straight away. Sharing a fact or a relation also shares the entities it points to (an entity already shared under the same name and type is reused). Sharing an entity shares it alone: name, type, aliases and summary, not its facts. A process becomes a new process in that scope whose first version is a proposal, with your current version’s content, until an admin accepts it. Sharing the same thing again returns the first copy.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Any unique string (a UUID works). Retries with the same key return the first result.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Facts, entities, relations or processes from your own scope.
org, or group:<groupId> for a group you belong to.
Example generated
{ "ids": [ "example" ], "scope": "example"}Responses
Section titled “Responses”Shared
object
One entry per thing shared, including the entities shared along with facts and relations.
object
Yours.
The copy in the target scope (an entity already there is reused); for a process, the new process.
copied for facts, entities and relations; proposed for a process, until an admin accepts it.
For a process, the proposal (its version 1).
What was shared, in words: a fact’s text, an entity’s name, a relation’s type, a process’s title.
Example
{ "shared": [ { "kind": "fact", "state": "copied" } ]}The request is invalid; errors lists what’s wrong.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
Missing, expired or invalid token.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
The token lacks the role this needs (…/errors/forbidden), or
memory is off for the organization or, in your own scope, for you
(…/errors/memory-disabled; getMemory says which).
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.
No such object in your organization.
RFC 9457 problem details.
object
For quota-exceeded, the window that is used up.
object
Null for a rolling window that hasn’t started.
organization when the organization’s budget is closer to running out than the member’s own limit.
Field-level problems (400 only).
object
JSON pointer into the request body.
Example
{ "type": "https://docs.asklucy.eu/errors/answer-in-progress", "quota": { "window": "five_hours", "limited_by": "personal", "request": { "status": "pending" } }}Headers
Section titled “Headers”Unique per request; quote it to support.