Create an invite code for a user
POSThttps://$CUSTOM-DOMAIN/v2/users/:userId/invite_code
Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods.
Request​
Path Parameters
- application/json
- application/grpc
- application/grpc-web+proto
Body
required
sendCode
object
Body
required
sendCode
object
Body
required
sendCode
object
Responses​
- 200
- 403
- 404
- default
OK
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object
The invite code is returned if the verification was set to return_code.
{
"details": {
"sequence": "2",
"changeDate": "2025-03-25T17:01:17.264Z",
"resourceOwner": "69629023906488334",
"creationDate": "2025-03-25T17:01:17.264Z"
},
"inviteCode": "string"
}
- Schema
- Example (from schema)
Schema
details
object
The invite code is returned if the verification was set to return_code.
{
"details": {
"sequence": "2",
"changeDate": "2025-03-25T17:01:17.264Z",
"resourceOwner": "69629023906488334",
"creationDate": "2025-03-25T17:01:17.264Z"
},
"inviteCode": "string"
}
- Schema
- Example (from schema)
Schema
details
object
The invite code is returned if the verification was set to return_code.
{
"details": {
"sequence": "2",
"changeDate": "2025-03-25T17:01:17.264Z",
"resourceOwner": "69629023906488334",
"creationDate": "2025-03-25T17:01:17.264Z"
},
"inviteCode": "string"
}
Returned when the user does not have permission to access the resource.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Returned when the resource does not exist.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
An unexpected error response.
- application/json
- application/grpc
- application/grpc-web+proto
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- Schema
- Example (from schema)
Schema
details
object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L 'https://$CUSTOM-DOMAIN/v2/users/:userId/invite_code' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"sendCode": {
"urlTemplate": "https://example.com/user/invite?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}",
"applicationName": "CustomerPortal"
},
"returnCode": {}
}'