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

# POST /api/v1/projects/{projectId}/identity-memberships/{identityId}

`POST /api/v1/projects/{projectId}/identity-memberships/{identityId}`

Create project identity membership

## Path parameters

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

## Request body

- object
  - `role` string
  - `roles` union[] — A list of role slugs to assign to the newly created identity project membership.
    - union
      - object
        - `role` string, required — The role slug to assign to the newly created identity project membership.
        - `isTemporary` false — The role slug to assign to the newly created identity project membership.
      - object
        - `role` string, required — The role slug to assign to the newly created identity project membership.
        - `isTemporary` true, required — The role slug to assign to the newly created identity project membership.
        - `temporaryMode` 'relative', required — The role slug to assign to the newly created identity project membership.
        - `temporaryRange` string, required — The role slug to assign to the newly created identity project membership.
        - `temporaryAccessStartTime` string, date-time, required — The role slug to assign to the newly created identity project membership.

## 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/revisions/885aef3e6c11/schema)
