/r/{repoId}/events/{id}

POST
https://sample-api.d-velop.cloud
Creating a webhook
Parameters
repoId/string/required
The unique ID of the repository.
id/string/required
Responses
201
The webhook was created successfully.
Headers
Location
URI of the created webhook resource
string
URI of the created webhook resource
400
Invalid data was transferred.
Content
Media type: application/json
{
  "code": {
    "type": "integer",
    "format": "int32",
    "example": 240100
  },
  "reason": {
    "type": "string",
    "nullable": true,
    "example": "Reason why the request failed."
  }
}
Media type: application/hal+json
{
  "code": {
    "type": "integer",
    "format": "int32",
    "example": 240100
  },
  "reason": {
    "type": "string",
    "nullable": true,
    "example": "Reason why the request failed."
  }
}
Show operation

Language

const options = {
  method: 'POST',
  headers: {accept: 'application/json', 'content-type': 'application/hal+json'},
  body: '{"apiKey":"cryptoKey","description":"Webhook for the validation of invoices.","enabled":"test","handleResponse":"NONE | STATUS | STATUS_AND_BODY","id":"00000000-0000-0000-0000-000000000000","restrictions":"test","retry":"test","timeout":"test","uri":"https://my-company.com/webhooks"}'
};

fetch('https://example.com/dmsconfig/r/REPOID/events/ID', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));