Getting Company Id by Token
Last update: 9 months ago by Francesco de LorenziReading time: 2 min
When creating resources with Jetti API or making calls to specific endpoints, it might be required to pass the companyId. This field represents the unique id of the company within Jetti.
The recommended approach to collect the companyId is by making a GET
call to /api/auth/current.json
.
Based on the Authorization token being passed as a header, the endpoint will respond with information on the current API user as well as the companyId attribute.
curl --request GET \--url https://api.jetti.io/api/auth/current.json \--header 'Authorization: Bearer {{token}}'