Employees
As the name suggests, employees are a core part of Uplodr — the very reason Uplodr exists is so you can have secure transcripts with your employees. On this page, we'll dive into the different employee endpoints you can use to manage employees programmatically. We'll look at how to query, create, update, and delete employees.
The employee model
The employee model contains all the information about your employees, such as their username, avatar, and phone number. It also contains a reference to the transcript between you and the employee and information about when they were last active on Uplodr.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the employee.
- Name
username- Type
- string
- Description
The username for the employee.
- Name
phone_number- Type
- string
- Description
The phone number for the employee.
- Name
avatar_url- Type
- string
- Description
The avatar image URL for the employee.
- Name
display_name- Type
- string
- Description
The employee display name in the employee list. By default, this is just the username.
- Name
transcript_id- Type
- string
- Description
Unique identifier for the transcript associated with the employee.
- Name
last_active_at- Type
- timestamp
- Description
Timestamp of when the employee was last active on the platform.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the employee was created.
List all employees
This endpoint allows you to retrieve a paginated list of all your employees. By default, a maximum of ten employees are shown per page.
Optional attributes
- Name
limit- Type
- integer
- Description
Limit the number of employees returned.
Request
curl -G https://api.uplodr.chat/v1/employees \
-H "Authorization: Bearer {token}" \
-d active=true \
-d limit=10
Response
{
"has_more": false,
"data": [
{
"id": "WAz8eIbvDR60rouK",
"username": "FrankMcCallister",
"phone_number": "1-800-759-3000",
"avatar_url": "https://assets.uplodr.chat/avatars/frank.jpg",
"display_name": null,
"transcript_id": "xgQQXg3hrtjh7AvZ",
"last_active_at": 705103200,
"created_at": 692233200
},
{
"id": "hSIhXBhNe8X1d8Et"
// ...
}
]
}
Create a employee
This endpoint allows you to add a new employee to your employee list in Uplodr. To add a employee, you must provide their Uplodr username and phone number.
Required attributes
- Name
username- Type
- string
- Description
The username for the employee.
- Name
phone_number- Type
- string
- Description
The phone number for the employee.
Optional attributes
- Name
avatar_url- Type
- string
- Description
The avatar image URL for the employee.
- Name
display_name- Type
- string
- Description
The employee display name in the employee list. By default, this is just the username.
Request
curl https://api.uplodr.chat/v1/employees \
-H "Authorization: Bearer {token}" \
-d username="FrankMcCallister" \
-d phone_number="1-800-759-3000" \
-d avatar_url="https://assets.uplodr.chat/avatars/frank.jpg"
Response
{
"id": "WAz8eIbvDR60rouK",
"username": "FrankMcCallister",
"phone_number": "1-800-759-3000",
"avatar_url": "https://assets.uplodr.chat/avatars/frank.jpg",
"display_name": null,
"transcript_id": "xgQQXg3hrtjh7AvZ",
"last_active_at": null,
"created_at": 692233200
}
Retrieve a employee
This endpoint allows you to retrieve a employee by providing their Uplodr id. Refer to the list at the top of this page to see which properties are included with employee objects.
Request
curl https://api.uplodr.chat/v1/employees/WAz8eIbvDR60rouK \
-H "Authorization: Bearer {token}"
Response
{
"id": "WAz8eIbvDR60rouK",
"username": "FrankMcCallister",
"phone_number": "1-800-759-3000",
"avatar_url": "https://assets.uplodr.chat/avatars/frank.jpg",
"display_name": null,
"transcript_id": "xgQQXg3hrtjh7AvZ",
"last_active_at": 705103200,
"created_at": 692233200
}
Update a employee
This endpoint allows you to perform an update on a employee. Currently, the only attribute that can be updated on employees is the display_name attribute which controls how a employee appears in your employee list in Uplodr.
Optional attributes
- Name
display_name- Type
- string
- Description
The employee display name in the employee list. By default, this is just the username.
Request
curl -X PUT https://api.uplodr.chat/v1/employees/WAz8eIbvDR60rouK \
-H "Authorization: Bearer {token}" \
-d display_name="UncleFrank"
Response
{
"id": "WAz8eIbvDR60rouK",
"username": "FrankMcCallister",
"phone_number": "1-800-759-3000",
"avatar_url": "https://assets.uplodr.chat/avatars/frank.jpg",
"display_name": "UncleFrank",
"transcript_id": "xgQQXg3hrtjh7AvZ",
"last_active_at": 705103200,
"created_at": 692233200
}
Delete a employee
This endpoint allows you to delete employees from your employee list in Uplodr. Note: This will also delete your transcript with the given employee.
Request
curl -X DELETE https://api.uplodr.chat/v1/employees/WAz8eIbvDR60rouK \
-H "Authorization: Bearer {token}"