> For the complete documentation index, see [llms.txt](https://docs.channex.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channex.io/api-v.1-documentation/property-users-collection/update-property-user-api.md).

# Update Property User API

## Update a property user

> Update an access: its role, its access policy overrides, or the property and user it\
> links. Attributes absent from the request are left unchanged. The updated access is\
> returned.

```json
{"openapi":"3.1.0","info":{"title":"Channex.io — Public API","version":"0.0.0"},"tags":[{"name":"Property Users","description":"Manage Property Users — a user's access to a single Property. An access carries a role and, optionally, access policy overrides on top of it, and ownership can be handed to another user."}],"servers":[{"url":"https://app.channex.io/api/v1","description":"Production server","variables":{}},{"url":"https://staging.channex.io/api/v1","description":"Staging server","variables":{}}],"security":[{"UserApiKeyAuth":[]}],"components":{"securitySchemes":{"UserApiKeyAuth":{"type":"apiKey","in":"header","name":"user-api-key","description":"API key for programmatic access, sent in the `user-api-key` header."}},"schemas":{"Common.Scalars.id":{"type":"string","format":"uuid"},"PropertyUsers.PropertyUserResource":{"type":"object","required":["type","id","attributes","relationships"],"properties":{"type":{"type":"string","enum":["property_user"]},"id":{"$ref":"#/components/schemas/Common.Scalars.id"},"attributes":{"$ref":"#/components/schemas/PropertyUsers.PropertyUser"},"relationships":{"$ref":"#/components/schemas/PropertyUsers.PropertyUserRelationships"}},"description":"A property user resource: the access attributes plus the property and user it links."},"PropertyUsers.PropertyUser":{"type":"object","required":["id","user_id","property_id","role","overrides"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"Unique property user identifier. Mirrors the top-level resource `id`."},"user_id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"UUID of the user the access is granted to."},"property_id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"UUID of the property the access is granted to."},"role":{"$ref":"#/components/schemas/PropertyUsers.PropertyUserRole"},"overrides":{"anyOf":[{"type":"object","unevaluatedProperties":{}},{"type":"null"}],"description":"Access policy overrides applied to this access on top of the role, or null when the role applies unchanged."}},"description":"A user's access to a property, as returned in responses: every attribute is present."},"PropertyUsers.PropertyUserRole":{"type":"string","enum":["owner","user"],"description":"Role granted to a user for a property."},"PropertyUsers.PropertyUserRelationships":{"type":"object","required":["property","user"],"properties":{"property":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PropertyUsers.EmbeddedPropertyRef"}},"required":["data"],"description":"The property the access is granted to."},"user":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Authentication.EmbeddedUser"}},"required":["data"],"description":"The user the access is granted to."}},"description":"Relationships of a property user resource: the property the access is for and the user it is granted to."},"PropertyUsers.EmbeddedPropertyRef":{"type":"object","required":["id","type"],"properties":{"id":{"$ref":"#/components/schemas/Common.Scalars.id"},"type":{"type":"string","enum":["property"]}},"description":"The property an access belongs to, as it appears among a property user's relationships."},"Authentication.EmbeddedUser":{"type":"object","required":["type","id","attributes"],"properties":{"type":{"type":"string","enum":["user"]},"id":{"$ref":"#/components/schemas/Common.Scalars.id"},"attributes":{"$ref":"#/components/schemas/Authentication.EmbeddedUserAttributes"}},"description":"A user embedded in another resource's relationships, carrying identifier, name and email."},"Authentication.EmbeddedUserAttributes":{"type":"object","required":["id","name","email"],"properties":{"id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"User identifier. Mirrors the resource id."},"name":{"type":"string","description":"Display name of the user."},"email":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.email"}],"description":"Email address the account is registered with."}},"description":"Identifier, display name and email address of an embedded user."},"Common.Scalars.email":{"type":"string","format":"email"},"Common.Errors.UnparsableRequest":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.UnparsableRequestObject"}},"description":"The request body could not be parsed as JSON."},"Common.Errors.UnparsableRequestObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"string"},"description":"Maps the part of the request that could not be parsed to the reason."}},"description":"Error object for an unparsable request body, naming the malformed part."},"Common.Errors.Unauthorized":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["unauthorized"]},"title":{"type":"string","enum":["Unauthorized"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"Authentication credentials are missing or invalid."},"Common.Errors.Forbidden":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["forbidden"]},"title":{"type":"string","enum":["Forbidden"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The authenticated user lacks permission to perform this action."},"Common.Errors.NotFound":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","required":["code","title"],"properties":{"code":{"type":"string","enum":["resource_not_found"]},"title":{"type":"string","enum":["Resource Not Found"]}},"description":"Shape of a single JSON:API error object: a stable machine code plus a human-readable title."}},"description":"The requested resource does not exist."},"Common.Errors.InvalidArguments":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.InvalidArgumentsObject"}},"description":"The request has missing or invalid arguments; `details` lists the messages per argument."},"Common.Errors.InvalidArgumentsObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["bad_request"]},"title":{"type":"string","enum":["Bad Request"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid argument to the list of validation messages for that argument."}},"description":"Error object for invalid request arguments, adding per-argument messages."},"Common.Errors.ValidationError":{"type":"object","required":["errors"],"properties":{"errors":{"$ref":"#/components/schemas/Common.Errors.ValidationErrorObject"}},"description":"The request body failed validation."},"Common.Errors.ValidationErrorObject":{"type":"object","required":["code","title","details"],"properties":{"code":{"type":"string","enum":["validation_error"]},"title":{"type":"string","enum":["Validation Error"]},"details":{"type":"object","unevaluatedProperties":{"type":"array","items":{"type":"string"}},"description":"Maps each invalid field to the list of validation messages for that field."}},"description":"Error object for a failed validation, adding per-field messages."},"PropertyUsers.PropertyUserUpdateRequest":{"type":"object","required":["property_user"],"properties":{"property_user":{"$ref":"#/components/schemas/PropertyUsers.PropertyUserUpdate"}},"description":"Request body accepted when updating a property user."},"PropertyUsers.PropertyUserUpdate":{"type":"object","properties":{"property_id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"UUID of the property the access is granted to."},"role":{"$ref":"#/components/schemas/PropertyUsers.PropertyUserRole"},"overrides":{"anyOf":[{"type":"object","unevaluatedProperties":{}},{"type":"null"}],"description":"Access policy overrides applied to this access on top of the role, or null when the role applies unchanged."},"user_id":{"allOf":[{"$ref":"#/components/schemas/Common.Scalars.id"}],"description":"UUID of the user to grant the access to."}},"description":"Attributes accepted when updating a property user. Every attribute is optional; attributes absent from the request are left unchanged."}}},"paths":{"/property_users/{id}":{"put":{"operationId":"PropertyUsers_update","summary":"Update a property user","description":"Update an access: its role, its access policy overrides, or the property and user it\nlinks. Attributes absent from the request are left unchanged. The updated access is\nreturned.","parameters":[{"name":"id","in":"path","required":true,"schema":{"$ref":"#/components/schemas/Common.Scalars.id"}}],"responses":{"200":{"description":"The request has succeeded.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"$ref":"#/components/schemas/PropertyUsers.PropertyUserResource"}},"description":"JSON:API document wrapping a single resource."}}}},"400":{"description":"The request body could not be parsed as JSON.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.UnparsableRequest"}}}},"401":{"description":"Authentication credentials are missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Unauthorized"}}}},"403":{"description":"The authenticated user lacks permission to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.Forbidden"}}}},"404":{"description":"The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Common.Errors.NotFound"}}}},"422":{"description":"The request has missing or invalid arguments; `details` lists the messages per argument.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Common.Errors.InvalidArguments"},{"$ref":"#/components/schemas/Common.Errors.ValidationError"}]}}}}},"tags":["Property Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyUsers.PropertyUserUpdateRequest"}}}}}}}}
```
