Skip to main content
POST
/
documents
Create a document
curl --request POST \
  --url https://api-joy.joyfill.io/v1/documents \
  --header 'Content-Type: application/json' \
  --data '{
  "identifier": "<string>",
  "name": "<string>",
  "files": [
    "<any>"
  ],
  "fields": [
    "<any>"
  ],
  "template": "<string>",
  "group": "<string>",
  "stage": "published"
}'
"{\n  \"type\": \"String\",\n  \"identifer\": \"String\",\n  \"name\": \"String\",\n  \"group\": \"String\",\n  \"stage\": \"String\",\n  \"files\": \"Array\",\n  \"fields\": \"Array\"\n   \n}"

Headers

Authorization
string

Supports both API Key and User Access Token authorization. See https://joyfill.mintlify.app/api/authentication

Body

application/json
identifier
string

Specifies a document's unique ID. Maximum length is 80 characters. Identifier cannot be changed after creation. Leave the identifier param empty to have Joyfill auto generate an identifier.

name
string

Specifies the visual display name. When the template param is used in this creation event and this name is left blank the document will automatically be given the same name as the original template.

files
any[]

Array of JoyDoc file objects. See the JoyDoc data structure under the guides section to learn more.

fields
any[]

Array of JoyDoc field objects. See the JoyDoc data structure under the guides section to learn more.

template
string

The template identifier to use as the source of the document.

group
string

The group identifier of the group that you would like to create the document for.

stage
enum<string>
default:published
Available options:
draft,
published

Response

200 - application/json

200

type
string
Example:

"String"

identifer
string
Example:

"String"

name
string
Example:

"String"

group
string
Example:

"String"

stage
string
Example:

"String"

files
string
Example:

"Array"

fields
string
Example:

"Array"