// This file was auto-generated by Fern from our API Definition.

/**
 * @example
 *     {
 *         from: {
 *             type: "user",
 *             id: "6762f11b1bb69f9f2193bba3"
 *         },
 *         body: "Hello there"
 *     }
 *
 * @example
 *     {
 *         from: {
 *             type: "user",
 *             id: "123_doesnt_exist"
 *         },
 *         body: "Hello there"
 *     }
 */
export interface CreateConversationRequest {
    from: CreateConversationRequest.From;
    /** The content of the message. HTML is not supported. */
    body: string;
    /** The time the conversation was created as a UTC Unix timestamp. If not provided, the current time will be used. This field is only recommneded for migrating past conversations from another source into Intercom. */
    created_at?: number;
}

export namespace CreateConversationRequest {
    export interface From {
        /** The role associated to the contact - user or lead. */
        type: From.Type;
        /** The identifier for the contact which is given by Intercom. */
        id: string;
    }

    export namespace From {
        /** The role associated to the contact - user or lead. */
        export const Type = {
            Lead: "lead",
            User: "user",
            Contact: "contact",
        } as const;
        export type Type = (typeof Type)[keyof typeof Type];
    }
}
