Skip to content

CreateUserAttribute

POST/api/v1/users/{user}/userattributes

Add an attribute to a user. Attributes an integration syncs are overwritten on its next sync, so this is for the ones Oblique owns.

Example request

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

Set OBLIQUE_API_KEY to your API key.

Path parameters

  • parentstringrequired

    Format: users/{user}/userattributes

Query parameters

  • userAttributeIdstring

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

    If not provided, a random ID will be generated.

Request body

  • namestring

    Assigned by Oblique.

  • createTimestring (date-time)read-only

    Create timestamp of the attributes. This is always the same as the parent user.

  • updateTimestring (date-time)read-only

    The last time that attributes were modified.

  • integrationstringrequired

    The integration that manages the attribute.

    Format: integrations/{integration}

  • keystringrequired

    The key of the attribute, such as “department” or “costCenter”.

  • valuestringrequired

    The value of the attribute, such as “Engineering” or “12345”.

Response

200UserAttribute
  • namestring

    Assigned by Oblique.

  • createTimestring (date-time)read-only

    Create timestamp of the attributes. This is always the same as the parent user.

  • updateTimestring (date-time)read-only

    The last time that attributes were modified.

  • integrationstringrequired

    The integration that manages the attribute.

    Format: integrations/{integration}

  • keystringrequired

    The key of the attribute, such as “department” or “costCenter”.

  • valuestringrequired

    The value of the attribute, such as “Engineering” or “12345”.

Errors

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