Skip to main content
PATCH
/
user
/
profile
/
{id}
Python (SDK)
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os


with Latitudesh(
    bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:

    res = latitudesh.user_profile.update(id="user_8PMvy2GL72uKKyXyANEnsjMQYMP", data={
        "id": "user_8PMvy2GL72uKKyXyANEnsjMQYMP",
        "type": latitudesh_python_sdk.PatchUserProfileUserProfileType.USERS,
        "attributes": {
            "role": latitudesh_python_sdk.PatchUserProfileUserProfileRole.COLLABORATOR,
        },
    })

    # Handle response
    print(res)
{
  "data": {
    "id": "user_8PMvy2GL72uKKyXyANEnsjMQYMP",
    "type": "users",
    "attributes": {
      "first_name": "Sherwood",
      "last_name": "Ward",
      "email": "[email protected]",
      "role": "collaborator",
      "created_at": null,
      "updated_at": null
    }
  },
  "meta": {}
}

Authorizations

Authorization
string
header
required

Path Parameters

id
string
required

Body

data
object
required

Response

200 - application/vnd.api+json

Success

data
object