Skip to content
API Reference

Encrypted object

Encrypted object in the Paycux API: the endpoints, the fields they accept and return, and a working request in three languages.

Overview

The Encrypted object resource is part of the Paycux API. Every field below is returned on every representation of the object, so you can rely on its shape across list, read and write calls.

FieldTypeNotes
idstringStable identifier, prefixed per resource type.
objectstringThe resource name, useful when handling webhook payloads.
created_attimestampISO 8601, always UTC.
updated_attimestampISO 8601, always UTC.

Endpoints

Every endpoint is authenticated with a bearer token and scoped to the environment the key belongs to.

MethodPathWhat it does
POST/vault/v1/kvCreate an object
GET/vault/v1/kv/:idRead an object by ID
GET/vault/v1/kv/name/:nameRead an object by name
GET/vault/v1/kv/:id/metadataDescribe an object
GET/vault/v1/kv/:id/versionsList object versions

Create an object

POST /vault/v1/kv — create an object.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.create_an_object();
6console.log(result);

Read an object by ID

GET /vault/v1/kv/:id — read an object by ID.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.read_an_object_by_id();
6console.log(result);

Read an object by name

GET /vault/v1/kv/name/:name — read an object by name.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.read_an_object_by_name();
6console.log(result);

Describe an object

GET /vault/v1/kv/:id/metadata — describe an object.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.describe_an_object();
6console.log(result);

List object versions

GET /vault/v1/kv/:id/versions — list object versions.

1import Paycux from '@paycux/node';
2
3const paycux = new Paycux(process.env.PAYCUX_API_KEY);
4
5const result = await paycux.list_object_versions();
6console.log(result);

Errors

Errors return a JSON body with a machine-readable code, a human-readable message and, for validation failures, the offending field.

StatusCodeMeaning
400invalid_requestA required field is missing or malformed.
401unauthorizedThe API key is missing, revoked, or from another environment.
404not_foundNo record with that ID in this environment.
429rate_limit_exceededBack off and retry after the interval in Retry-After.