Create a webhook subscription

POST {{baseUrl}}/v1/webhook_subscriptions

Create a webhook subscription to receive events of the specified subscription_types whenever there is a state change.

📘 Token Authentication

This endpoint uses the organization level api token and the Token scheme with HTTP Authorization header.

scope: webhook_subscriptions:write

Request Body

{"url"=>"<string>", "subscription_types"=>["<string>", "<string>"]}

HEADERS

KeyDatatypeRequiredDescription
X-Gusto-API-VersionstringDetermines the date-based API version associated with your API call. If none is provided, your application's minimum API version is used.
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;uuid&quot;:&quot;c5fdae57-5483-4529-9aae-f0edceed92d4&quot;,&quot;url&quot;:&quot;https://the-partner-app.com/subscriber&quot;,&quot;status&quot;:&quot;verified&quot;,&quot;subscription_types&quot;:[&quot;BankAccount&quot;,&quot;Company&quot;,&quot;CompanyBenefit&quot;,&quot;Contractor&quot;,&quot;ContractorPayment&quot;,&quot;Employee&quot;,&quot;EmployeeBenefit&quot;,&quot;EmployeeJobCompensation&quot;,&quot;ExternalPayroll&quot;,&quot;Form&quot;,&quot;Location&quot;,&quot;Notification&quot;,&quot;Payroll&quot;,&quot;PaySchedule&quot;,&quot;Signatory&quot;]}