{"id":19447826,"url":"https://github.com/onsip/webhook-schema","last_synced_at":"2026-07-16T12:34:05.901Z","repository":{"id":81512392,"uuid":"98201729","full_name":"onsip/webhook-schema","owner":"onsip","description":null,"archived":false,"fork":false,"pushed_at":"2018-02-26T20:41:11.000Z","size":15,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-28T17:53:09.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onsip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-07-24T14:46:39.000Z","updated_at":"2020-03-16T18:46:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"32253cd3-5aec-4c2e-8e89-72f5463d9032","html_url":"https://github.com/onsip/webhook-schema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onsip/webhook-schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fwebhook-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fwebhook-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fwebhook-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fwebhook-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onsip","download_url":"https://codeload.github.com/onsip/webhook-schema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fwebhook-schema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35544514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-10T16:19:45.665Z","updated_at":"2026-07-16T12:34:05.896Z","avatar_url":"https://github.com/onsip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webhook-schema\nThis documentation is best understood by first reading through the developer guide to the OnSIP Webhooks service, which can be found [here](https://developer.onsip.com/docs/guides/webhooks). If you have any questions, feel free to contact us at [developer@onsip.com](mailto:developer@onsip.com).\n\nThis repository contains JSON Schemas to which each Webhook event conforms. These schemas are intended for developers to use to validate the data that they receive in the events. If you are unfamiliar with JSON Schema, you can refer to [json-schema.org](json-schema.org).\n\nWe also provide coding examples in JavaScript and Python, using their respective JSON Schema libraries.\n\n## Generic Event\nBelow is the boilerplate for a generic event. It would pass validation on base.json.\n```json\n{\n    \"id\": \"189004747f808d1fd2c4b848480fa270\",\n    \"streamId\": \"1cd4606b-4c84-45b2-80f8-9318e7aea112\",\n    \"subscriptionId\": \"300\",\n    \"type\": \"generic\",\n    \"createdAt\": \"2017-09-11T21:10:58.735641Z\"\n}\n```\n## Understanding `type`\nEach webhook event produced by our system contains a `type` field. The types are named hierarchically using the dot operator. This provides a convenient way to supply a set of filters when subscribing to a set of events. The \\* matches any word, the \\# matches any word or dot. For example:\n```\n#\ncall.#\ncall.dialog.*\n```\n\nThe types also map directly to the hierarchical folder structure used for storing the schemas associated with the types in this repository. For example, the `call.dialog.confirmed` schema lives at `schemas/call/dialog/confirmed.json`.\n\nBelow is the list of all the currently supported types:\n* call.dialog.requested\n* call.dialog.confirmed\n* call.dialog.referred\n* call.dialog.terminated\n* call.dialog.failed\n* call.recording.uploaded\n* app.attendant-menu.started\n* app.attendant-menu.transferred\n* app.attendant-menu.invalid-dtmf\n* app.attendant-menu.abandoned\n\nIt is important to note that the schema does not care about the content of the values in a JSON object that it is validating, it only cares about the _types_ of the values. Schemas are for validating structure and type. It is up to the user application to parse the `type` field and identify which schema to validate against.\n\n## Events with a `payload`\nAll events will contain at a minimum the fields specified by the generic event above. Events can optionally include a \"payload\" field, which is a nested object. The expected fields of the payload are defined in the schema for the corresponding type.\n\n## Testing\nTo test that a schema works as intended:\n```npm test```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsip%2Fwebhook-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonsip%2Fwebhook-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsip%2Fwebhook-schema/lists"}