---
title: "Invite an user to a client role"
method: POST
path: "/clients/{id_client}/roles/{id_rol}/invite"
tags: ["client_roles"]
---

# Invite an user to a client role

`POST /clients/{id_client}/roles/{id_rol}/invite`

## Request

- Base URL: `https://api.planvortex.com/v1.0.0`
- URL: `https://api.planvortex.com/v1.0.0/clients/{id_client}/roles/{id_rol}/invite`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (client credentials, token URL `https://api.planvortex.com/v1.0.0/oauth/token`)

Invite an user to a client role by the email. The user will recieve an invitation to the email

## Path parameters

- `id_client` string, required
- `id_rol` string, required

## Request body

- object
  - `email` string, email, required: Email address to invite. Returns error 609 if it is not a valid address. If no user exists with that address, a disabled one is created and an invitation email is sent with a temporary token; the account is enabled when the invitation is accepted.

## Response `200`

Successful operation

- Success: What an operation with nothing to return answers. A failure never looks like this: it comes back as an `Error` with HTTP 400.
  - `success` boolean, required

## Other responses

- `400`: The request failed. The body carries the PlanVortex error code in `code`: | Code | Meaning | | --- | --- | | `1203` | Invalid client role | | `609` | Invalid email | | `521` | Invalid client. The identifier is invalid o doesn't exists | | `508` | Error sending the invitation | | `509` | User already invited to the rol |
- `500`: Unhandled error by the server

---

[API](https://skmtc.dev/planvortex/apis/planvortex-api.md) · [All operations](https://skmtc.dev/planvortex/apis/planvortex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/planvortex/apis/planvortex-api/revisions/abedbbc1cd52?raw)
