How to manage translations via the API?

:wave:

I would like to create an export of my documents via the API, download it via the API then upload translations inside prismic via the API too.

We already have crowdin for some projects, with its API we can push content/get content from crowdin without a human. So I would like to be able to get the export of prismic so we can auto update crowdin and once we have translations we can upload them (via the API) to prismic.

But I wasn't able to find documentation for this use case. We can find a few pages inside the doc, but nothing is about an API to export/download/upload strings. Ex How to Export Content - Prismic we only speak about this button inside the dashboard.

So I tried to use the API to see if it's possible, but I didn't find anything for my use-case.

Via the API I can get a list of pages/documents and it looks like what I get if I go inside my dashboard -> settings -> export.
The JSON inside is similar to what we have inside the output from clients.query('') inside .results[0].data, but it's missing groupLang :confused:

Is it possible, or the API doesn't support this?

Hi there,
Welcome to the prismic comunity.

In fact Prismic doesn't have a write API for content, so " can upload them ( via the API )" is currently not possible.

There will be a manual process of generating a zip file compatible with Prismic Import/export feature and and importing it.

Ok thx :pray:

Is there a plan to add inside the API, a way to generate then download the zip and upload translations?

Well still evalutating the possible solutions, but nothing is planned yet, and in fact our approuch is to identify use-cases such as your use-case and bring a solution other that creating a generic solution such as a write API.

This is being tracked as an open feature request.

If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the :heart: button to show your support for the feature and check out our Feature Request Guidelines.