Discovery

Read everything your organization holds, for retention, eDiscovery and data-loss prevention.

Discovery reads what the servers hold regardless of who in the organization may open it, and leaves nothing out because it was deleted: a deleted record is answered marked deleted, a deleted message keeps its text, and a deleted file still downloads. It changes nothing.

  • Every endpoint needs a token with the discovery scope. See Tokens.
  • Lists page with limit and cursor. See Paging.
  • Each request is recorded in the audit log as discovery.read, with the path read.

To archive an organization, list its resources, read each one's records, messages and files, then each person's direct messages. To stay current afterwards, follow the audit log and re-read what its events name.

Base URL
https://tensorworks.net/enterprise/v1

GET /organization

Organization

The organization the token belongs to.

Returns

id string
The organization’s id.
name string
Its name.
owner_id string
The account that owns it.
plan string
enterprise.
created_at string
When it was created.
domains string[]
Its verified email domains.
GET /organization
curl "https://tensorworks.net/enterprise/v1/organization" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": {
    "id": "2f9b…",
    "name": "Acme",
    "owner_id": "8c1d…",
    "plan": "enterprise",
    "created_at": "2026-03-02T09:14:07.220Z",
    "domains": [
      "acme.com"
    ]
  }
}

GET /users

Users

Everyone on the organization's team or once on it, in the order they were added. People who were removed stay listed with status removed.

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only people invited at or after this time.
latest string
Only people invited at or before this time.

Returns, for each user

id string | null
Their account id. Null for someone invited who has no account yet.
email string
Their email address.
name string
Their name.
role string
owner, admin, limited-admin, member (full access) or limited.
status string
active, invited or removed.
directory boolean
Whether directory sync manages them.
invited_at string
When they were added or invited.
joined_at string | null
When they joined. Null while invited, a person invited again after being removed too.
memberships object[]
Each time they were on the team, oldest first: joined_at and left_at (null for the time they are on it now). Someone removed and invited again has several. Their sessions and direct messages are answered only from within these.
GET /users
curl "https://tensorworks.net/enterprise/v1/users" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": [
    {
      "id": "8c1d…",
      "email": "dana@acme.com",
      "name": "Dana Ortiz",
      "role": "owner",
      "status": "active",
      "directory": false,
      "invited_at": "2026-03-02T09:14:07.220Z",
      "joined_at": "2026-03-02T09:14:07.220Z",
      "memberships": [
        {
          "joined_at": "2026-03-02T09:14:07.220Z",
          "left_at": null
        }
      ]
    }
  ],
  "next_cursor": null
}

GET /users/{user}/sessions

Sessions

The browser sessions a person signed in with while they were on the organization's team, oldest first. {user} is their account id.

Only sessions begun within one of the person's memberships are answered: none from before they joined or after they were removed or left, and none of someone invited who never joined (404).

A session's id is what every audit event carries as session. The IP address and browser are recorded once, at sign-in, so look a session up here to learn where any action came from.

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.

Returns, for each session

id string
The session’s id, as audit events name it.
created_at string
When the person signed in.
method string
How the sign-in was proven: password, code (a two-factor code), passkey, sso, or registration for a new account.
ip string | null
The IP address it began from.
user_agent string
The browser’s User-Agent header, up to 256 characters.
browser string
The browser’s name, such as Chrome.
expires_at string
When it lapses: seven days after sign-in.
ended_at string | null
When it ended. Null while it is live.
end_reason string | null
signed_out, password_changed (a new password ends every other session) or expired.
GET /users/{user}/sessions
curl "https://tensorworks.net/enterprise/v1/users/$USER/sessions" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": [
    {
      "id": "b7e4…",
      "created_at": "2026-11-10T13:58:02.101Z",
      "method": "sso",
      "ip": "198.51.100.7",
      "user_agent": "Mozilla/5.0 …",
      "browser": "Chrome",
      "expires_at": "2026-11-17T13:58:02.101Z",
      "ended_at": "2026-11-10T18:20:44.019Z",
      "end_reason": "signed_out"
    }
  ],
  "next_cursor": null
}

GET /agents

Agents

The organization's AI agents, removed ones too.

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.

Returns, for each agent

id string
The agent’s id, as audit events name it.
name string
Its name.
connection string
oauth for one a person connected, link for one made with an agent link.
created_by string | null
The account that added it.
status string
active or removed.
created_at string
When it was added.
GET /agents
curl "https://tensorworks.net/enterprise/v1/agents" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"

GET /projects

Projects

Every project, archived ones too. The organization's home, which holds the resources outside any project, is listed first under the organization's own id with home true.

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.

