Hi,
all you need to do is to make an import of a file with contacts with the appropriate status (opt-in or opt-out). Follow this link on how to prepare the file: https://support.salesmanago.com/prepare-a-file-to-import/
According to paragraph 11: "Contacts are imported with an opt-in status (agreement to receive marketing emails) as default. It is possible to change this setting manually by adding a column named ‘OPT-IN‘ to the file. After this, if a contact is to be imported with an opt-in status, the word ‘true‘ has to be entered in the appropriate row. Conversely, if a contact is to be imported with an opt-out status, write ‘false‘ instead."
And at this link you will find instructions on how to do the import: https://support.salesmanago.com/importing-contact-details/