Protein that can both mediate the addition of adenosine 5'-monophosphate (AMP) to specific residues of target proteins (AMPylation), and the removal of the same modification from target proteins (de-AMPylation), depending on the context (PubMed:27918543). The side chain of Glu-231 determines which of the two opposing activities (AMPylase or de-AMPylase) will take place (PubMed:27918543). Acts as a key regulator of the ERN1/IRE1-mediated unfolded protein response (UPR) by mediating AMPylation or de-AMPylation of HSPA5/BiP (PubMed:27918543). In unstressed cells, acts as an adenylyltransferase by mediating AMPylation of HSPA5/BiP at 'Thr-518', thereby inactivating it (PubMed:26673894, PubMed:29064368, PubMed:27918543). In response to endoplasmic reticulum stress, acts as a phosphodiesterase by mediating removal of ATP (de-AMPylation) from HSPA5/BiP at 'Thr-518', leading to restore HSPA5/BiP activity (PubMed:27918543). Although it is able to AMPylate RhoA, Rac and Cdc42 Rho GTPases in vitro, Rho GTPases do not constitute physiological substrates (By similarity). ATP + L-tyrosyl-[protein] = diphosphate + O-(5'-adenylyl)-L-tyrosyl-[protein] 3-O-(5'-adenylyl)-L-threonyl-[protein] + H2O = AMP + H(+) + L-threonyl-[protein] ATP + L-threonyl-[protein] = 3-O-(5'-adenylyl)-L-threonyl-[protein] + diphosphate Divalent metal cation. Prefers Mn(2+) over Mg(2+). The side chain of Glu-231 determines which of the two opposing activities (AMPylase or de-AMPylase) will take place (PubMed:27918543). In response to endoplasmic reticulum stress, mediates de-AMPylase activity (PubMed:27918543). Adenylyltransferase activity is inhibited by the inhibitory helix present at the N-terminus: Glu-231 binds ATP and competes with ATP-binding at Arg-371, thereby preventing adenylyltransferase activity (By similarity). In unstressed cells, disengagement of Glu-231 promotes adenylyltransferase activity (PubMed:27918543). Activation dissociates ATP-binding from Glu-231, allowing ordered binding of the entire ATP moiety with the alpha-phosphate in an orientation that is productive for accepting an incoming target hydroxyl side chain (By similarity). Homodimer. Interacts with HD. The fido domain mediates the adenylyltransferase activity. Auto-AMPylated in vitro. Belongs to the fic family.