Skip to content

CreateUser

POST/api/v1/users

Create a user. Users normally arrive from an integration’s sync, so this is for the ones that don’t.

Example request

curl -X POST \
-H "Authorization: Bearer ${OBLIQUE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{ "displayName": "string", "email": "string" }' \
"https://us.oblique.security/api/v1/users"

Set OBLIQUE_API_KEY to your API key.

Query parameters

  • userIdstring

    ID of the user to create. This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/.

Request body

  • namestring

    Assigned by Oblique. Format: users/{id}

  • createTimestring (date-time)read-only

    Create and update timestamps.

  • updateTimestring (date-time)read-only
  • deleteTimestring (date-time)read-only

    Users can only be soft-deleted to preserve logs and history.

  • displayNamestringrequired

    Primary display name of the user.

  • emailstringrequired

    Primary email of the user.

  • secondaryEmailsstring[]

    Additional emails of the user. These are in addition to the primary email.

  • titlestring

    Self reported role. “VP of Engineering”, “Senior Frontend Engineer”, “Engineering Director, Frontend”.

  • managerstring

    Optional manager of the user.

    Format: users/{user}

  • pictureUristring

    URI for the user’s profile picture. This can either be an “https://” scheme, or an absolute path (/imgs/foo.png).

  • directReportCountinteger (int32)read-only

    Number of direct reports to this user.

  • totalReportCountinteger (int32)read-only

    Number of total reports to this user.

  • lastLoginTimestring (date-time)read-only

    The time the user last logged in. Not set if the user has never logged in.

Response

200User

A user represents a human user in the directory

  • namestring

    Assigned by Oblique. Format: users/{id}

  • createTimestring (date-time)read-only

    Create and update timestamps.

  • updateTimestring (date-time)read-only
  • deleteTimestring (date-time)read-only

    Users can only be soft-deleted to preserve logs and history.

  • displayNamestringrequired

    Primary display name of the user.

  • emailstringrequired

    Primary email of the user.

  • secondaryEmailsstring[]

    Additional emails of the user. These are in addition to the primary email.

  • titlestring

    Self reported role. “VP of Engineering”, “Senior Frontend Engineer”, “Engineering Director, Frontend”.

  • managerstring

    Optional manager of the user.

    Format: users/{user}

  • pictureUristring

    URI for the user’s profile picture. This can either be an “https://” scheme, or an absolute path (/imgs/foo.png).

  • directReportCountinteger (int32)read-only

    Number of direct reports to this user.

  • totalReportCountinteger (int32)read-only

    Number of total reports to this user.

  • lastLoginTimestring (date-time)read-only

    The time the user last logged in. Not set if the user has never logged in.

Errors

StatusMeaning
400Malformed request
401Missing or invalid API key
403Not allowed for this API key
404Not found
429Too many requests
500Internal server error