Create webhook

POST

/public/v3/webhooks

A webhook is a service that allows one program to send data to another program as soon as an event has occurred.

You can create webhooks for the events described below. You must provide a URL for each webhook you create.

Planky will send a POST request to that URL when specific events occur.

Webhook TypeWebhook RuleExample POST
ACCOUNT_AUTHORIZATION_GRANTEDThe event is triggered when bank account is re-authorized by Customer
1 2 3 4 5 6 { 'msg': 'Account authorization is granted', 'customer_id': 123, 'account_id': 123, 'webhook_type': 'ACCOUNT_AUTHORIZATION_GRANTED' }
ACCOUNT_AUTHORIZATION_LOSTThe event is triggered when account access is no longer available and the Customer must re-authorize access to Friendlyscore
1 2 3 4 5 6 { 'msg': 'Account authorization is lost', 'customer_id': 123, 'account_id': 123, 'webhook_type': 'ACCOUNT_AUTHORIZATION_LOST' }
REPORT_AVAILABLEThe event is triggered when bank account data is shared for the first time and all processing steps including account holder verification, transaction classification and financial insights are completed.
1 2 3 4 5 { 'msg': 'Customer report is available', 'customer_id': 123, 'webhook_type': 'REPORT_AVAILABLE' }
REPORT_UPDATEDThe event is triggered when new bank account data is available and all processing steps including account holder verification, transaction classification and financial insights are completed.
1 2 3 4 5 { 'msg': 'Customer report is updated', 'customer_id': 123, 'webhook_type': 'REPORT_UPDATED' }
NEW_EVENTThe event is triggered when new event / alert has occurred. See also Events Dictionary
1 2 3 4 5 6 { 'msg': 'Customer new event: EVENT', 'event_id': 123, 'customer_id': 123, 'webhook_type': 'NEW_EVENT' }

Parameters

none

Query parameters

none

Request Body Parameters

ParameterData typeRequired?Description
urlstringyesValid URL for webhook
commentstringnoOptional comment

Response Body Parameters

ParameterData typeRequired?Description
idstringyesWebhook ID

Request example

1 2 3 4 5 6 curl --location --request POST 'https://api.friendlyscore.com/public/v3/webhooks' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {access_token}' \ --data-raw '{ "url": "https://example.com:8080/example-webhook" }'

Response example:

1 2 3 { "webhook_id": "1234" }

Was this article helpful?

Friendly Score UK Ltd.

84 Brook Street

London W1K 5EH

Call us on +44 20 3709 6726

Company registered in England

Company number 09168668, ICO ZA111687

VAT registration number 206 9758 80

Authorised and Regulated by the Financial Conduct Authority. (FRN: 821100, 781963)