Zero-gate · self-serve · no sales call

Encryption API and SDKs

Encrypt your first record in 5 minutes.

SDKs for JavaScript, Python, Java and C. Add object-level encryption to your own application: data is encrypted where it is created, and its key is stored with XQ for the recipients you choose.

import { XQSDK, Authorize, CodeValidator, Encrypt }
  from "@xqmsg/jssdk-core";

const sdk = new XQSDK({
  XQ_API_KEY: process.env.XQ_API_KEY,
});

// 1. Authorize: XQ emails a PIN to this address
await new Authorize(sdk)
  .supplyAsync({ [Authorize.USER]: "me@example.com" });
// 2. Validate the PIN to get an access token
await new CodeValidator(sdk)
  .supplyAsync({ [CodeValidator.PIN]: pin });

// 3. Encrypt, then store the key with XQ
const aes = sdk.getAlgorithm("AES");
const { payload } = await new Encrypt(sdk, aes).supplyAsync({
  [Encrypt.TEXT]: "Quarterly results",
  [Encrypt.RECIPIENTS]: ["jane@example.com"],
  [Encrypt.EXPIRES_HOURS]: 24,
});
const token = payload[Encrypt.LOCATOR_KEY]; // key lookup

From zero to encrypted in four steps.

01

Create an application

Sign in at manage.xqmsg.com, open Applications, create an application and generate a General API key.

02

Authorize a user

Request access for an email address. XQ sends a PIN, and validating it returns an access token.

03

Encrypt and store the key

Encrypt the data locally, then store its key with XQ for the recipients and expiry you choose. XQ returns a locator token.

04

Decrypt

An authorized recipient uses the locator token to fetch the key and decrypt. Revoke the key at any time to cut off access.

Build with XQ: the short answers.

How do I get an XQ API key?

Sign in at manage.xqmsg.com, open Applications, create an application and generate a General API key. No sales call is required.

Which languages does the XQ SDK support?

XQ publishes SDKs for JavaScript (Node.js and the browser), Python, Java and C. The source for each is on GitHub.

Why do users authorize before encrypting?

XQ stores each key for specific recipients, so it needs to know who is storing a key and who is reading it. Authorization verifies an email address with a PIN and returns an access token, which the SDK uses when it stores or fetches keys.

Does my data pass through XQ when I use the SDK?

No. The SDK encrypts and decrypts locally, in the application or device where the data is. XQ stores and releases the keys; the data itself is never sent to XQ.

Can I use the XQ SDK in the browser?

Yes. The JavaScript SDK runs in the browser as well as in Node.js, so data can be encrypted before it is uploaded.

Get your API key.

No sales form and no call required. Create your account and start building.