kustomer-client
    Preparing search index...

    Function updateMessage

    • Update message by ID Updates a message based on the unique message ID.

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

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

      This endpoint is subject to Object Rate Limiting, which limits how many updates single user can make to a single message. To learn more, see Rate limiting.

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

      Custom attributes are optional and allow you to specify custom key-value pairs.

      Kustomer uses a naming convention for custom attributes to specify the field data type with a name suffix:

      • Num number or null
      • At date-time or null
      • Str string or null, length: [ 0 .. 1024 ] characters
      • Txt string or null, length: [ 0 .. 1024 ] characters
      • Bool boolean or null
      • Url string or null, format: uri

      Type Parameters

      • ThrowOnError extends boolean = true

      Returns RequestResult<
          {
              data: {
                  attributes: {
                      app: string;
                      channel: string;
                      createdAt: string;
                      direction: string;
                      externalId: string;
                      lang: string;
                      meta: {
                          cc: unknown[];
                          from: string;
                          inReplyTo: string;
                          recipient: { email: string; mailboxHash: string };
                          subject: string;
                          to: { email: string }[];
                      };
                      modifiedAt: string;
                      preview: string;
                      sentAt: string;
                      sentiment: { confidence: number; polarity: number };
                      size: number;
                      status: string;
                      updatedAt: string;
                  };
                  id: string;
                  links: { related: string; self: string };
                  relationships: {
                      conversation: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      customer: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      modifiedBy: {
                          data: { id: string; type: string };
                          links: { self: string };
                      };
                      org: { data: { id: string; type: string }; links: { self: string } };
                  };
                  type: string;
              };
          },
          unknown,
          ThrowOnError,
      >