{"id":19447827,"url":"https://github.com/onsip/push-notification-schema","last_synced_at":"2026-04-18T11:33:42.555Z","repository":{"id":44044991,"uuid":"121678818","full_name":"onsip/push-notification-schema","owner":"onsip","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-10T08:41:21.000Z","size":35,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-25T08:49:21.338Z","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}},"created_at":"2018-02-15T20:25:44.000Z","updated_at":"2020-03-17T15:33:46.000Z","dependencies_parsed_at":"2023-01-26T00:31:32.641Z","dependency_job_id":null,"html_url":"https://github.com/onsip/push-notification-schema","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onsip/push-notification-schema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fpush-notification-schema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fpush-notification-schema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fpush-notification-schema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fpush-notification-schema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onsip","download_url":"https://codeload.github.com/onsip/push-notification-schema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onsip%2Fpush-notification-schema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31967037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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.812Z","updated_at":"2026-04-18T11:33:42.539Z","avatar_url":"https://github.com/onsip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OnSIP Push Notifications Schema\n\nThis repository contains JSON Schemas to which each push notification conforms.\n\nThere are some basic coding examples in JavaScript using it's respective JSON Schema library.\n\n## Generic Push Type\nBelow is the boilerplate for a generic event. It would pass validation on base.json.\n```json\n{\n  \"data\": {\n    \"sip\": {\n      \"aor\": \"My_AOR\",\n      \"type\": \"sip.generic\"\n    },\n    \"payload\": {\n      \"method\": \"GENERIC\"\n    }\n  }\n```\n\n## Events with a `payload`\nAll pushes will contain at a minimum the fields specified by the generic push above. All pushes will need to provide the AOR this push is for and the type of push it is. Optionally we can add more to the \"payload\" field, which is a nested object. The expected fields of the payload are defined in the schema for the corresponding type.\n\n\n### REGISTER EXAMPLE\n```json\n{\n    \"data\": {\n      \"sip\": {\n        \"aor\": \"sip:grant@test.onsip.com\",\n        \"type\": \"sip.register\",\n      },\n      \"payload\": {\n        \"method\": \"REGISTER\",\n        \"server\": \"edge.sip.onsip.com\",\n      }\n    }\n  }\n```\n### INVITE EXAMPLE\n```json\n{\n    \"data\": {\n      \"sip\": {\n        \"aor\": \"sip:grant@test.onsip.com\",\n        \"type\": \"sip.invite\",\n      },\n      \"payload\": {\n        \"method\": \"INVITE\",\n        \"server\": \"edge.sip.onsip.com\",\n        \"callid\": \"abc294dj349rgj\",\n        \"fromtag\": \"abc294dj349rgj\"\n      }\n    }\n}\n```\n## Testing\nTo test that a schema works as intended:\n```npm test```\n\n`poc.js` can also be used and it shows how to load the schemas both locally or asynchronous from an external source.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsip%2Fpush-notification-schema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonsip%2Fpush-notification-schema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonsip%2Fpush-notification-schema/lists"}