Returns, for each project

id string
The project’s id.
name string
Its name.
parent_id string | null
The project it is a subproject of.
home boolean
True for the organization’s home.
archived_at string | null
When it was archived.
created_at string | null
When it was created. Null for the home.
GET /projects
curl "https://tensorworks.net/enterprise/v1/projects" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"

GET /resources

Resources

Every resource of every project, archived ones too: boards, chatrooms, document repositories, calendars, websites, domains and phone numbers.

Query

kind string
Only resources of this kind: board, chat, documents, website, calendar, domains or phones.
project string
Only resources of this project.
limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.

Returns, for each resource

id string
The resource’s id.
kind string
Its kind.
name string
Its name.
project_id string
The project it is in.
archived_at string | null
When it was archived.
created_at string
When it was created.
List chatrooms
curl "https://tensorworks.net/enterprise/v1/resources?kind=chat" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": [
    {
      "id": "c05e…",
      "kind": "chat",
      "name": "General",
      "project_id": "2f9b…",
      "archived_at": null,
      "created_at": "2026-03-02T09:14:08.412Z"
    }
  ],
  "next_cursor": null
}

GET /resources/{resource}

One resource

One resource, with the collections it holds and how many records each has, deleted ones counted. Use the collection names with Records.

Returns

id, kind, name, project_id, archived_at, created_at
As in the list of resources.
collections object
Each collection’s name and its number of records.
GET /resources/{resource}
curl "https://tensorworks.net/enterprise/v1/resources/$BOARD" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": {
    "id": "a91f…",
    "kind": "board",
    "name": "Roadmap",
    "project_id": "5d20…",
    "archived_at": null,
    "created_at": "2026-04-11T10:02:55.007Z",
    "collections": {
      "card_events": 214,
      "cards": 58,
      "columns": 4
    }
  }
}

GET /resources/{resource}/records

Records

One collection of a resource in full, in the collection's own order: a board's cards, columns and card_events, a calendar's events, a phone line's calls and texts, a domain's dns_records, and so on, as the resource lists them.

A record's fields are as they are now. What a field held before its last change is not kept: the audit log records that it changed, by whom and when. For chat, Messages answers the full history of each message instead.

Query

collection string Required
The collection to read, one of those the resource lists.
limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.

Returns, for each record

id string
The record’s id.
order string
Its place in the collection. Opaque.
created_at string
When it was created.
updated_at string
When it was last written.
deleted boolean
Whether it was deleted. A deleted record is still answered.
fields object
Its fields as they are now.
Read a board's cards
curl "https://tensorworks.net/enterprise/v1/resources/$BOARD/records?collection=cards" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": [
    {
      "id": "6be2…",
      "order": "0000019a…",
      "created_at": "2026-10-28T08:40:12.530Z",
      "updated_at": "2026-11-09T16:22:03.914Z",
      "deleted": false,
      "fields": {
        "title": "Launch checklist",
        "column_id": "0c7a…",
        "position": "a1",
        "assignee_id": "8c1d…"
      }
    }
  ],
  "next_cursor": null
}

GET /resources/{resource}/messages

Messages

A chatroom's messages, threads included, oldest first. Each is answered as it was sent, with every edit made since, how it reads now, and whether and when it was deleted.

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.

Returns, for each message

id string
The message’s id.
order string
Its place in the conversation. Opaque; sorts as the list does.
created_at string
When it was sent.
thread_id string | null
The message it replies to, for a message in a thread.
sender object
user_id for a person or agent_id for an agent, and the name shown when it was sent.
body string
The text as it was first sent.
mentions string[]
Ids of the people and agents it mentioned.
channel boolean
Whether it mentioned everyone with @channel.
edits object[]
Every edit since, in order: when (at) and the text it was changed to (body).
current_body string
The text as it reads now: the last edit, or body.
deleted boolean
Whether it was deleted. A deleted message keeps its text here.
deleted_at string | null
When it was deleted.
reactions object[]
Reactions standing now: emoji, user_id and at.
files object[]
Files it shared: hash, name and size. Download each through the conversation’s files.
GET /resources/{resource}/messages
curl "https://tensorworks.net/enterprise/v1/resources/$CHATROOM/messages" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
An edited, then deleted message
{
  "id": "41aa…",
  "order": "0000019a…",
  "created_at": "2026-11-10T14:03:22.480Z",
  "thread_id": null,
  "sender": {
    "user_id": "8c1d…",
    "agent_id": null,
    "name": "Dana Ortiz"
  },
  "body": "Ship it Friday",
  "mentions": [],
  "channel": false,
  "edits": [
    {
      "at": "2026-11-10T14:05:10.002Z",
      "body": "Ship it Monday"
    }
  ],
  "current_body": "Ship it Monday",
  "deleted": true,
  "deleted_at": "2026-11-10T15:11:45.300Z",
  "reactions": [
    {
      "emoji": "👍",
      "user_id": "77b0…",
      "at": "2026-11-10T14:04:01.118Z"
    }
  ],
  "files": [
    {
      "hash": "9f86d0…",
      "name": "plan.pdf",
      "size": 482113
    }
  ]
}

