Overview
Use these public APIs to create, update, and delete employees in your Swif organization:
POST /restful/organization/employeesPUT /restful/organization/employees/:employeeIdDELETE /restful/organization/employees/:employeeIdYou can also list your teams with
GET /restful/organization/teamsand filterGET /restful/organization/employeesby team. See section 6.GET /restful/organization/employees/:employeeId
These endpoints are designed for customer integrations (HRIS, IAM, internal tools) and complement the existing public GET /restful/organization/employees endpoint (paging employees).
You can find your API key here:
Your API key token for Swif.ai | Help Center | Swif.ai
For general patterns and examples of using Swif APIs, see:
APIs – Device and evidence retrieval | Help Center | Swif.ai
1. Base URL and authentication
Base URL
Use the correct domain for your tenant:
Global tenant:
https://api.swifteam.comEU tenant:
https://api.eu.swifteam.com
Example full URLs
Replace api.swifteam.com with api.eu.swifteam.com if your org is on the EU tenant.
Authentication
All endpoints use your organization public API token.
Headers
Authorization: Bearer <YOUR_ORG_PUBLIC_API_TOKEN> Content-Type: application/json Accept: application/json
If the token is missing, invalid, expired, or for another organization, the APIs return:
401 Unauthorizedor403 Forbidden
2. Create employee
Endpoint
POST /restful/organization/employees
Creates a new employee in your organization (same entity visible in the Swif Admin Console).
Request body
The payload must follow the employee model defined in the public Postman collection for these APIs.
You must provide all required fields (such as
email,firstName,lastName,status, and any other required fields for your tenant).Optional fields (e.g., identifiers, title, department, manager reference, dates, labels) can also be provided.
Unknown fields are rejected with clear validation errors (they are not silently ignored).
Example – minimal payload
{
"email": "userA@example.com",
"firstName": "User",
"lastName": "Example",
"status": "ACTIVE"
}Example – extended payload (illustrative)
{
"email": "userB@example.com",
"firstName": "Alex",
"lastName": "Doe",
"status": "ACTIVE",
"employeeId": "E-12345",
"title": "Senior Engineer",
"department": "Engineering",
"managerId": "69a065901f00006c00210832",
"startDate": "2024-01-15",
"endDate": null,
"labels": ["full-time", "remote-us"],
"identifiers": {
"hrisId": "HR-0001",
"idpId": "00u1234567890abcDEF7"
}
}The exact field list, required fields, and enum values (e.g., valid status values) are defined in the latest Postman collection for these endpoints.
Response
Status:
201 Created(or200 OKdepending on spec)Body: The created employee object, including the generated internal
id:
{
"id": "69a065901f00006c00210832",
"email": "userB@example.com",
"firstName": "Alex",
"lastName": "Doe",
"status": "ACTIVE"
// ... other fields
}Use this internal id in subsequent PUT and DELETE calls.
Validation and error handling
Typical behaviors:
Missing required field
Status:
400 Bad RequestBody: Error describing which field is missing or invalid.
No employee is created.
Duplicate unique value (e.g.,
emailor uniqueemployeeId)Status:
400or409 ConflictBody: Error indicating duplicate constraint (for example, “email already exists”).
No duplicate employee is created; the existing employee remains unchanged.
3. Update employee
Endpoint
PUT /restful/organization/employees/:employeeId
Updates an existing employee using the internal Swif employee id.
:employeeIdis the internalidreturned fromPOST /restful/organization/employeesor retrieved viaGET /restful/organization/employees.It is not necessarily your HRIS or HR “employee number” (unless you map that into a custom field).
Request
PUT https://api.swifteam.com/restful/organization/employees/69a065901f00006c00210832
Authorization: Bearer <TOKEN>
Content-Type: application/json
The request body must follow the payload shape defined in the Postman collection for updateEmployeeForPartner. That contract also defines whether PUT is treated as:
Full replace – omitted optional fields may be cleared/reset, or
Partial update – omitted fields are left unchanged.
Example – update job details
{
"title": "Staff Engineer",
"department": "Platform Engineering",
"status": "ACTIVE",
"labels": ["full-time", "remote-us", "platform"]
}Response
Status:
200 OKBody: The full employee object as stored after the update.
Error behavior
Employee not found
Status:
404 Not FoundBody: Error such as
"Employee not found".No data is created or changed.
Validation errors
Status:
400 Bad RequestBody: Error describing invalid fields (e.g., invalid enum, malformed date, unknown field name).
Behavior for partial vs full update follows the updated contract used in testing (see Postman payload used in QA scenarios).
4. Delete employee
Endpoint
DELETE /restful/organization/employees/:employeeId
Deletes (or soft‑deletes, depending on implementation) an employee by internal id.
Request
DELETE https://api.swifteam.com/restful/organization/employees/69a065901f00006c00210832 Authorization: Bearer <TOKEN>
Response
Status:
204 No Content(or another success status defined in the spec)Body: Empty.
After a successful delete:
The employee no longer appears in
GET /restful/organization/employeesresults for your organization.Internal tools (e.g., Employee Manager) show the employee as removed/soft‑deleted, depending on implementation.
Error behavior
Employee not found
Status:
404 Not Found(or equivalent)Body: Error such as
"Employee not found".No side effects and no 500 error.
5. Read employees and IDs for use with PUT/DELETE
Use the public GET /restful/organization/employees endpoint to:
Confirm that a newly created employee appears in the list.
Retrieve the internal
idto pass into:PUT /restful/organization/employees/:employeeIdDELETE /restful/organization/employees/:employeeId
Verify that updates or deletes have taken effect.
For looking up one employee, check #8. Get an employee by ID.
6. Teams: list teams and filter employees by team
Every employee record includes the employee's primary team. You can also limit the employee list to one team. Requests that don't include teamId work exactly as before, so existing integrations don't need any changes.
How it works:
Call
GET /restful/organization/teamsto get your team IDs.Add
teamId=<id>toGET /restful/organization/employees.
List teams
Endpoint
GET /restful/organization/teams
This returns your organization's active teams, sorted by name and then by ID. It doesn't take any parameters.
Request
curl --location 'https://api.swifteam.com/restful/organization/teams' \
--header 'Authorization: Bearer <YOUR_ORG_PUBLIC_API_TOKEN>'
Response
{
"records": [
{ "teamId": "6667d7c93300001200972f03", "teamName": "Engineering" },
{ "teamId": "68a71f053000001f00873d00", "teamName": "Sales" }
],
"meta": {
"totalCount": 2,
"resultCount": 2,
"haveMore": false
}
}Field | Type | Description |
| string | The team's ID (24 hexadecimal characters) |
| string (optional) | The team's name |
Filter employees by team
Endpoint
GET /restful/organization/employees?teamId={Id}
teamId is optional. You can still use q, offset (default 0) and limit (default 10) with it.
The filter only looks at each employee's primary team.
When you filter by team, the
metacounts include only the matching employees.
Request
curl --location 'https://api.swifteam.com/restful/organization/employees?teamId=6667d7c93300001200972f03&offset=0&limit=10' \
--header 'Authorization: Bearer <YOUR_ORG_PUBLIC_API_TOKEN>'
Response
{
"records": [
{
"id": "69a065901f00006c00210832",
"firstName": "Alex",
"lastName": "Doe",
"emails": ["alex.doe@example.com"],
"emailInfos": [
{ "value": "alex.doe@example.com", "type": "work", "primary": true }
],
"department": "Engineering",
"isActive": true,
"relatedInfo": {
"deleted": false,
"status": "ACTIVE",
"employmentType": "FULL_TIME",
"source": "MANUAL"
},
"teamId": "6667d7c93300001200972f03",
"teamName": "Engineering"
}
],
"meta": {
"totalCount": 1,
"resultCount": 1,
"haveMore": false
}
}
Team fields in employee records
GET /restful/organization/employees now returns two top-level fields in every record, whether or not you filter by team:
Field | Type | Description |
| string | ID of the employee's primary team |
| string (optional) | Name of that team. This can be missing for older records whose team is no longer active. |
Errors
HTTP status | Code | When it happens |
400 |
|
|
404 |
| The team doesn't exist, was deleted, or belongs to another organization. Message: "The team was not found in this organization." |
Both errors include a friendlyMessage that you can show to users.
7. Assign employees to teams
You can set an employee's primary team when you create or update them.
teamIdis optional onPOSTandPUT. If you send it, it must be the 24-character hexadecimal ID of an active team in your organization. CallGET /restful/organization/teamsto get team IDs (see section 6).Create and update responses include
teamIdandteamName.teamNamemay be missing if the team isn't active or has no name.
Create an employee in a team
POST /restful/organization/employees
If you… | Result |
Leave out | The employee goes to your organization's default team. |
Send a valid | The employee goes to that team. |
Send | Error 400 |
curl --location 'https://api.swifteam.com/restful/organization/employees' \
--header 'Authorization: Bearer <YOUR_ORG_PUBLIC_API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstName": "Alex",
"lastName": "Doe",
"emails": ["alex.doe@example.com"],
"teamId": "6667d7c93300001200972f03"
}'
Response: 200 OK with the created employee, including id, teamId and teamName.
Change an employee's team
PUT /restful/organization/employees/:employeeId
If you… | Result |
Send a valid | The employee's primary team changes to that team. |
Leave out | The employee stays in their current team. |
curl --location --request PUT 'https://api.swifteam.com/restful/organization/employees/69a065901f00006c00210832' \
--header 'Authorization: Bearer <YOUR_ORG_PUBLIC_API_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{ "teamId": "68a71f053000001f00873d00" }'
Response: 200 OK with the updated employee, including the new teamId and teamName.
Note: Changing an employee's team doesn't move their devices. Their devices stay in their current team and keep their policies.
8. Get an employee by ID
GET /restful/organization/employees/:employeeId
This returns one employee by their internal Swif id, including teamId and teamName.
curl --location 'https://api.swifteam.com/restful/organization/employees/69a065901f00006c00210832' \
--header 'Authorization: Bearer <YOUR_ORG_PUBLIC_API_TOKEN>'
Response: 200 OK with the employee record. teamName is included when the team is active and has a name.
Deleted employees and employees in other organizations aren't returned. Those requests get 404 EMPLOYEE_NOT_FOUND.
9. Team and employee ID errors
Errors come back in an errors array. Each entry has a type, a code and a friendlyMessage you can show to users.
{
"errors": [
{
"type": "invalid_request_error",
"code": "PUBLIC_API_INVALID_TEAM_ID",
"friendlyMessage": "teamId must be a valid 24-character ID."
}
]
}HTTP status | Code | Endpoints | When it happens |
400 |
| POST, PUT |
|
404 |
| POST, PUT | The team doesn't exist, was deleted or belongs to another organization |
400 |
| GET, PUT |
|
404 |
| GET, PUT | The employee doesn't exist, was deleted or belongs to another organization |
When a team ID is rejected, no employee is created or changed.