# Work in Progress: How to send data to Postcript

{% embed url="<https://firebasestorage.googleapis.com/v0/b/savvy-flow-uploads/o/ZH5RO6gKEiwXw7GF3AD6%2FSavvy_(4)_8655054856517495.mp4?alt=media&token=4a2b6477-d600-4838-8a14-b75086707e55>" %}

* Create a new custom Data Output and select Manual Trigger Only
* Follow the structure below for the function:

```jsx
function output(userData, context) {
  const data = {
     "phone_number": userData.phone,
     "keyword": "KEYWORD", //replace with your keyword
     "origin": "website",
  }
  
  return fetch(`https://savvy-api-proxy-secure.heysavvy.workers.dev/?url=${encodeURIComponent('<https://api.postscript.io/api/v2/subscribers>')}`, {
      method: 'POST',
      headers: {
        Accept: 'application/json',
        'Content-Type': 'application/json',
        'Authorization': 'Bearer API KEY' //replace with your API KEY
      },
      body: JSON.stringify(data)
    })
    .then(response => response.json())
    .then(response => console.log('response', response))
}
```

* Trigger on page complete of the page where the data is obtained
