Duplicate Site Membership to External API

Make use of Wix Fetch or Wix HTTP Functions.
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-myapi-and-myapiclient

https://www.wix.com/corvid/reference/wix-fetch.html
https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api

https://www.wix.com/corvid/reference/wix-http-functions.html
https://support.wix.com/en/article/corvid-exposing-a-site-api-with-http-functions