Script that makes an API call to and parses the response to get a URL from where to download another file
Don't repeat yourself

The two curl commands have significant repeated parts.
You can extract that to a function.

For example:

mycurl() {
    curl -X GET \
         -H 'Accept: application/vnd.xxxxx+json; version=3.0' \
         -H 'Authorization: Bearer RCexxxxxxxxxxxxxxxxxxxxxxxxxcVefI5mWy' \
         -H 'Content-Type: application/json' \
        "$@"
}


And then use it like this:

exportsData=$(mycurl https://api.xxxx.com/apps/9xxxxxxxxx15f96fe/exports)
...
mycurl -o "$ENCRYPTED_TARBALL" https://storage.googleapis.com/someUrlWhereTheFileIsBeingDownloadedFrom


Use here-strings instead of echo ... | ...

Instead of this:

echo $exportsData | jq '.[0].status'


It's better to use here-strings, like this:

jq '.[0].status' &lt;&lt;&lt; "$exportsData"


Small bug

Instead of this:


export ENCRYPTED_TARBALL=encryptedChatDump.tar.gz.enc
 $(curl -X GET -o ENCRYPTED_TARBALL \
...



You probably meant to write this:

export ENCRYPTED_TARBALL=encryptedChatDump.tar.gz.enc
 $(curl -X GET -o "$ENCRYPTED_TARBALL" \
...


Pointless variables?

These variables are set at the end of the script, but what for?


export OUTPUT_TAR=finalChatDumpUnencrypted.tar.gz
export PRIVATE_KEY_PATH=~/.ssh/id_rsa