---
title: "Update an invitation's role"
method: PUT
path: "/invitations/{invitationId}/role"
tags: ["Invitation"]
---

# Update an invitation's role

`PUT /invitations/{invitationId}/role`

Change the role an invitation will grant when accepted. Invitations are always created with the `user`
role, so this is the way to grant a different role before acceptance. Requires invitation permissions
on the project given in the `project` header.

## Path parameters

- `invitationId` string, required

## Headers

- `project` string, required

## Request body

- object
  - `role` string, required

## Response `200`

Ok

- InvitationDocument
  - `updatedAt` string, required
  - `createdAt` string, required
  - `project` object
    - `isValid` object
    - `createFromHexString` object
    - `createFromTime` object
    - `generate` object
    - `cacheHexString` unknown
    - `prototype` string
  - `email` string
  - `organisation` object
    - `isValid` object
    - `createFromHexString` object
    - `createFromTime` object
    - `generate` object
    - `cacheHexString` unknown
    - `prototype` string
  - `role` string, required
  - `name` string, required
  - `type` 'organisation' | 'project', required

---

[API](https://skmtc.net/gleap/apis/gleap-server.md) · [All operations](https://skmtc.net/gleap/apis/gleap-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleap/gleap-server/revisions/b706fc73777f/schema)
