kustomer-client
    Preparing search index...

    Function updateDraft

    • Update draft Updates a draft.

      You can use this endpoint to update any available properties for a channel.

      • If the sendAt property is set to a valid timestamp, the draft will be scheduled to be sent.
      • If the sendAt property is empty, the draft will be unscheduled.
      • If the sendAt property is omitted, the draft status won't change.

      Type Parameters

      • ThrowOnError extends boolean = true

      Parameters

      Returns RequestResult<
          {
              data: {
                  attributes: {
                      body: string;
                      channel: string;
                      createdAt: string;
                      modifiedAt: string;
                      status: string;
                      updatedAt: string;
                  };
                  id: string;
                  relationships: {
                      createdBy: {
                          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,
      >