Accept client portal invitation
curl --request POST \
--url https://api.cx.stax.ai/cp/user/_accept \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"client": "<string>",
"invite": "<string>",
"password": "<string>",
"token": "<string>"
}
'import requests
url = "https://api.cx.stax.ai/cp/user/_accept"
payload = {
"client": "<string>",
"invite": "<string>",
"password": "<string>",
"token": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client: '<string>',
invite: '<string>',
password: '<string>',
token: '<string>'
})
};
fetch('https://api.cx.stax.ai/cp/user/_accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cx.stax.ai/cp/user/_accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client' => '<string>',
'invite' => '<string>',
'password' => '<string>',
'token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cx.stax.ai/cp/user/_accept"
payload := strings.NewReader("{\n \"client\": \"<string>\",\n \"invite\": \"<string>\",\n \"password\": \"<string>\",\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cx.stax.ai/cp/user/_accept")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"client\": \"<string>\",\n \"invite\": \"<string>\",\n \"password\": \"<string>\",\n \"token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cx.stax.ai/cp/user/_accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client\": \"<string>\",\n \"invite\": \"<string>\",\n \"password\": \"<string>\",\n \"token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"active": true,
"amr": [
"pwd"
],
"automation": true,
"client": {
"accepted_on": "<string>",
"client": "<string>",
"contact": "<string>",
"invited_on": "<string>",
"scopes": [
"<string>"
],
"team": "<string>"
},
"created_on": "<string>",
"exchanged": true,
"expires_on": "<string>",
"ip": "<string>",
"mechanism": "<string>",
"otp": "<string>",
"refreshOn": "<string>",
"team": {
"_id": "<string>",
"about": "<string>",
"address": {
"attn": "<string>",
"city": "<string>",
"country": "<string>",
"desc": "<string>",
"state": "<string>",
"street": "<string>",
"street2": "<string>",
"unit": "<string>",
"zip": "<string>"
},
"alert_contacts": [
{
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"user_id": "<string>"
}
],
"api_key": "<string>",
"brand": {
"color": "<string>",
"display": "<string>",
"domain": "<string>",
"edges": "<string>",
"logo": "<string>",
"wallpaper": "<string>"
},
"client_billing": {
"approval_location": "<string>",
"billing_contact_role": "<string>",
"default_currency": "<string>",
"default_invoice_grouping": "<string>",
"default_proration": "<string>",
"default_terms_days": 123,
"export_schedule": "<string>",
"export_trigger": "<string>",
"plan_dimension": "<string>",
"revision": 123,
"two_person_approval": true
},
"client_directory": "<string>",
"client_directory_template": "<string>",
"client_invite_follow_up": {
"excluded_client_statuses": [
"<string>"
],
"follow_up_enabled": true,
"message": "<string>",
"send_from": "<string>",
"send_from_fallback": "<string>",
"send_interval_after_due": 123,
"send_interval_before_due": 123,
"send_to": [
"<string>"
],
"send_to_fallback": "<string>",
"send_until": 123
},
"client_roles": [
{
"name": "<string>",
"required": true,
"type": "<string>"
}
],
"client_task_follow_up": {
"excluded_client_statuses": [
"<string>"
],
"follow_up_enabled": true,
"message": "<string>",
"send_from": "<string>",
"send_from_fallback": "<string>",
"send_interval_after_due": 123,
"send_interval_before_due": 123,
"send_to": [
"<string>"
],
"send_to_fallback": "<string>",
"send_until": 123
},
"created_on": "<string>",
"default_send_role": "<string>",
"deleted_at": "<string>",
"ein": "<string>",
"email": "<string>",
"fallback_email": "<string>",
"fax_number": "<string>",
"is_disabled": true,
"legal_name": "<string>",
"limits": {
"base_storage": 123,
"dashboard_users": 123,
"max_users": 123,
"usage": 123
},
"login": "<string>",
"name": "<string>",
"ooo_reassign": true,
"page": "<string>",
"past_due_date": "<string>",
"phone": "<string>",
"plan_tier": "<string>",
"plan_year_questionnaires": [
"<string>"
],
"primary_contact": {
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"user_id": "<string>"
},
"priority_weights": {
"high": 123,
"normal": 123,
"urgent": 123
},
"recordkeeper_fees_config": {
"ongoing": {
"annual_amount": 1,
"basis_points_annual": 1,
"enabled": true,
"method": "basis_points"
},
"transactional": {
"distribution_fee": 1,
"enabled": true,
"loan_initiation_fee": 1,
"loan_maintenance_fee": 1,
"loan_maintenance_quarter": "Q1"
}
},
"retirement": {
"address_requirement": true,
"census_collection_columns": [
"first_name"
],
"collect_eligible_compensation": true,
"collect_statutory_compensation": true,
"email_requirement": true,
"hours_assumption": true,
"mep_pep_visibility": true,
"phone_requirement": true
},
"scopes": [
"<string>"
],
"security_config": {
"advisor_mfa": {
"grace_days": 123,
"required": true,
"required_since": "<string>"
},
"allow_magic_link": true,
"allow_password": true,
"portal_login": {
"email": {
"enabled": true,
"from_email": "<string>"
},
"sms": {
"enabled": true,
"phone_number": "<string>"
}
},
"portal_mfa": {
"grace_days": 123,
"required": true,
"required_since": "<string>"
},
"require_sso": true
},
"share_directory_template": "<string>",
"sla": 123,
"smtp": {
"auth_method": "CRAM-MD5",
"enabled": true,
"host": "<string>",
"password": "<string>",
"port": 123,
"require_tls": true,
"username": "<string>"
},
"stripe": {
"customer_id": "<string>",
"subscription_id": "<string>",
"subscription_items": {}
},
"website": "<string>",
"working_hours": {
"schedule": [
{
"end_time": "<string>",
"start_time": "<string>",
"weekday": "<string>"
}
],
"timezone": "<string>",
"use_user_timezone": true
}
},
"token": "<string>",
"type": "<string>",
"updatedOn": "<string>",
"user": {
"_id": "<string>",
"clients": [
{
"accepted_on": "<string>",
"client": "<string>",
"contact": "<string>",
"invited_on": "<string>",
"scopes": [
"<string>"
],
"team": "<string>"
}
],
"community": "<string>",
"created_on": "<string>",
"deleted_at": "<string>",
"email": "<string>",
"memberships": [
{
"about": "<string>",
"accepted_on": "<string>",
"api_keys": [
{
"created_by": "<string>",
"created_on": "<string>",
"name": "<string>",
"secret": "<string>"
}
],
"email": {
"access_token": "<string>",
"address": "<string>",
"auto_reply": true,
"auto_reply_body": "<string>",
"auto_reply_from": "<string>",
"auto_reply_subject": "<string>",
"auto_reply_to": "<string>",
"backend": "<string>",
"connected_at": "<string>",
"error": "<string>",
"errored_at": "<string>",
"grant_id": "<string>",
"grant_status": "<string>",
"last_sync": "<string>",
"private": true,
"provider": "<string>",
"refresh_token": "<string>",
"status": "<string>",
"sync_mutex": true
},
"email_signature": "<string>",
"filters": {
"client": {},
"message": {},
"plan": {},
"project": {},
"task": {}
},
"invited_on": "<string>",
"preferences": {
"email_on_assignments": true,
"email_on_assists": true,
"email_on_client_actions": true,
"email_on_client_updates": true,
"email_on_community": true,
"email_on_mentions": true,
"email_on_overdue": true,
"email_on_shared_files": true
},
"scopes": [
"<string>"
],
"starred_pages": [
"<string>"
],
"suspended": true,
"team": "<string>",
"title": "<string>",
"working_hours": {
"schedule": [
{
"end_time": "<string>",
"start_time": "<string>",
"weekday": "<string>"
}
],
"timezone": "<string>",
"use_user_timezone": true
}
}
],
"mfa_enabled": true,
"mfa_secret": "<string>",
"mfa_verified_at": "<string>",
"name": "<string>",
"out_of_office": [
{
"end": "<string>",
"note": "<string>",
"start": "<string>"
}
],
"password": "<string>",
"phone": "<string>",
"signature": "<string>",
"team": "<string>",
"timezone": "<string>",
"validation_code": "<string>"
},
"user_agent": "<string>"
}{}{}{}{}client-portal
Accept client portal invitation
Accept a client portal invitation by creating a new user account or adding client access to an existing account. Returns a session for immediate login.
POST
/
cp
/
user
/
_accept
Accept client portal invitation
curl --request POST \
--url https://api.cx.stax.ai/cp/user/_accept \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"client": "<string>",
"invite": "<string>",
"password": "<string>",
"token": "<string>"
}
'import requests
url = "https://api.cx.stax.ai/cp/user/_accept"
payload = {
"client": "<string>",
"invite": "<string>",
"password": "<string>",
"token": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client: '<string>',
invite: '<string>',
password: '<string>',
token: '<string>'
})
};
fetch('https://api.cx.stax.ai/cp/user/_accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cx.stax.ai/cp/user/_accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client' => '<string>',
'invite' => '<string>',
'password' => '<string>',
'token' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cx.stax.ai/cp/user/_accept"
payload := strings.NewReader("{\n \"client\": \"<string>\",\n \"invite\": \"<string>\",\n \"password\": \"<string>\",\n \"token\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cx.stax.ai/cp/user/_accept")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"client\": \"<string>\",\n \"invite\": \"<string>\",\n \"password\": \"<string>\",\n \"token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cx.stax.ai/cp/user/_accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client\": \"<string>\",\n \"invite\": \"<string>\",\n \"password\": \"<string>\",\n \"token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"active": true,
"amr": [
"pwd"
],
"automation": true,
"client": {
"accepted_on": "<string>",
"client": "<string>",
"contact": "<string>",
"invited_on": "<string>",
"scopes": [
"<string>"
],
"team": "<string>"
},
"created_on": "<string>",
"exchanged": true,
"expires_on": "<string>",
"ip": "<string>",
"mechanism": "<string>",
"otp": "<string>",
"refreshOn": "<string>",
"team": {
"_id": "<string>",
"about": "<string>",
"address": {
"attn": "<string>",
"city": "<string>",
"country": "<string>",
"desc": "<string>",
"state": "<string>",
"street": "<string>",
"street2": "<string>",
"unit": "<string>",
"zip": "<string>"
},
"alert_contacts": [
{
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"user_id": "<string>"
}
],
"api_key": "<string>",
"brand": {
"color": "<string>",
"display": "<string>",
"domain": "<string>",
"edges": "<string>",
"logo": "<string>",
"wallpaper": "<string>"
},
"client_billing": {
"approval_location": "<string>",
"billing_contact_role": "<string>",
"default_currency": "<string>",
"default_invoice_grouping": "<string>",
"default_proration": "<string>",
"default_terms_days": 123,
"export_schedule": "<string>",
"export_trigger": "<string>",
"plan_dimension": "<string>",
"revision": 123,
"two_person_approval": true
},
"client_directory": "<string>",
"client_directory_template": "<string>",
"client_invite_follow_up": {
"excluded_client_statuses": [
"<string>"
],
"follow_up_enabled": true,
"message": "<string>",
"send_from": "<string>",
"send_from_fallback": "<string>",
"send_interval_after_due": 123,
"send_interval_before_due": 123,
"send_to": [
"<string>"
],
"send_to_fallback": "<string>",
"send_until": 123
},
"client_roles": [
{
"name": "<string>",
"required": true,
"type": "<string>"
}
],
"client_task_follow_up": {
"excluded_client_statuses": [
"<string>"
],
"follow_up_enabled": true,
"message": "<string>",
"send_from": "<string>",
"send_from_fallback": "<string>",
"send_interval_after_due": 123,
"send_interval_before_due": 123,
"send_to": [
"<string>"
],
"send_to_fallback": "<string>",
"send_until": 123
},
"created_on": "<string>",
"default_send_role": "<string>",
"deleted_at": "<string>",
"ein": "<string>",
"email": "<string>",
"fallback_email": "<string>",
"fax_number": "<string>",
"is_disabled": true,
"legal_name": "<string>",
"limits": {
"base_storage": 123,
"dashboard_users": 123,
"max_users": 123,
"usage": 123
},
"login": "<string>",
"name": "<string>",
"ooo_reassign": true,
"page": "<string>",
"past_due_date": "<string>",
"phone": "<string>",
"plan_tier": "<string>",
"plan_year_questionnaires": [
"<string>"
],
"primary_contact": {
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"user_id": "<string>"
},
"priority_weights": {
"high": 123,
"normal": 123,
"urgent": 123
},
"recordkeeper_fees_config": {
"ongoing": {
"annual_amount": 1,
"basis_points_annual": 1,
"enabled": true,
"method": "basis_points"
},
"transactional": {
"distribution_fee": 1,
"enabled": true,
"loan_initiation_fee": 1,
"loan_maintenance_fee": 1,
"loan_maintenance_quarter": "Q1"
}
},
"retirement": {
"address_requirement": true,
"census_collection_columns": [
"first_name"
],
"collect_eligible_compensation": true,
"collect_statutory_compensation": true,
"email_requirement": true,
"hours_assumption": true,
"mep_pep_visibility": true,
"phone_requirement": true
},
"scopes": [
"<string>"
],
"security_config": {
"advisor_mfa": {
"grace_days": 123,
"required": true,
"required_since": "<string>"
},
"allow_magic_link": true,
"allow_password": true,
"portal_login": {
"email": {
"enabled": true,
"from_email": "<string>"
},
"sms": {
"enabled": true,
"phone_number": "<string>"
}
},
"portal_mfa": {
"grace_days": 123,
"required": true,
"required_since": "<string>"
},
"require_sso": true
},
"share_directory_template": "<string>",
"sla": 123,
"smtp": {
"auth_method": "CRAM-MD5",
"enabled": true,
"host": "<string>",
"password": "<string>",
"port": 123,
"require_tls": true,
"username": "<string>"
},
"stripe": {
"customer_id": "<string>",
"subscription_id": "<string>",
"subscription_items": {}
},
"website": "<string>",
"working_hours": {
"schedule": [
{
"end_time": "<string>",
"start_time": "<string>",
"weekday": "<string>"
}
],
"timezone": "<string>",
"use_user_timezone": true
}
},
"token": "<string>",
"type": "<string>",
"updatedOn": "<string>",
"user": {
"_id": "<string>",
"clients": [
{
"accepted_on": "<string>",
"client": "<string>",
"contact": "<string>",
"invited_on": "<string>",
"scopes": [
"<string>"
],
"team": "<string>"
}
],
"community": "<string>",
"created_on": "<string>",
"deleted_at": "<string>",
"email": "<string>",
"memberships": [
{
"about": "<string>",
"accepted_on": "<string>",
"api_keys": [
{
"created_by": "<string>",
"created_on": "<string>",
"name": "<string>",
"secret": "<string>"
}
],
"email": {
"access_token": "<string>",
"address": "<string>",
"auto_reply": true,
"auto_reply_body": "<string>",
"auto_reply_from": "<string>",
"auto_reply_subject": "<string>",
"auto_reply_to": "<string>",
"backend": "<string>",
"connected_at": "<string>",
"error": "<string>",
"errored_at": "<string>",
"grant_id": "<string>",
"grant_status": "<string>",
"last_sync": "<string>",
"private": true,
"provider": "<string>",
"refresh_token": "<string>",
"status": "<string>",
"sync_mutex": true
},
"email_signature": "<string>",
"filters": {
"client": {},
"message": {},
"plan": {},
"project": {},
"task": {}
},
"invited_on": "<string>",
"preferences": {
"email_on_assignments": true,
"email_on_assists": true,
"email_on_client_actions": true,
"email_on_client_updates": true,
"email_on_community": true,
"email_on_mentions": true,
"email_on_overdue": true,
"email_on_shared_files": true
},
"scopes": [
"<string>"
],
"starred_pages": [
"<string>"
],
"suspended": true,
"team": "<string>",
"title": "<string>",
"working_hours": {
"schedule": [
{
"end_time": "<string>",
"start_time": "<string>",
"weekday": "<string>"
}
],
"timezone": "<string>",
"use_user_timezone": true
}
}
],
"mfa_enabled": true,
"mfa_secret": "<string>",
"mfa_verified_at": "<string>",
"name": "<string>",
"out_of_office": [
{
"end": "<string>",
"note": "<string>",
"start": "<string>"
}
],
"password": "<string>",
"phone": "<string>",
"signature": "<string>",
"team": "<string>",
"timezone": "<string>",
"validation_code": "<string>"
},
"user_agent": "<string>"
}{}{}{}{}Authorizations
Body
application/json
Accept invitation request (invite, client, password required)
Response
Session data for authenticated user