Create a webhook
direct.lempile.com/api/v1/webhooksRegisters a URL for one source's events. The webhook belongs to the key's workspace: only that workspace's accounts send to it. The poller starts reading the accounts it covers within a minute.
Authentication
X-API-KEY header·A Lempile Direct key, one per workspace, made in Lempile's dashboard.Request body
request_urlstringrequiredWhere events are POSTed: https (http only to 127.0.0.1 or localhost).
sourcestringrequiredOne ofmessagingusersaccount_statusnamestring200 characters at most; sent as
webhook_namein messaging and users payloads.formatstringOne ofjsonformDefaultjsonheadersarray of WebhookHeaderUp to 20 headers sent with every delivery (your secret goes here). Values are kept encrypted and never shown again.
›Show fieldsHide fields
keystringrequiredvaluestringrequired
eventsarray of stringDefault: every event of the source.
account_idsarray of stringOnly these accounts. Default (empty): every account of the key's workspace. Another workspace's account named here never sends.
dataarray of WebhookDataKeySend only these keys, renamed (messaging and users only).
›Show fieldsHide fields
keystringrequiredA key of the payload (see each source's payload).
namestringrequiredThe name it's sent under.
enabledbooleanDefaulttrue
Responses
201Created
›
application/json
objectstringrequiredAlwaysWebhookCreatedwebhook_idstringrequired
400A required parameter missing (errors/missing_parameters), or one that isn't valid (errors/invalid_parameters, errors/invalid_url, errors/content_too_large).
›
errors/missing_parameters), or one that isn't valid (errors/invalid_parameters, errors/invalid_url, errors/content_too_large).application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
401errors/missing_credentials: the X-API-KEY header is missing, wrong or revoked. errors/disconnected_account: LinkedIn signed the account out (or asks it for a security check); reconnect it.
›
errors/missing_credentials: the X-API-KEY header is missing, wrong or revoked. errors/disconnected_account: LinkedIn signed the account out (or asks it for a security check); reconnect it.application/json
titlestringrequiredA short title, e.g.
Too many requests.detailstringrequiredWhat happened, in plain words. Never an account's data.
typestringrequiredUnipile's error type:
errors/<kind>. Branch on this, not ondetail.statusintegerrequiredThe HTTP status again.
retry_afterintegerSeconds to wait before trying this account again. Only on 429; the
Retry-Afterheader carries the same value.
Was this page helpful?