Rensei docs
API ReferenceCollections

Compare-and-set a complete record

Compare-and-set a complete record - Rensei REST API operation reference.

PUT
/api/collections/{collectionId}/records/{key}

Authorization

headerAuthorizationBearer <rsk_live_*>

Rensei API key presented as Authorization: Bearer rsk_live_. Required API-key scopes are recorded per operation in x-rensei-required-scopes.

Path Parameters

collectionId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
key*string
Length1 <= length <= 256

Query Parameters

projectId*string
Length1 <= length <= 128

Request Body

application/json
  1. body
expectedVersion*integer
Range0 <= value <= 9007199254740991
value*

Response Body

Success

application/json
  1. response
orgId*string
collectionId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid
key*string
version*integer
Range-9007199254740991 <= value <= 9007199254740991
schemaVersion*integer
Range-9007199254740991 <= value <= 9007199254740991
value*
deleted*boolean
authorKind*string
Value in"human""agent""api_key""system"
authorId*string
sessionId*string|null
origin*string
Value in"mcp""rest""web""linear"
createdAt*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
Formatdate-time
Example Request
curl -X PUT 'https://app.rensei.ai/api/collections/497f6eca-6276-4993-bfeb-53cbbbba6f08/records/string?projectId=string' \  -H 'Content-Type: application/json' \  -d '{  "expectedVersion": 0,  "value": {    "property1": "string",    "property2": "string"  }}'
Example Response
{  "orgId": "string",  "collectionId": "0ffe69e2-b7af-4b1e-835c-867376165f50",  "key": "string",  "version": -9007199254740991,  "schemaVersion": -9007199254740991,  "value": {    "property1": "string",    "property2": "string"  },  "deleted": true,  "authorKind": "human",  "authorId": "string",  "sessionId": "string",  "origin": "mcp",  "createdAt": "2019-08-24T14:15:22Z"}