Introduction

Welcome to Personio Webhooks! Personio offers Webhooks as a mode of integration to build applications that listen to changes in state within Personio.

Managing Webhooks

The Webhooks API offers a way to manage webhooks. The enabled_events list can be used to obtain granular access to events of interest. Webhooks will be dispatched as POST requests to the subscribed endpoint, which needs to be an HTTPS endpoint.

Acknowledgment

Each webhook request needs to be acknowledged within 3s with a 2xx status code to be counted as a successful delivery. Please note that webhook requests will not follow redirects.

Retries

At times, receiving a webhook may not succeed due to transient failures. In situations where a webhook is not acknowledged within 3s or is responded to with a HTTP 5xx error code, Personio will perform multiple attempts.

Event Payload Structure

The general structure of a webhook payload will be a JSON containing the following fields.

  • company_id - The company ID for the given event. Required for tenant identification.
  • event_name - The name of the event, identifies the type of change.
  • occurred_at- When the event occurred.
  • payload - The contents of the webhook event, varies per event type.
  • meta - Any supporting information, expected to be a generic map of key value pairs. Optional.

All Personio Webhooks conform to the following JSON schema:

{  
  "$schema": "<https://json-schema.org/draft/2019-09/schema">,  
  "type": "object",  
  "properties": {  
    "company_id": {  
      "type": "string"  
    },  
    "occurred_at": {  
      "type": "string",  
      "format": "date-time"  
    },  
    "payload": {  
      "type": "object"  
    },  
    "meta": {  
      "type": "object"  
    },  
    "event_name": {  
      "type": "string"  
    }  
  },  
  "required": ["company_id", "occurred_at", "payload", "event_name"]  
}

Event Catalog

📘

The concept of Person has a 1-1 relationship with the concept of Employee, hence the Person ID may be interchangeably used for Employee ID in all APIs.

person.created

The person.created webhook will be fired every time a new Person/Employee is created.

{  
  "company_id": "121315",  
  "occurred_at": "2024-02-05T18:07:02.069Z",  
  "payload": {  
    "person": {  
      "id": "343536"  
    }  
  },  
  "meta": {},  
  "event_name": "person.updated"  
}

person.updated

The person.updated webhook will be fired every time certain fields of a Person/Employee is updated. The fields that will trigger an event are as follows:

  • First Name
  • Last Name
  • Preferred Name
  • Gender
  • Email
  • Language
  • Any custom attributes attached to the employee profile
{  
  "company_id": "121315",  
  "occurred_at": "2024-02-05T18:05:02.069Z",  
  "payload": {  
    "person": {  
      "id": "343536"  
    }  
  },  
  "meta": {},  
  "event_name": "person.created"  
}

person.deleted

The person.deleted webhook will be fired every time a new Person/Employee is deleted.

{  
  "company_id": "121315",  
  "occurred_at": "2024-02-05T18:05:02.069Z",  
  "payload": {  
    "person": {  
      "id": "343536"  
    }  
  },  
  "meta": {},  
  "event_name": "person.deleted"  
}

employment.created

The employment.created webhook will be fired every time a new Person/Employment is created.

{
  "company_id": "27277",
  "occurred_at": "2024-06-03T12:19:30.103Z",
  "payload": {
    "employment": {
      "person_id": "23566325"
    }
  },
  "meta": {},
  "event_name": "employment.created"
}

employment.updated

The employment.updated webhook will be fired every time certain fields of an Employment is updated. The fields that will trigger an event are as follows:

  • Department
  • Office
  • Subcompany
  • Position
  • Supervisor
  • Probation period end
  • Probation period months
  • Status
  • Employment type
  • Hire date
  • Last day of work
  • Termination date
  • Termination reason
  • Termination type
  • Effective Termination date
  • Contract ends
  • Weekly hours
  • Team

{
  "company_id": "27277",
  "occurred_at": "2024-06-03T12:28:02.299Z",
  "payload": {
    "employment": {
      "person_id": "13866558"
    }
  },
  "meta": {},
  "event_name": "employment.updated"
}

employment.deleted

The employment.deleted webhook will be fired every time a Person/Employment is deleted.

{
  "company_id": "27277",
  "occurred_at": "2024-06-03T12:19:57.660Z",
  "payload": {
    "employment": {
      "person_id": "23566325"
    }
  },
  "meta": {},
  "event_name": "employment.deleted"
}