For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDeel Home
OverviewPlatformEmployer of RecordContractorsGlobal PayrollHREmbeddedDeel ITAPI ReferenceChangelog
OverviewPlatformEmployer of RecordContractorsGlobal PayrollHREmbeddedDeel ITAPI ReferenceChangelog
  • Resources
    • Blog
    • Community
    • API spec
  • Endpoints
    • PATCHProfiles
      • POSTCreate a webhook
      • DELDelete a webhook
      • PATCHEdit a webhook
      • GETList of webhook event types
      • GETList of webhooks
      • GETRetrieve a single webhook
LogoLogo
SupportDeel Home
EndpointsWebhooks

Create a webhook

POST
/webhooks
POST
/rest/v2/webhooks
$curl -X POST https://api.letsdeel.com/rest/v2/webhooks \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "body": {
> "name": "New Contract Webhook",
> "description": "Webhook to notify when a contract is created.",
> "status": "enabled",
> "url": "https://hooks.myapp.com/webhook/contract-created",
> "signing_key": "a3f5d9e8b7c6d4e2f1a0b9c8d7e6f5a4",
> "api_version": "v2",
> "events": [
> "contract.created"
> ]
> }
>}'
1{
2 "data": {
3 "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
4 "name": "New Contract Webhook",
5 "description": "Webhook to notify when a contract is created.",
6 "status": "enabled",
7 "url": "https://hooks.myapp.com/webhook/contract-created",
8 "signing_key": "a3f5d9e8b7c6d4e2f1a0b9c8d7e6f5a4",
9 "api_version": "v2",
10 "events": [
11 "contract.created"
12 ],
13 "created_at": "2024-06-10T09:15:00Z",
14 "updated_at": "2024-06-10T09:15:00Z",
15 "hidden": false,
16 "internal": true,
17 "deleted_at": null
18 }
19}
Create a new webhooks subscription.
Was this page helpful?
Previous

Delete a webhook

Next
Built with

Authentication

AuthorizationBearer
## Authentication The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail. ```curl curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \ -H 'Authorization: Bearer YOUR-TOKEN-HERE' ``` [Learn more about authentication](/api/authentication)
OR
AuthorizationBearer
Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/

Request

This endpoint expects an object.
namestring or nullRequired
Webhook subscription name.
descriptionstring or nullRequired
Webhook subscription description.
statusenumRequired
Status of webhook.
Allowed values:
urlstringRequired
Endpoint to receive webhook.
signing_keystring or nullRequired
The webhook's signing key, used to generate webhook signatures.
api_versionstringRequiredDefaults to v2
Deel API version. Currently Deel accepts v1 or v2 version.
eventslist of stringsRequired
The list of events to enable for this subscription.

Response

successful operation
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
405
Method Not Allowed Error
429
Too Many Requests Error
500
Internal Server Error

Authentication

The Deel API uses bearer tokens to authenticate requests. All API calls must be made over HTTPS — calls over plain HTTP or without authentication will fail.

1curl -X GET 'https://api.letsdeel.com/rest/v2/contracts' \
2 -H 'Authorization: Bearer YOUR-TOKEN-HERE'

Learn more about authentication

Standard OAuth2 security scheme based on https://swagger.io/docs/specification/authentication/