Staff Roles
Manage the roles that can be assigned to staff members (e.g., Guide, Instructor, Manager).
List Rolesโ
Get all staff roles for your account.
Endpointโ
GET /v1/staff/roles
Example Requestโ
curl -X GET "https://app.equipdash.com/api/v1/staff/roles" \
-H "Authorization: Bearer YOUR_API_KEY"
Responseโ
{
"data": {
"roles": [
{
"id": 1,
"name": "Guide",
"staff_count": 5,
"created_at": "2026-01-01T00:00:00+00:00"
},
{
"id": 2,
"name": "Instructor",
"staff_count": 3,
"created_at": "2026-01-15T10:00:00+00:00"
},
{
"id": 3,
"name": "Manager",
"staff_count": 2,
"created_at": "2026-01-20T09:00:00+00:00"
}
]
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}
Create Roleโ
Create a new staff role.
Endpointโ
POST /v1/staff/roles
Request Bodyโ
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Role name (max 100 chars) |
Example Requestโ
curl -X POST "https://app.equipdash.com/api/v1/staff/roles" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Technician"
}'
Responseโ
{
"data": {
"id": 4,
"name": "Technician",
"staff_count": 0,
"created_at": "2026-02-01T10:00:00+00:00"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}
Update Roleโ
Update an existing staff role.
Endpointโ
PATCH /v1/staff/roles/{id}
Request Bodyโ
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | New role name |
Example Requestโ
curl -X PATCH "https://app.equipdash.com/api/v1/staff/roles/4" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Senior Technician"
}'
Responseโ
{
"data": {
"id": 4,
"name": "Senior Technician",
"staff_count": 0,
"created_at": "2026-02-01T10:00:00+00:00"
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-02-01T10:00:00+00:00"
}
}
Delete Roleโ
Delete a staff role.
Endpointโ
DELETE /v1/staff/roles/{id}
Example Requestโ
curl -X DELETE "https://app.equipdash.com/api/v1/staff/roles/4" \
-H "Authorization: Bearer YOUR_API_KEY"
Responseโ
Returns 204 No Content on success.
Error Responsesโ
Role In Useโ
{
"error": {
"code": "conflict",
"message": "Cannot delete role. It is assigned to 3 staff member(s)."
}
}
Cannot Delete Guide Roleโ
{
"error": {
"code": "conflict",
"message": "The Guide role cannot be deleted."
}
}
Assigning Roles to Staffโ
When creating or updating a staff member, you can assign roles using the role_ids field:
Create Staff with Roleโ
curl -X POST "https://app.equipdash.com/api/v1/staff" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"role_ids": [1, 2]
}'
Update Staff Rolesโ
curl -X PATCH "https://app.equipdash.com/api/v1/staff/123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"role_ids": [1, 3]
}'
Response with Rolesโ
{
"data": {
"id": 123,
"first_name": "John",
"last_name": "Doe",
"roles": [
{
"id": 1,
"name": "Guide"
},
{
"id": 3,
"name": "Manager"
}
]
}
}
Assigning Locations to Staffโ
Assign work locations to staff members using main_location_id and location_ids:
Create Staff with Locationsโ
curl -X POST "https://app.equipdash.com/api/v1/staff" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"main_location_id": 1,
"location_ids": [2, 3]
}'
Update Staff Locationsโ
curl -X PATCH "https://app.equipdash.com/api/v1/staff/456" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"main_location_id": 2,
"location_ids": [1, 3]
}'
Response with Locationsโ
{
"data": {
"id": 456,
"first_name": "Jane",
"last_name": "Smith",
"main_location": {
"id": 2,
"name": "Downtown Store"
},
"locations": [
{
"id": 1,
"name": "Main Warehouse",
"is_main": false
},
{
"id": 3,
"name": "Beach Location",
"is_main": false
}
]
}
}
Notesโ
- The "Guide" role is a system role and cannot be deleted
- A role cannot be deleted while assigned to staff members
- When updating staff roles/locations, the provided arrays replace existing assignments
- Use
GET /v1/settings/locationsto get available location IDs