Skip to content

Create record

POST
/api/v1/records/
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.

Media typeapplication/json
RecordCreateRequest

Request to create a record (with or without file).

object
object_key
Any of:
string
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
0
checksum_md5
Any of:
string
category
Category

Record category

string
default: other
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
default: upload
description
Description

Description

string
""
tags
Tags

Tags

Array<string>
structured_data
Structured Data

Structured content for data-only records

object
key
additional properties
any
effective_date
Any of:
string
expires_at
Any of:
string
requires_renewal
Requires Renewal

Whether this record needs renewal

boolean
retention_policy
Retention Policy

Retention policy

string
""
parent_type
Any of:
string
parent_id
Any of:
string
entity_links
Any of:
Array<object>
object
key
additional properties
any

Created

Media typeapplication/json
Response
object
key
additional properties
any

Example generated

{}