GET /resources/{resource}/files

Files

The files a resource holds, deleted ones too: a document repository's files, a board's card attachments, and the files shared in a chatroom.

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.

Returns, for each file

hash string
The SHA-256 of the file’s bytes, which names it.
order string
Its place in the list. Opaque.
name string
The file’s name.
size integer
Its size in bytes.
folder_id string | null
The folder it is in, if any.
uploaded_by string | null
The account that uploaded it.
created_at string
When it was uploaded.
deleted boolean
Whether it was deleted. A deleted file still downloads here.
GET /resources/{resource}/files
curl "https://tensorworks.net/enterprise/v1/resources/$FILES/files" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": [
    {
      "hash": "9f86d0…",
      "order": "0000019a…",
      "name": "plan.pdf",
      "size": 482113,
      "folder_id": null,
      "uploaded_by": "8c1d…",
      "created_at": "2026-11-10T14:03:20.115Z",
      "deleted": false
    }
  ],
  "next_cursor": null
}

GET /resources/{resource}/files/{hash}/content

File content

The file's bytes, decrypted, exactly as they were uploaded. Unlike the MCP API's file transfers, there is no envelope to open. A deleted file still downloads.

The response is application/octet-stream with the file's size as Content-Length and its name in Content-Disposition. Verify the download against hash, the SHA-256 of its bytes.

Download a file
curl "https://tensorworks.net/enterprise/v1/resources/$FILES/files/$HASH/content" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN" \
  -o plan.pdf
Verify it
test "$(sha256sum plan.pdf | cut -d" " -f1)" = "$HASH"

GET /users/{user}/conversations

Conversations

Whom a person has exchanged direct messages with, among the organization's people and agents. {user} is their account id.

Direct messages are read between two of the organization's own: people on its team now or before, and its agents. A conversation with someone outside the organization is not answered.

Direct messages belong to the two people, not to the organization, so only what they exchanged while both were on its team is answered: the times their memberships overlap. Messages from before either joined, or after either left, are not counted here nor answered below; two who were never on the team at once have no conversation (404).

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only conversations whose latest message is at or after this time.
latest string
Only conversations whose latest message is at or before this time.

Returns, for each conversation

with object
The other side: type (user or agent) and id.
messages integer
How many messages they exchanged, deleted ones counted.
latest_at string
When the latest was sent.
GET /users/{user}/conversations
curl "https://tensorworks.net/enterprise/v1/users/$USER/conversations" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
200 OK
{
  "data": [
    {
      "with": {
        "type": "user",
        "id": "77b0…"
      },
      "messages": 42,
      "latest_at": "2026-11-10T17:45:09.660Z"
    }
  ],
  "next_cursor": null
}

GET /conversations/{user}/{other}/messages

Direct messages

The direct messages between two of the organization's people or agents, in either order, answered as a chatroom's messages are: as sent, with edits and deletions.

Only messages sent while both were on the team are answered, each as it stood when the last of those times ended: an edit, deletion or reaction made later is left out.

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.
GET /conversations/{user}/{other}/messages
curl "https://tensorworks.net/enterprise/v1/conversations/$USER/$OTHER/messages" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"

GET /conversations/{user}/{other}/files

Direct message files

The files two people shared in direct messages, answered as a resource's files are. Download one from GET /conversations/{user}/{other}/files/{hash}/content, which answers as File content does. Only files shared while both were on the team are listed or downloaded.

Query

limit integer
Items per page, 1 to 1000. Default 100.
cursor string
The next_cursor of the page before, to read on from it.
oldest string
Only items dated at or after this ISO 8601 time.
latest string
Only items dated at or before this ISO 8601 time.
List the files
curl "https://tensorworks.net/enterprise/v1/conversations/$USER/$OTHER/files" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN"
Download one
curl "https://tensorworks.net/enterprise/v1/conversations/$USER/$OTHER/files/$HASH/content" \
  -H "Authorization: Bearer $TENSORWORKS_TOKEN" \
  -o shared.png

Questions or something missing? Contact us.