Skip to main content
POST
Create Document

Authorizations

Authorization
string
header
required

A Turtle API key (sk_...) as a bearer token.

Path Parameters

organizationId
string<uuid>
required
Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

Body

application/json
counterpartyId
string<uuid>
required

The organization this document is with.

Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

name
string
required

What a person would call it ("Merkl MSA v3"), not a filename.

Required string length: 1 - 200
Pattern: ^(?:[^<\p{C}]|‍|<+(?:[^<A-Za-z/!?\p{C}]|‍|$))*$
draft
boolean

Hold this write as a draft, even where the permissions would let it through: the agent's waits for a person to approve, a person's own waits for them to confirm it (owner: its author). The response is applied=false with the draft.

engagementId
string<uuid>

The deal it belongs to. Omit for documents that outlive any one deal — KYB, incorporation papers, a master agreement.

Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

evidence
object[] | null
fields
object

The document card's declared values — signatories among them. GET /entity-cards lists what it accepts; anything else is refused.

rationale
string
Maximum string length: 20000
Pattern: ^(?:[^<\p{C}]|[\t\n\r‍]|<+(?:[^<A-Za-z/!?\p{C}]|[\t\n\r‍]|$))*$
signedAt
string

When it was signed (YYYY-MM-DD or RFC3339). Required when status is signed; never inferred.

source
enum<string>

With a personal API key only: ai records the write as the key owner's agent's (source ai, with the owner as its user), owing the rationale and evidence, and passing the permissions, of any agent write. Omit for a person's own write.

Available options:
ai
status
null | enum<string>

Where it has got to. Defaults to draft.

Available options:
draft,
sent,
redlining,
review,
signing,
countersign,
signed,
declined,
expired,
cancelled
type
null | enum<string>

What it is for. Defaults to other.

Available options:
agreement,
proposal,
diligence,
invoice,
other
uri
null | string

Where it actually lives. Omit while only its existence is known.

Maximum string length: 2048
Pattern: ^ *(?:[Hh][Tt][Tt][Pp][Ss]://[^\t\n\f\r <>"'`]+)? *$

Response

OK

applied
boolean
budgets
object[]

How full each budgeted text the write set is, in characters (a note in a list is its own entry, notes[2].text). Never enforced: a text over its budget was written as sent; tighten it when you next rewrite it.

draft
object
entityId
string<uuid>
Example:

"248df4b7-aa70-47b8-a036-33ac447e668d"

migrated
integer
mutation
object