$curl -X POST "https://api.x.flatfile.com/v1/agents?environmentId=us_env_YOUR_ID" \> -H "Authorization: Bearer <token>" \> -H "Content-Type: application/json" \> -d '{> "topics": [> "workbook:updated"> ],> "compiler": "js",> "source": "module.exports = { routeEvent: async (...args) => { console.log(args) } }">}'
1{2 "data": {3 "id": "us_ag_YOUR_ID",4 "compiler": "js",5 "slug": "default",6 "source": "module.exports = { routeEvent: async (...args) => { console.log(args) } }",7 "topics": [8 "workbook:updated"9 ]10 }11}