I found it. On the last line I have a backslash that was for line continuation and I continued on the same line:
}' \ "https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID/accounts"
Once I took the backslash out it worked! :)
}' "https://api.stormpath.com/v1/applications/$YOUR_APPLICATION_ID/accounts"
Hope that helps someone.
Andrew