Create a webhook subscription
Create a new webhook subscription for a specific company.
If the webhook destination responds with any HTTP status code other than 200 (Success), we will consider it a failure. The request is also considered a failure if Basecone does not receive a response within 5 seconds. In case webhook destination responds with the HTTP status code 401 (Unauthorized) the webhook will be automatically unsubscribed, in all other cases we will resend the webhook notification every hour for a period of a week until the destination responds with an HTTP status code of 200.
POST subscriptions
Request details
The post request will contain all the required information to subscribe to company events.
Request properties
Property | Type | Description | Optional |
---|---|---|---|
CompanyId | Guid | Unique identifier of a company. | No |
Endpoint | Uri | A valid url representing the endpoint Basecone needs to deliver events to. | No |
Username | string | A username that Basecone will use for basic authentication when delivering the event. | Yes |
Password | string | A password that Basecone will use for basic authentication when delivering the event. | Yes |
Example request
{ "companyId":"AC833FBE-830E-49DC-8760-6FC8AA655D29", "endpoint":"https://some.server.com/eventshereplease", "username": "baseconeappuser", "password": "baseconeappusersecret" }
Response
Upon successful creation of a webhook subscription a 200 status code will be returned, otherwise an error message with failure details.