Skip to content
Support
ENFR

System integration

Webhooks

A webhook tells another system, the moment something happens in Rekruti, what just happened: a candidate signs up, a contract is created, a timesheet is approved, the invoices of a period are sent… Rekruti calls the address you give, with the values you choose, and the other system does the rest: copy the candidate into your payroll, push the invoices into your accounting, start a workflow.

1. How a webhook works

A webhook is tied to one event, such as Timesheet Approval. Each time the event happens, Rekruti makes an HTTP call to the URL of the webhook, right away. The call carries what you configured: values of your own (a key, an identifier of a workflow…) and values of the event, mainly the Gid, the identifier of what the event is about (the timesheet, the job, the candidate…).

The call carries this identifier, not the whole record: the other system reads what it needs from the Rekruti API with it, using an API key. Several webhooks may listen to the same event: each one is called.

2. Creating a webhook

Under SysAdmin, Webhook, add a webhook. Only a user with the SysAdmin role sees this page.

FieldWhat it is
NameA name of your own, to find it in the list.
UrlThe address Rekruti calls, given by the other system.
EventWhat triggers the call (see section 3).
MethodPOST, most of the time, or GET, as the other system requires.
Content TypeFor a POST, the format of its body: application/json, multipart/form-data or application/x-www-form-urlencoded.
EnabledOff, the webhook is never called. A new webhook is off until you turn it on.

The menu of a webhook lets you copy it, to make another one close to it, or delete it.

3. The events

The Gid column says which identifier the call carries.

Accounts

EventWhenGid
Account CreateAn account is created by your agency: a candidate, a client user, a member of your team, an invitation.The new account
Account SignUp CandidateA candidate signs up on their own.The new account
Account SignUp ClientA client signs up on their own.The new account
Account UpdateAn account or a profile is changed.The account
Account Update Legal NameThe legal name of a profile changes, such as the company a candidate invoices through.The profile
Account LoginA user logs in.The account
Account LogoutA user logs out.The account
Account Contact UsSomeone sends the contact form of your Rekruti site.The account of the sender, if logged in

Worksites

EventWhenGid
Worksite CreateA worksite is created.The worksite
Worksite UpdateA worksite is changed.The worksite
Worksite Update Legal NameThe legal name of a worksite changes, the name its invoices are made out to.The worksite
Worksite DeleteA worksite is deleted.The account of who did it

Jobs and timesheets

EventWhenGid
Job CreateA job (a contract) is created, by your team, by a client or by an AI agent.The job
Job UpdateA job, or one of its schedules, is changed, or a candidate is assigned to it.The job
Job DeleteA job is deleted.The job
Job AlertThe invitations of a job are sent to the matching candidates.The job
Timesheet CreateA timesheet is created.The timesheet
Timesheet UpdateA timesheet is changed.The timesheet
Timesheet ApprovalA timesheet is approved.The timesheet

Payables and receivables

EventWhenGid
Payable Period SendThe payables of a period are sent to the candidates.The payable period
Payable Invoice SendOne payable is sent to its candidate.The payable
Payable Period Post (accounting)A payable period is marked as entered in your accounting.The payable period
Receivable Period SendThe receivables of a period are sent to the clients.The receivable period
Receivable Invoice SendOne receivable is sent to its client.The receivable
Receivable Period Post (Accounting)A receivable period is marked as entered in your accounting.The receivable period
Payable Invoice Post, Receivable Invoice Post Listed, but not triggered for now.—

Chat

EventWhenGid
Chat Support Send TextA candidate or a client writes in the chat. Not the messages of your team.The chat message

4. The configuration

The Configuration tab of a webhook lists what the call carries, one line per value. Each line says where the value goes (In), its Variable Name, its Type and its Value.

InWhere the value goes
HeaderAn HTTP header. The usual place of a security key, such as Authorization or x-api-key.
CookieA cookie, for the rare systems that ask for one.
BodyThe body of a POST, in its content type.
QueryA parameter added to the URL, as in ?apikey=….
TypeValue
StringA text of your own, sent as is.
SecretThe same, for a password or a key.
JsonA JSON value of your own, such as an object or a list. In a JSON body it is sent as JSON; elsewhere, as its text.
VariableA value of the event: Gid (the identifier the event is about, see section 3), Event (its name, such as Timesheet Approval) or TenantGid (the identifier of your agency).

In a JSON body, a dot in the variable name builds an object: values.gid puts the value in {"values": {"gid": …}}. The Content-Type header is set by Rekruti, from the Content Type of the webhook.

5. An example

To start a workflow of an automation platform each time a timesheet is approved, the platform asks for a POST in JSON, with its key in a header and the workflow to start in the body:

InVariable NameTypeValue
Headerx-api-keySecretthe key the platform gave you
Bodyworkflow_uuidStringthe identifier of the workflow
Bodyvalues.gidVariableGid
Bodyvalues.eventVariableEvent

With the event Timesheet Approval, the platform receives:

POST https://automation.example.com/hooks/start
x-api-key: ••••••••
Content-Type: application/json

{
  "workflow_uuid": "6c1f…",
  "values": {
    "gid": "886428bc-88e5-41f3-889e-a730240b1ab1",
    "event": "Timesheet Approval"
  }
}

The workflow then reads the timesheet from the Rekruti API with that gid.

6. The log

The Log tab of a webhook keeps every call: its Date, the Request sent (headers, cookies, query and body), the Status answered by the other system, its Response, and the Error, if the call failed. It is the first place to look when the other system says it received nothing.

7. Tips and troubleshooting

  • Try it with a test service — point the URL of a webhook to a request inspector, such as webhook.site, trigger the event, and see exactly what Rekruti sends.
  • Nothing in the log — the webhook is not Enabled, or the event has not happened since; check the event chosen.
  • Status 401 or 403 — the other system refuses the key: check the header (its name and its value) or the query parameter it expects.
  • Status 400 or 415 — the body is not what the other system expects: check the Content Type and the variable names.
  • A failed call is not retried — Rekruti calls once. The log keeps the failure; the other system can catch up by reading the Rekruti API.

A question this guide does not answer? Ask our assistant, at the bottom right of this page, or write to us.