POST/v2/webhooksCreate a webhook

Create a webhook for our platform to interact with
Due to the security-sensetive nature of our products, we recommend an HMAC to validate the integrity of our messages. Optionally, you can provide us with a simple secret.
headerAuthorizationAuthentication token (bearer token or API key).
{
"organizationId" : Number,
"deviceIds" : [Number],
"deviceGroupIds" : [Number],
"secretHttp" : String,
"webhookUrl" : String,
"topics" : ["DeviceActivationEvents" / "DeviceDeactivationEvents" / "DeviceStatusEvents" / "DeviceTamperEvents"]
}

Response

status401Invalid authentication token
{
"id" : Number,
"secretHmac" : String
}

Example: Connect a Webhook to our platform

POST/v2/webhooks

headerAuthorizationBearer ab882227-c692-4eb3-a9c7-c6116de41f0f
{
"organizationId": 6,
"deviceIds": [85, 86, 87],
"secretHttp": "PoWJFA11inptkbGz",
"webhookUrl": "https://webhooks.athom.com/webhook/XXXXX",
"topics": ["DeviceActivationEvents", "DeviceDeactivationEvents", "DeviceStatusEvents", "DeviceTamperEvents"]
}

Response

status200
headerAccess-Control-Expose-Headersauthorization, content-type
headerAccess-Control-Allow-Headersauthorization, content-type
headerAccess-Control-Allow-MethodsGET, POST, DELETE, OPTIONS, PUT
headerAccess-Control-Allow-Origin*
headerStrict-Transport-Securitymax-age=31536000; includeSubDomains
headerX-Frame-OptionsSAMEORIGIN
headerX-Content-Type-Optionsnosniff
headerX-XSS-Protection1; mode=block
headerContent-Security-Policydefault-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
headerReferrer-Policyno-referrer
headerFeature-Policyself
headerPermissions-policyinterest-cohort=()
{
"id": 2,
"secretHmac": "bSxyOp4vaSNpvyUMfrA98WsOqRSlzBBB"
}

Example: Connect an insecure Webhook to our platform

POST/v2/webhooks

headerAuthorizationBearer cc4e4206-8de4-4323-9338-e2fd11a45b3d
{
"organizationId": 7,
"deviceIds": [89, 90, 91],
"secretHttp": "K22DgtNmch9DxKtJ",
"webhookUrl": "http://webhooks.athom.com/webhook/XXXXX",
"topics": ["DeviceActivationEvents", "DeviceDeactivationEvents", "DeviceStatusEvents", "DeviceTamperEvents"]
}

Response

status400
headerAccess-Control-Expose-Headersauthorization, content-type
headerAccess-Control-Allow-Headersauthorization, content-type
headerAccess-Control-Allow-MethodsGET, POST, DELETE, OPTIONS, PUT
headerAccess-Control-Allow-Origin*
headerStrict-Transport-Securitymax-age=31536000; includeSubDomains
headerX-Frame-OptionsSAMEORIGIN
headerX-Content-Type-Optionsnosniff
headerX-XSS-Protection1; mode=block
headerContent-Security-Policydefault-src 'none'; frame-ancestors 'none'; base-uri 'none'; form-action 'none'
headerReferrer-Policyno-referrer
headerFeature-Policyself
headerPermissions-policyinterest-cohort=()
{
"message": "Unsupported protocol: We only support https for now.",
"code": "WebhookUnsupportedProtocol",
"errorMessage": "Unsupported protocol: We only support https for now.",
"errorCode": "WebhookUnsupportedProtocol"
}