Hello @Tunnelblick!
Transitioning from API v1 to API v2 involves a few changes. Firstly, you’ll need to generate a personal access token by navigating to Crowdin Account Settings → API & SSO → New Token. This replaces the API key used in API v1. Your requests should include the following header: Authorization: Bearer .
API v2 also introduces the use of Storage. All files for localization, screenshots, Glossaries, and Translation Memories should first be uploaded to the Storage. You can do this using the Add Storage endpoint: API v2 Reference .
Once the file is in Storage, you can define where to add the file using the Add File endpoint: API v2 Reference .
Here’s a basic example using curl:
- Upload a file to storage:
curl -X POST https://api.crowdin.com/api/v2/storage \
-H 'Authorization: Bearer ' \
-F 'file=@/path/to/your/file'
- Add the file to your project:
curl -X POST https://api.crowdin.com/api/v2/projects//files \
-H 'Authorization: Bearer ' \
-d 'storageId=&name='
Please replace , `/path/to/your/file`,
, , and
with your actual values.
I hope this helps! If you have any further questions, feel free to ask.