> For the complete documentation index, see [llms.txt](https://docs.learncard.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.learncard.com/reference/learncloud-storage-api.md).

# Storage API

{% hint style="info" %}
**Looking for endpoints?** The full OpenAPI spec is rendered in the sidebar below this section's pages — one page per resource (Storage, Index, User, …) with request and response models. Base URL: `https://cloud.learncard.com/api`.
{% endhint %}

**LearnCloud Storage** is LearnCard's end-to-end encrypted storage system. It holds a user's *personal* data — their credentials, presentations, and learning records — encrypted client-side, so not even LearnCard servers can read it.

{% hint style="info" %}
**Storage API vs Network API**: the [Network API](/reference/learncard-network.md) handles *interactions between parties* (sending credentials, profiles, boosts, consent). The Storage API handles a *single user's private data* (their wallet contents and xAPI learning records). Most integrations that send credentials only need the Network API.
{% endhint %}

**Use the Storage API when you need to:**

* Store credentials and presentations securely and sync them across devices
* Record and query [xAPI learning statements](/reference/learncloud-storage-api/xapi-reference.md) ("Alice completed Lesson 3") tied to a user's DID
* Swap in your own storage backend while keeping the same interface

```typescript
import { initLearnCard } from '@learncard/init';

const learnCard = await initLearnCard({ seed: process.env.SEED, network: true });

const uri = await learnCard.store.LearnCloud.uploadEncrypted(credential);
const ids = await learnCard.index.LearnCloud.get({ category: 'Achievement' });
```

#### Key Features <a href="#key-features" id="key-features"></a>

* **xAPI Integration**: Track and store learning experiences
* **OIDC Authentication**: Provide OpenID Connect authentication
* **DID Web Resolution**: Resolve DIDs for identity management
* **End-to-End Encryption:** Data is encrypted client-side.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.learncard.com/reference/learncloud-storage-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
