Getting started
Welcome to Context Protocol.
Introduction
The Context SDK is a robust and flexible toolkit designed for developers to interact programmatically with Context Protocol. It allows for efficient management of your Documents through Context's API, streamlining operations such as creation, modification, and fetching data.
Installation
Install the Context SDK to your TypeScript project using npm:
Quick Start
This guide provides the basic steps to establish a connection and perform common operations using the Context SDK.
Setting Up Your Connection
To use the Context SDK, you first need to obtain an API key. You can get your API key by creating an account at app.ctx.xyz.
Initialize the SDK with your API key to start interacting with Context services:
Working with Domains
Fetch Domain Information
Fetch details of a specific domain or the default domain associated with your API key:
Domain properties
Managing Documents
Fetch Documents
Fetch a specific document, from any domain:
Document Properties
Access and display properties of a document:
List Document Versions
Fetch a list of all versions of a document:
Fetch a Specific Document Version
Fetch a specific version of a document:
Create a Document
Steps to create a new document within your domain:
Update a Document
Update an existing document:
Creating Templates
Define a JSON Schema for a Template
Create a JSON schema directly or from a TypeScript interface:
Create a new Template
Use the defined schema to create a new template:
Uploading Assets
If you want to upload an asset to Contexts, you have to upload it as follows:
Create your first Domain
We are scheduled to launch on Mainnet in the coming weeks. If you are interested in becoming one of our early users, we encourage you to create your initial domain on our Beta using the WebApp.
For inquiries about creating a premium and verified domain, please contact us at support@ctx.xyz
Last updated