Create a new admin user invite
POST
/api/v1/admin_user_invite
const url = 'https://app.prefactorai.com/api/v1/admin_user_invite';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"account_id":"013xrzp12g3nqk8ns6jadrqmpgrjkeny","email":"user@example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.prefactorai.com/api/v1/admin_user_invite \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "email": "user@example.com" }'Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”AdminUserInvite_DetailsForCreate
object
account_id
One of:
Account_Id
A valid account ID
string
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyNull
Null
string
email
Email address to send the invite to
string
Example
user@example.comResponses
Section titled “Responses”Success
Media typeapplication/json
object
details
AdminUserInvite_Details
object
account_id
Account_Id
A valid account ID
string
email
Email address the invite was sent to
string
id
AdminUserInvite_Id
A valid admin user invite ID
string
inserted_at
When the invite was created
string format: date-time
invite_url
Uri
URL to accept the invite
string format: uri
status
Current status of the invite
string
token
Unique token for the invite
string
type
Type of resource (always ‘admin_user_invite’)
string
updated_at
When the invite was last updated
string format: date-time
status
string
Example
{ "details": { "account_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "email": "user@example.com", "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "inserted_at": "2024-01-01T00:00:00Z", "invite_url": "https://example.com", "status": "pending", "token": "abc123def456...", "type": "admin_user_invite", "updated_at": "2024-01-01T00:00:00Z" }, "status": "success"}default
Section titled “default”Error