Records

Create or replace a record

POST
/api/records

Creates a record, or replaces an existing record with the same record_key. A replace overwrites every field: fields you leave out are cleared, so send the old values of fields you want to keep.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token from POST /oauth2/token (valid for 300 seconds).

In: header

Request Body

application/json

A record stored in the InCountry Vault. Hashed fields are stored as hashes, encrypted fields are encrypted with AES-GCM (256-bit key, 96-bit nonce), plain fields are stored as-is.

record_key?string

Unique identifier (primary key) of the record. Hashed.

key?|

Legacy alias of record_key, returned by the API.

body?|

Record payload. You can store stringified JSON. Encrypted.

precommit_body?|

Service information about the record. Encrypted.

profile_key?|

Identifier of the record in an external system. Hashed.

parent_key?|

Key of the parent record. Hashed.

range_key?|

Legacy alias of range_key1.

range_key1?|

Numeric field for range filtering (1 of 10). Plain.

range_key2?|

Numeric field for range filtering (2 of 10). Plain.

range_key3?|

Numeric field for range filtering (3 of 10). Plain.

range_key4?|

Numeric field for range filtering (4 of 10). Plain.

range_key5?|

Numeric field for range filtering (5 of 10). Plain.

range_key6?|

Numeric field for range filtering (6 of 10). Plain.

range_key7?|

Numeric field for range filtering (7 of 10). Plain.

range_key8?|

Numeric field for range filtering (8 of 10). Plain.

range_key9?|

Numeric field for range filtering (9 of 10). Plain.

range_key10?|

Numeric field for range filtering (10 of 10). Plain.

service_key1?|

Additional text information (1 of 5). Hashed.

service_key2?|

Additional text information (2 of 5). Hashed.

service_key3?|

Additional text information (3 of 5). Hashed.

service_key4?|

Additional text information (4 of 5). Hashed.

service_key5?|

Additional text information (5 of 5). Hashed.

key1?|

Lookup field (1 of 20). Hashed or plain, depending on your configuration.

key2?|

Lookup field (2 of 20). Hashed or plain, depending on your configuration.

key3?|

Lookup field (3 of 20). Hashed or plain, depending on your configuration.

key4?|

Lookup field (4 of 20). Hashed or plain, depending on your configuration.

key5?|

Lookup field (5 of 20). Hashed or plain, depending on your configuration.

key6?|

Lookup field (6 of 20). Hashed or plain, depending on your configuration.

key7?|

Lookup field (7 of 20). Hashed or plain, depending on your configuration.

key8?|

Lookup field (8 of 20). Hashed or plain, depending on your configuration.

key9?|

Lookup field (9 of 20). Hashed or plain, depending on your configuration.

key10?|

Lookup field (10 of 20). Hashed or plain, depending on your configuration.

key11?|

Lookup field (11 of 20). Hashed or plain, depending on your configuration.

key12?|

Lookup field (12 of 20). Hashed or plain, depending on your configuration.

key13?|

Lookup field (13 of 20). Hashed or plain, depending on your configuration.

key14?|

Lookup field (14 of 20). Hashed or plain, depending on your configuration.

key15?|

Lookup field (15 of 20). Hashed or plain, depending on your configuration.

key16?|

Lookup field (16 of 20). Hashed or plain, depending on your configuration.

key17?|

Lookup field (17 of 20). Hashed or plain, depending on your configuration.

key18?|

Lookup field (18 of 20). Hashed or plain, depending on your configuration.

key19?|

Lookup field (19 of 20). Hashed or plain, depending on your configuration.

key20?|

Lookup field (20 of 20). Hashed or plain, depending on your configuration.

expires_at?|

When the record is automatically deleted from the InCountry Vault (ISO-8601).

Formatdate-time
country?string

Lowercase ISO country code where the record is stored.

Response Body

application/json

curl -X POST "https://example.com/api/records" \  -H "Content-Type: application/json" \  -d '{    "record_key": "d1c2e12cfeababc8b95daf6902e210b1",    "profile_key": "4274e510a2f41aeb9e8e0f8b56ff6c2",    "range_key1": 2000,    "key1": "Additional info",    "key4": "Shipping",    "key10": "New",    "body": "{\\"name\\":\\"John\\",\\"vehicle\\":\\"Audi\\"}",    "country": "se"  }'
{  "country": "se",  "key": "d1c2e12cfeababc8b95daf6902e210b1",  "record_key": "d1c2e12cfeababc8b95daf6902e210b1",  "profile_key": "4274e510a2f41aeb9e8e0f8b56ff6c2",  "range_key": 2000,  "range_key1": 2000,  "body": "{\"name\":\"John\",\"vehicle\":\"Audi\"}",  "key1": "Additional info",  "key4": "Shipping",  "key10": "New"}