kustomer-client
    Preparing search index...

    Type Alias CreateMessageByCustomerData

    type CreateMessageByCustomerData = {
        body?: {
            app: string;
            attachments?:
                | {
                    _id: string;
                    contentLength: number;
                    contentType: string;
                    name: string;
                    sourceId?: string;
                }[]
                | string[];
            auto?: boolean;
            channel: | "email"
            | "sms"
            | "chat"
            | "facebook"
            | "twitter-dm"
            | "twitter-tweet"
            | "voice"
            | "instagram"
            | "whatsapp";
            conversation?: string;
            createdAt?: string;
            createdBy?: string;
            custom?: { [key: string]: never };
            direction?: "in" | "out";
            error?: {
                code?: string;
                detail?: string;
                links?: { [key: string]: unknown };
                meta?: { [key: string]: unknown };
                source?: { [key: string]: unknown };
                status?: number;
                title?: string;
            };
            errorAt?: string;
            externalId?: string;
            id?: string;
            importedAt?: string;
            kbArticles?: string[];
            lang?: string
            | null;
            location?: {
                address?: string;
                address2?: string;
                address3?: string;
                areaCode?: string;
                cityName?: string;
                countryCode?: string;
                countryName?: string;
                latitude?: number;
                longitude?: number;
                name?: string;
                regionCode?: string;
                regionName?: string;
                zipCode?: string;
            };
            meta?: { [key: string]: unknown };
            modifiedAt?: string;
            modifiedBy?: string;
            preview?: string;
            queue?: unknown & { external?: "amazon-connect"; id?: string };
            reference?: { message: string; type: "reply" | "replyAll" | "forward" };
            related?: string;
            sentAt?: string;
            sentiment?: { confidence: number; polarity: -1 | 0 | 1 };
            shortcuts?: string[];
            size?: number;
            source?: "bulk" | "satisfaction";
            status?: "sent" | "received" | "error";
            subject?: string;
        };
        path: { id: string };
        query?: never;
        url: "/customers/{id}/messages";
    }
    Index

    Properties

    Properties

    body?: {
        app: string;
        attachments?:
            | {
                _id: string;
                contentLength: number;
                contentType: string;
                name: string;
                sourceId?: string;
            }[]
            | string[];
        auto?: boolean;
        channel: | "email"
        | "sms"
        | "chat"
        | "facebook"
        | "twitter-dm"
        | "twitter-tweet"
        | "voice"
        | "instagram"
        | "whatsapp";
        conversation?: string;
        createdAt?: string;
        createdBy?: string;
        custom?: { [key: string]: never };
        direction?: "in" | "out";
        error?: {
            code?: string;
            detail?: string;
            links?: { [key: string]: unknown };
            meta?: { [key: string]: unknown };
            source?: { [key: string]: unknown };
            status?: number;
            title?: string;
        };
        errorAt?: string;
        externalId?: string;
        id?: string;
        importedAt?: string;
        kbArticles?: string[];
        lang?: string
        | null;
        location?: {
            address?: string;
            address2?: string;
            address3?: string;
            areaCode?: string;
            cityName?: string;
            countryCode?: string;
            countryName?: string;
            latitude?: number;
            longitude?: number;
            name?: string;
            regionCode?: string;
            regionName?: string;
            zipCode?: string;
        };
        meta?: { [key: string]: unknown };
        modifiedAt?: string;
        modifiedBy?: string;
        preview?: string;
        queue?: unknown & { external?: "amazon-connect"; id?: string };
        reference?: { message: string; type: "reply" | "replyAll" | "forward" };
        related?: string;
        sentAt?: string;
        sentiment?: { confidence: number; polarity: -1 | 0 | 1 };
        shortcuts?: string[];
        size?: number;
        source?: "bulk" | "satisfaction";
        status?: "sent" | "received" | "error";
        subject?: string;
    }

    Creates a new message.

    Any one of the following roles is required for this endpoint:

    Legacy Role Equivalent Permission Set Role
    org.user.message.write org.permission.message.create

    If a conversation is specified, the message will be linked to the existing conversation. Otherwise, a new conversation will be created and associated with the message.

    The org.admin role is required for setting createdAt, createdBy, modifiedAt, and modifiedBy. Otherwise, these attributes are automatically set by the token.

    Messages are subject to a rate limit. A single client can create up to 120 messages per minute per customer. Messages with importedAt in their body will not be subject to the rate limit.

    A 429 Too Many Requests response will be returned if the rate limit has been reached for a customer.

    path: { id: string }

    Type declaration

    • id: string

      Unique ID of the customer.

    query?: never
    url: "/customers/{id}/messages"