Skip to content

Create employee

Request

Create a new employee for a company.

Security
oauth2(Required scopes: employee:create) or bearerAuth or apiKeyHeader
Bodyapplication/jsonrequired
firstNamestring, [ 1 .. 50 ] characters

The employee's first name.

lastNamestring, [ 1 .. 50 ] characters

The employee's last name.

emailstring or null, [ 1 .. 100 ] characters

The employee's email address.

externalIdstring or null

The lender's external identifier for the employee.

jobNamestring or null, [ 1 .. 100 ] characters

The name of position in the company—e.g., "CEO", "Agent", "Supervisor"

managerEmployeeIdstring or null(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-only

The ID of the employee's manager

phonestring or null, [ 1 .. 16 ] characters

The employee's phone number.

teamsArray of objects(Team)
userIdstringwrite-onlyrequired

The ID of the user associated with this employee

POST
/employees
curl -i -X POST \
  https://sandboxapi.peach.finance/api/employees \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "firstName": "string",
    "lastName": "string",
    "email": "string",
    "externalId": "string",
    "jobName": "string",
    "managerEmployeeId": "string",
    "phone": "string",
    "teams": [
      {
        "email": "string",
        "externalId": "string",
        "name": "string"
      }
    ],
    "userId": "string"
  }'

Responses

Success

Bodyapplication/json
messagestring

Description of the server action or error.

statusinteger

HTTP status code.

dataobject(Employee)

An employee in the company

Response
{ "message": "string", "status": 0, "data": { "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "updatedAt": "2019-08-24T14:15:22Z", "firstName": "string", "lastName": "string", "assignedInvestorIds": [ … ], "availableAndPermittedTasktypes": [ … ], "companyId": "string", "displayName": "string", "email": "string", "externalId": "string", "jobName": "string", "object": "Employee", "phone": "string", "teams": [ … ], "user": { … } } }