interface ContentCreate {
    ancestors?: {
        id: string;
    }[];
    body?: {
        anonymous_export_view?: ContentBodyCreate;
        atlas_doc_format?: ContentBodyCreate;
        editor2?: ContentBodyCreate;
        export_view?: ContentBodyCreate;
        storage?: ContentBodyCreate;
        styled_view?: ContentBodyCreate;
        view?: ContentBodyCreate;
    };
    container?: {
        id: string;
        type: string;
    };
    id?: string;
    space: {
        key: string;
    };
    status?: string;
    title: string;
    type: string;
    version?: {
        message?: string;
    };
}

Hierarchy (view full)

Properties

ancestors?: {
    id: string;
}[]

The parent content of the new content. If you are creating a top-level page or comment, this can be left blank. If you are creating a child page, this is where the parent page id goes. If you are creating a child comment, this is where the parent comment id goes. Only one parent content id can be specified.

Type declaration

  • id: string

    The id of the parent content.

body?: {
    anonymous_export_view?: ContentBodyCreate;
    atlas_doc_format?: ContentBodyCreate;
    editor2?: ContentBodyCreate;
    export_view?: ContentBodyCreate;
    storage?: ContentBodyCreate;
    styled_view?: ContentBodyCreate;
    view?: ContentBodyCreate;
}

The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. storage.

Note, editor2 format is used by Atlassian only. anonymous_export_view is the same as 'export_view' format but only content viewable by an anonymous user is included.

Type declaration

container?: {
    id: string;
    type: string;
}

The container of the content. Required if type is comment or certain types of custom content. If you are trying to create a comment that is a child of another comment, specify the parent comment in the ancestors field, not in this field.

Type declaration

  • id: string

    The id of the container.

  • type: string

    The type of the container.

id?: string

The ID of the draft content. Required when publishing a draft.

space: {
    key: string;
}

The space that the content is being created in.

Type declaration

  • key: string

    The key of the space.

status?: string

The status of the new content.

title: string
type: string

The type of the new content. Custom content types defined by apps are also supported.

version?: {
    message?: string;
}

The new version for the created content.

To get the current version number, use Get content by ID and retrieve version.number.

Type declaration

  • Optional message?: string

    The version comment.

Generated using TypeDoc v0.25.12