Create record
POST
/api/v1/records/
const url = 'https://app.ayna.com/api/v1/records/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"object_key":"example","original_filename":"","content_type":"","file_size_bytes":0,"checksum_md5":"example","category":"other","document_type":"","status":"","source":"upload","description":"","tags":["example"],"structured_data":{},"effective_date":"example","expires_at":"example","requires_renewal":false,"retention_policy":"","parent_type":"example","parent_id":"example","entity_links":[{}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.ayna.com/api/v1/records/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "object_key": "example", "original_filename": "", "content_type": "", "file_size_bytes": 0, "checksum_md5": "example", "category": "other", "document_type": "", "status": "", "source": "upload", "description": "", "tags": [ "example" ], "structured_data": {}, "effective_date": "example", "expires_at": "example", "requires_renewal": false, "retention_policy": "", "parent_type": "example", "parent_id": "example", "entity_links": [ {} ] }'Create a record with or without file content.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
RecordCreateRequest
Request to create a record (with or without file).
object
original_filename
Original Filename
Original filename (empty for data-only records)
string
content_type
Content Type
MIME type
string
file_size_bytes
File Size Bytes
File size (0 for data-only records)
integer
category
Category
Record category
string
document_type
Document Type
Fine-grained type (e.g., part_107_cert, coi)
string
status
Status
Record status (green/amber/red/active/expired/pending)
string
source
Source
How this record was created
string
description
Description
Description
string
tags
Tags
Tags
Array<string>
structured_data
Structured Data
Structured content for data-only records
object
key
additional properties
any
requires_renewal
Requires Renewal
Whether this record needs renewal
boolean
retention_policy
Retention Policy
Retention policy
string
entity_links
Any of:
Array<object>
object
key
additional properties
any
null
Responses
Section titled “Responses”Created
Media typeapplication/json
Response
object
key
additional properties
any
Example generated
{}