---
title: "PATCH /api/v1/projects/{projectId}/memberships/identities/{identityId}"
method: PATCH
path: "/api/v1/projects/{projectId}/memberships/identities/{identityId}"
tags: ["Project Identities"]
---

# PATCH /api/v1/projects/{projectId}/memberships/identities/{identityId}

`PATCH /api/v1/projects/{projectId}/memberships/identities/{identityId}`

Update project identity memberships

## Path parameters

- `projectId` string, required
- `identityId` string, required

## Request body

- object
  - `roles` union[], required — A list of role slugs to assign to the identity project membership.
    - union
      - object
        - `role` string, required — The role slug to assign to the newly created identity project membership.
        - `isTemporary` false — Whether the assigned role is temporary. If isTemporary is set true, must provide temporaryMode, temporaryRange and temporaryAccessStartTime.
      - object
        - `role` string, required — The role slug to assign to the newly created identity project membership.
        - `isTemporary` true, required — Whether the assigned role is temporary. If isTemporary is set true, must provide temporaryMode, temporaryRange and temporaryAccessStartTime.
        - `temporaryMode` 'relative', required — Type of temporary expiry.
        - `temporaryRange` string, required — Expiry time for temporary access. In relative mode it could be 1s, 2m ,3h, etc.
        - `temporaryAccessStartTime` string, date-time, required — Time to which the temporary access starts.

## Response `200`

Default Response

- object
  - `identityMembership` object, required
    - `id` string, uuid, required
    - `projectId` string, required
    - `identityId` string, uuid, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/infisical/apis/infisical-api.md) · [All operations](https://skmtc.net/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/infisical/infisical-api/versions/885aef3e6c11/schema)
