curl --request POST \
  --url https://{domain}-be.glean.com/api/index/v1/indexemployee \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json; charset=UTF-8' \
  --data '{
  "employee": {
    "email": "<string>",
    "firstName": "<string>",
    "lastName": "<string>",
    "preferredName": "<string>",
    "id": "<string>",
    "phoneNumber": "<string>",
    "location": "<string>",
    "structuredLocation": {
      "deskLocation": "<string>",
      "timezone": "<string>",
      "address": "<string>",
      "city": "<string>",
      "state": "<string>",
      "region": "<string>",
      "zipCode": "<string>",
      "country": "<string>",
      "countryCode": "<string>"
    },
    "title": "<string>",
    "photoUrl": "<string>",
    "businessUnit": "<string>",
    "department": "<string>",
    "datasourceProfiles": [
      {
        "datasource": "github",
        "handle": "<string>",
        "url": "<string>",
        "nativeAppUrl": "<string>",
        "isUserGenerated": true
      }
    ],
    "teams": [
      {
        "id": "<string>",
        "name": "<string>",
        "url": "<string>"
      }
    ],
    "startDate": "2023-12-25",
    "endDate": "2023-12-25",
    "bio": "<string>",
    "pronoun": "<string>",
    "alsoKnownAs": [
      "<string>"
    ],
    "profileUrl": "<string>",
    "socialNetworks": [
      {
        "name": "<string>",
        "profileName": "<string>",
        "profileUrl": "<string>"
      }
    ],
    "managerEmail": "<string>",
    "managerId": "<string>",
    "type": "FULL_TIME",
    "relationships": [
      {
        "name": "<string>",
        "email": "<string>"
      }
    ],
    "status": "CURRENT",
    "additionalFields": [
      {
        "key": "<string>",
        "value": [
          {}
        ]
      }
    ]
  },
  "version": 123
}'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json; charset=UTF-8

Info about an employee and optional version for that info

employee
object
required

Info about the employee

version
integer

Version number for the employee object. If absent or 0 then no version checks are done

Response

200

OK