API Documentation
Webhooks ¶
Webhooks ¶
For more details on webhooks please refer to the help article.
The Webhook object enables real-time notifications for events occurring in Productive.
Supported filter params
-
id
-
state_id
-
event_id
-
type_id
Webhook events
Supported webhook events are:
-
New task, event_id: 1
-
Updated task, event_id: 24
-
Deleted task, event_id: 25
-
New invoice, event_id: 2
-
Updated invoice, event_id: 14
-
Deleted invoice, event_id: 15
-
New deal, event_id: 3
-
Updated deal, event_id: 12
-
Deleted deal, event_id: 13
-
New budget, event_id: 4
-
Updated budget, event_id: 16
-
Deleted budget, event_id: 20
-
New project, event_id: 5
-
Updated project, event_id: 10
-
Deleted project, event_id: 11
-
New time entry, event_id: 7
-
Updated time entry, event_id: 8
-
Deleted time entry, event_id: 9
-
New booking, event_id: 17
-
Updated booking, event_id: 18
-
Deleted booking, event_id: 19
-
New expense, event_id: 21
-
Updated expense, event_id: 22
-
Deleted expense, event_id: 23
-
New person, event_id: 26
-
Updated person, event_id: 27
-
Archived person, event_id: 28
-
New company, event_id: 29
-
Updated company, event_id: 30
-
Archived company, event_id: 31
-
New payment, event_id: 32
-
Updated payment, event_id: 33
-
Deleted payment, event_id: 34
Webhook state
-
Working, state_id: 1
-
Issues, state_id: 2
-
Waiting, state_id: 3
Webhook type
-
Webhook, type_id: 1
-
Zapier, type_id: 2
Webhook Signature
All webhooks are signed with a unique signature in the request header named ‘Productive-Signature’. Productive-Signature contains a timestamp designated with t=
and a signature designated with s=
.
Example of a signature:
Productive-Signature: t=1568031758, s=e8dddb4e3db0faf0c970943bb53b23e27af4d46eb770cac9312fe29a4034ddb1
A signature can be created from:
-
a token: unique token of the webhook
-
a timestamp: timestamp of current time when a webhook was called
-
a payload: serialised object as JSON
To authenticate a signature, generate one and compare it to the one in the header with the following:
OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), {token}, "{timestamp}.{payload.to_json}")
Webhook Retry
For all webhook executions which do not respond with status code 2xx, webhook will retry with 11 more executions for the next 12 hours.
Rate limits
Webhooks are limited to 1000 requests per 5 minutes.
If the limit is exceeded you will receive an email notification.
GET /api/v2/webhooks
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": [
{
"id": "39",
"type": "webhooks",
"attributes": {
"name": "Webhook",
"event_id": 1,
"state_id": null,
"retry_attempts": null,
"deactivated_at": null,
"signature_token": "abc",
"target_url": "http://productive.io",
"type_id": 1,
"test": false,
"custom_headers": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2208"
}
},
"creator": {
"meta": {
"included": false
}
}
}
}
],
"links": {
"first": "http://api-test.productive.io/api/v2/webhooks?page%5Bnumber%5D=1&page%5Bsize%5D=30",
"last": "http://api-test.productive.io/api/v2/webhooks?page%5Bnumber%5D=1&page%5Bsize%5D=30"
},
"meta": {
"current_page": 1,
"total_pages": 1,
"total_count": 1,
"page_size": 30,
"max_page_size": 200
}
}
Get webhooksGET/api/v2/webhooks
GET /api/v2/webhooks/40
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "40",
"type": "webhooks",
"attributes": {
"name": "Webhook",
"event_id": 1,
"state_id": null,
"retry_attempts": null,
"deactivated_at": null,
"signature_token": "abc",
"target_url": "http://productive.io",
"type_id": 1,
"test": false,
"custom_headers": {}
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2209"
}
},
"creator": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
POST /api/v2/webhooks
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "webhooks",
"attributes": {
"name": "webhook",
"event_id": 1,
"target_url": "https://webhook.site",
"type_id": 1
}
}
}
Headers
Content-Type: application/vnd.api+json; charset=utf-8
Body
{
"data": {
"id": "42",
"type": "webhooks",
"attributes": {
"name": "webhook",
"event_id": 1,
"state_id": 3,
"retry_attempts": null,
"deactivated_at": null,
"signature_token": "8b09b272-28f3-41cb-8798-ddbe6f777e11",
"target_url": "https://webhook.site",
"type_id": 1,
"test": false,
"custom_headers": null
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "2210"
}
},
"creator": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}
Create a webhookPOST/api/v2/webhooks
- name
string
(optional) Example: Namename
- event_id
number
(required) Example: 7webhook event id
- target_url
string
(required) Example: http%3A%2F%2Fwebhook.comtarget url
DELETE /api/v2/webhooks/46
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+json
Generated by aglio on 10 May 2025