kustomer-client
    Preparing search index...

    Function upsertAttachment

    • Update or upsert attachment Updates the requested attachment. Upserts the attachment if an attachment does not exist.

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

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

      Type Parameters

      • ThrowOnError extends boolean = true

      Returns RequestResult<
          {
              data: {
                  attributes: {
                      contentLength: number;
                      contentType: string;
                      name: string;
                      redacted: boolean;
                      uploaded: boolean;
                  };
                  id: string;
                  links: { related: string; self: string };
                  relationships: {
                      org: { data: { id: string; type: string }; links: { self: string } };
                  };
                  type: string;
              };
              meta: {
                  upload: {
                      fields: {
                          acl: string;
                          bucket: string;
                          "Content-Type": string;
                          key: string;
                          Policy: string;
                          "X-Amz-Algorithm": string;
                          "X-Amz-Credential": string;
                          "X-Amz-Date": string;
                          "X-Amz-Meta-Attachment-Id": string;
                          "X-Amz-Signature": string;
                      };
                      url: string;
                  };
              };
          },
          unknown,
          ThrowOnError,
      >