{"id":16910552,"url":"https://github.com/estrattonbailey/hubpost","last_synced_at":"2025-04-11T15:51:53.205Z","repository":{"id":71080712,"uuid":"449887321","full_name":"estrattonbailey/hubpost","owner":"estrattonbailey","description":"A little util to submit form data to HubSpot","archived":false,"fork":false,"pushed_at":"2022-01-20T14:18:12.000Z","size":15,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T15:05:33.426Z","etag":null,"topics":["ajax","form","hubspot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/estrattonbailey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-19T23:22:59.000Z","updated_at":"2025-03-02T14:04:51.000Z","dependencies_parsed_at":"2023-05-18T22:45:31.170Z","dependency_job_id":null,"html_url":"https://github.com/estrattonbailey/hubpost","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"be7792c42905bb69189580e3674a5d8a448e4e59"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estrattonbailey%2Fhubpost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estrattonbailey%2Fhubpost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estrattonbailey%2Fhubpost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/estrattonbailey%2Fhubpost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/estrattonbailey","download_url":"https://codeload.github.com/estrattonbailey/hubpost/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248435099,"owners_count":21102967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ajax","form","hubspot"],"created_at":"2024-10-13T19:01:27.462Z","updated_at":"2025-04-11T15:51:53.160Z","avatar_url":"https://github.com/estrattonbailey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hubpost\n\nA little util to submit form data to HubSpot using their [forms\nAPI](https://legacydocs.hubspot.com/docs/methods/forms/submit_form).\n\n```javascript\nimport { hubpost } from 'hubpost'\n\nconst portalId = '123123123'\nconst formId = '123123-123123-123123-123123'\n\ntry {\n  await hubpost(portalId, formId, {\n    first: 'Megan',\n    last: 'Rapinoe'\n  })\n} catch (e) {\n  console.log(e) // =\u003e { status, message, correlationId, errors[] }\n}\n```\n\nWhen passing in your form fields, you can optionally structure them as objects\nin order to specify custom `objectTypeId` values. They will otherwise default to\n\"contact\" type `0-1`.\n\n```javascript\nawait hubpost(portalId, formId, {\n  name: 'Megan Rapinoe',\n  position: {\n    objectTypeId: '0-1234',\n    value: 'Captain'\n  }\n})\n```\n\nThis library also exports HubSpot's default `objectTypeId` values:\n\n```javascript\nimport { objectTypeIds } from 'hubpost'\n\nassert.deepEqual(objectTypeIds, {\n  contact: '0-1',\n  company: '0-2',\n  deal: '0-3',\n  ticket: '0-5',\n})\n```\n\n## License\n\nMIT License © [Eric Bailey](https://estrattonbailey.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festrattonbailey%2Fhubpost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Festrattonbailey%2Fhubpost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Festrattonbailey%2Fhubpost/lists"}