Invite a user to your organization
POST/v1/users/invite
This route allows you to invite a user to your Port organization.
To learn more about users, roles, and teams, check out the documentation.
Request
Parameters (JSON)
{
"parameters": [
{
"schema": {
"type": "boolean",
"default": true
},
"in": "query",
"name": "notify",
"required": false,
"description": "If `true`, the invitee will receive an email notification."
}
]
}Request body schema (JSON)
{
"title": "Body",
"body": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"invitee": {
"type": "object",
"description": "The details of the user you want to invite.",
"properties": {
"email": {
"type": "string",
"pattern": "^[^;#/\\?\\s][^;#/\\?]*[^;#/\\?\\s]$",
"description": "The user's email address."
},
"roles": {
"type": "array",
"items": {
"type": "string"
},
"description": "The roles you want to assign to the user."
},
"teams": {
"type": "array",
"items": {
"type": "string"
},
"description": "The names of the teams you want to assign the user to."
}
},
"required": [
"email"
]
}
},
"additionalProperties": false,
"required": [
"invitee"
]
}
}
},
"required": true
}
}Responses
- 200
- 401
- 404
- 413
- 422
Created successfully.
Default Response
A resource with the provided identifier was not found
Request body is too large (limit is 1MiB)
The json provided does not match the route's schema
Responses (JSON)
{
"responses": {
"200": {
"description": "Created successfully.",
"content": {
"application/json": {
"schema": {
"description": "Created successfully.",
"properties": {
"ok": {
"enum": [
true
]
}
},
"required": [
"ok"
],
"additionalProperties": false
}
}
}
},
"401": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "A resource with the provided identifier was not found",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "A resource with the provided identifier was not found"
}
}
}
},
"413": {
"description": "Request body is too large (limit is 1MiB)",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error"
],
"additionalProperties": false,
"description": "Request body is too large (limit is 1MiB)"
}
}
}
},
"422": {
"description": "The json provided does not match the route's schema",
"content": {
"application/json": {
"schema": {
"properties": {
"ok": {
"const": false
},
"error": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"ok",
"error",
"message"
],
"additionalProperties": false,
"description": "The json provided does not match the route's schema"
}
}
}
}
}
}