diff options
Diffstat (limited to 'doc/api/invitations.md')
-rw-r--r-- | doc/api/invitations.md | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/doc/api/invitations.md b/doc/api/invitations.md index 7259dddec8c..905e4c2e288 100644 --- a/doc/api/invitations.md +++ b/doc/api/invitations.md @@ -38,7 +38,7 @@ POST /projects/:id/invitations | Attribute | Type | Required | Description | | --------- | ---- | -------- | ----------- | | `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user | -| `email` | integer/string | yes | The email of the new member or multiple emails separated by commas | +| `email` | string | yes | The email of the new member or multiple emails separated by commas | | `access_level` | integer | yes | A valid access level | | `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY | @@ -107,6 +107,36 @@ Example response: ] ``` +## Update an invitation to a group or project + +Updates a pending invitation's access level or access expiry date. + +```plaintext +PUT /groups/:id/invitations/:email +PUT /projects/:id/invitations/:email +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user. | +| `email` | string | yes | The email address to which the invitation was previously sent. | +| `access_level` | integer | no | A valid access level (defaults: `30`, developer access level). | +| `expires_at` | string | no | A date string in ISO 8601 format (`YYYY-MM-DDTHH:MM:SSZ`). | + +```shell +curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/55/invitations/email@example.org?access_level=40" +curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/55/invitations/email@example.org?access_level=40" +``` + +Example response: + +```json +{ + "expires_at": "2012-10-22T14:13:35Z", + "access_level": 40, +} +``` + ## Delete an invitation to a group or project Deletes a pending invitation by email address. |