//native
type Box = {
token: string;
};
/**
* Resend Box Sign request
* Resends a signature request email to all outstanding signers.
*/
export async function main(auth: Box, sign_request_id: string) {
const url = new URL(
`https://api.box.com/2.0/sign_requests/${sign_request_id}/resend`,
);
const response = await fetch(url, {
method: "POST",
headers: {
Authorization: "Bearer " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 235 days ago