Adding Employees

In this article, you will discover how to add employees to the Gamfi application using the API.

To add a new employee to the Gamfi application use the method and endpoint:

POST + /api/app_api_admin.php/v2/workflows/integration/user

Example cURL:

curl --location 'https://{app_name}.gamfi.io/api/app_api_admin.php/v2/workflows/integration/user' \
--header 'X-Samus-Authorization-Api-Key: {apiKey}' \
--header 'X-Samus-Authorization-Api-Secret: {apiSecret}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "forename": "John",
  "surname": "Doe",
"company": "714f3759-d2a4-4ccb-ae6e-ae05e9b2c51",
    "email": "john.doe@gamfi.com",
    "phone": "0048123456789"
}'
In place:
  • {app_name} - insert the name of your application
  • {apiKey} - insert API key
  • {apiSecret} - insert API secret
The request structure should contain the following data:
  • "forename": employee's first name
  • "surname": employee's last name
  • "company": the user's company ID (check Getting list of companies)
  • "email": employee's email address
  • "phone": employee's phone number (optional)

If the response is correct (200), you will receive a confirmation:

{"id":27,"forename":"John","surname":"Doe","email":"john.doe@gamfi.com","phone":"0048123456789","avatar":null,"roles":["ROLE_API_USER"],"created_at":"2024-02-22T14:29:42+00:00","unreported":false,"hidden":false,"active":true,"allows_batch_messaging":true}