Skip to main content
POST
JavaScript

Authorizations

x-api-key
string
header
required

Your unique Avido API key

x-application-id
string
header
required

Your unique Avido Application ID

Body

application/json

Request body for creating a new document with its initial version

title
string
required

Title of the initial document version

Example:

"API Documentation"

content
string
required

Content of the initial document version

Example:

"This document describes the API endpoints..."

assignee
string

User ID of the person assigned to this document. Defaults to the authenticated user if not provided.

Example:

"user_123456789"

scrapeJobId
string<uuid>

Optional ID of the scrape job that generated this document

Pattern: ^([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)$
Example:

"321e4567-e89b-12d3-a456-426614174000"

type
enum<string>
default:KNOWLEDGE

Type of the document. Defaults to KNOWLEDGE.

Available options:
KNOWLEDGE,
POLICY
Example:

"KNOWLEDGE"

topicId
string<uuid>

Optional ID of the topic this document belongs to

Pattern: ^([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)$
Example:

"789e1234-e89b-12d3-a456-426614174000"

metadata
object

Optional metadata for the initial document version

originalSentences
string[]

Array of original sentences from the source

Example:
status
enum<string>
default:DRAFT

Status of the initial document version

Available options:
DRAFT,
REVIEW,
APPROVED,
ARCHIVED,
ACTIVE
Example:

"DRAFT"

language
string
default:english

Language of the initial document version

Example:

"english"

Response

Document created successfully

Successful response containing the document data

document
object
required