Confirm the new workspace organization
Saves organization and owner details while the session is authenticated or organization_confirmed. Later states reject edits with409. Country is normalized to uppercase; website and US EIN receive additional validation.
curl --request PUT \
--url https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Onboarding-Session: <x-workspace-onboarding-session>' \
--data '
{
"first_name": "Jane",
"last_name": "Donor",
"organization_name": "Example Nonprofit",
"country_code": "US",
"website": "https://example.org/",
"ein": "12-3456789",
"phone": "+12025550123"
}
'import requests
url = "https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization"
payload = {
"first_name": "Jane",
"last_name": "Donor",
"organization_name": "Example Nonprofit",
"country_code": "US",
"website": "https://example.org/",
"ein": "12-3456789",
"phone": "+12025550123"
}
headers = {
"X-Workspace-Onboarding-Session": "<x-workspace-onboarding-session>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Workspace-Onboarding-Session': '<x-workspace-onboarding-session>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: 'Jane',
last_name: 'Donor',
organization_name: 'Example Nonprofit',
country_code: 'US',
website: 'https://example.org/',
ein: '12-3456789',
phone: '+12025550123'
})
};
fetch('https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization', 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.gratona.com/v1/workspace-onboarding/{public_id}/organization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Jane',
'last_name' => 'Donor',
'organization_name' => 'Example Nonprofit',
'country_code' => 'US',
'website' => 'https://example.org/',
'ein' => '12-3456789',
'phone' => '+12025550123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Workspace-Onboarding-Session: <x-workspace-onboarding-session>"
],
]);
$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.gratona.com/v1/workspace-onboarding/{public_id}/organization"
payload := strings.NewReader("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Donor\",\n \"organization_name\": \"Example Nonprofit\",\n \"country_code\": \"US\",\n \"website\": \"https://example.org/\",\n \"ein\": \"12-3456789\",\n \"phone\": \"+12025550123\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Workspace-Onboarding-Session", "<x-workspace-onboarding-session>")
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.put("https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization")
.header("X-Workspace-Onboarding-Session", "<x-workspace-onboarding-session>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Donor\",\n \"organization_name\": \"Example Nonprofit\",\n \"country_code\": \"US\",\n \"website\": \"https://example.org/\",\n \"ein\": \"12-3456789\",\n \"phone\": \"+12025550123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Workspace-Onboarding-Session"] = '<x-workspace-onboarding-session>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Donor\",\n \"organization_name\": \"Example Nonprofit\",\n \"country_code\": \"US\",\n \"website\": \"https://example.org/\",\n \"ein\": \"12-3456789\",\n \"phone\": \"+12025550123\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"public_id": "550e8400-e29b-41d4-a716-446655440000",
"state": "authenticated",
"brand_id": "gratona",
"email": "jane@example.org",
"answers": {
"primary_goal": "fundraising_campaigns",
"starting_point": "launching_new"
},
"automatic_billing": false,
"qualification": "verify_payment_method",
"expires_at": "2026-10-21T12:00:00Z",
"first_name": "Jane",
"last_name": "Donor",
"organization_name": "Example Nonprofit",
"website": "https://example.org/",
"ein": "123456789",
"country_code": "US",
"phone": "+12025550123",
"questions": [
{
"key": "primary_goal",
"prompt": "What would you like Gratona to help you set up first?",
"type": "single_choice",
"required": true,
"options": [
{
"value": "fundraising_campaigns",
"label": "Fundraising campaigns and donations"
}
]
}
]
}
}{
"status": "error",
"code": "workspace_onboarding_session_unavailable",
"message": "This setup session is no longer available. Start again."
}{
"status": "error",
"code": "workspace_onboarding_session_unavailable",
"message": "This setup session is no longer available. Start again."
}{
"status": "error",
"code": "workspace_onboarding_session_unavailable",
"message": "This setup session is no longer available. Start again."
}{
"status": "error",
"code": "workspace_onboarding_session_unavailable",
"message": "This setup session is no longer available. Start again."
}Headers
Opaque resume credential returned after mailbox or invitation authentication. It is bound to this setup session and expires or rotates during handoff.
64Path Parameters
Public setup-session UUID.
Body
Validated request fields for this operation.
100"Jane"
100"Donor"
2 - 255"Example Nonprofit"
2^[A-Za-z]{2}$"US"
Public HTTP(S) website; missing scheme becomes HTTPS. Normalized to its origin; local hosts and IP addresses are rejected.
2048"https://example.org/"
For US organizations, punctuation is removed and exactly nine digits are required. Other countries retain a trimmed identifier.
64"12-3456789"
40"+12025550123"
curl --request PUT \
--url https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization \
--header 'Content-Type: application/json' \
--header 'X-Workspace-Onboarding-Session: <x-workspace-onboarding-session>' \
--data '
{
"first_name": "Jane",
"last_name": "Donor",
"organization_name": "Example Nonprofit",
"country_code": "US",
"website": "https://example.org/",
"ein": "12-3456789",
"phone": "+12025550123"
}
'import requests
url = "https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization"
payload = {
"first_name": "Jane",
"last_name": "Donor",
"organization_name": "Example Nonprofit",
"country_code": "US",
"website": "https://example.org/",
"ein": "12-3456789",
"phone": "+12025550123"
}
headers = {
"X-Workspace-Onboarding-Session": "<x-workspace-onboarding-session>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Workspace-Onboarding-Session': '<x-workspace-onboarding-session>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
first_name: 'Jane',
last_name: 'Donor',
organization_name: 'Example Nonprofit',
country_code: 'US',
website: 'https://example.org/',
ein: '12-3456789',
phone: '+12025550123'
})
};
fetch('https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization', 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.gratona.com/v1/workspace-onboarding/{public_id}/organization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'first_name' => 'Jane',
'last_name' => 'Donor',
'organization_name' => 'Example Nonprofit',
'country_code' => 'US',
'website' => 'https://example.org/',
'ein' => '12-3456789',
'phone' => '+12025550123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Workspace-Onboarding-Session: <x-workspace-onboarding-session>"
],
]);
$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.gratona.com/v1/workspace-onboarding/{public_id}/organization"
payload := strings.NewReader("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Donor\",\n \"organization_name\": \"Example Nonprofit\",\n \"country_code\": \"US\",\n \"website\": \"https://example.org/\",\n \"ein\": \"12-3456789\",\n \"phone\": \"+12025550123\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Workspace-Onboarding-Session", "<x-workspace-onboarding-session>")
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.put("https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization")
.header("X-Workspace-Onboarding-Session", "<x-workspace-onboarding-session>")
.header("Content-Type", "application/json")
.body("{\n \"first_name\": \"Jane\",\n \"last_name\": \"Donor\",\n \"organization_name\": \"Example Nonprofit\",\n \"country_code\": \"US\",\n \"website\": \"https://example.org/\",\n \"ein\": \"12-3456789\",\n \"phone\": \"+12025550123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/workspace-onboarding/{public_id}/organization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Workspace-Onboarding-Session"] = '<x-workspace-onboarding-session>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"first_name\": \"Jane\",\n \"last_name\": \"Donor\",\n \"organization_name\": \"Example Nonprofit\",\n \"country_code\": \"US\",\n \"website\": \"https://example.org/\",\n \"ein\": \"12-3456789\",\n \"phone\": \"+12025550123\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"public_id": "550e8400-e29b-41d4-a716-446655440000",
"state": "authenticated",
"brand_id": "gratona",
"email": "jane@example.org",
"answers": {
"primary_goal": "fundraising_campaigns",
"starting_point": "launching_new"
},
"automatic_billing": false,
"qualification": "verify_payment_method",
"expires_at": "2026-10-21T12:00:00Z",
"first_name": "Jane",
"last_name": "Donor",
"organization_name": "Example Nonprofit",
"website": "https://example.org/",
"ein": "123456789",
"country_code": "US",
"phone": "+12025550123",
"questions": [
{
"key": "primary_goal",
"prompt": "What would you like Gratona to help you set up first?",
"type": "single_choice",
"required": true,
"options": [
{
"value": "fundraising_campaigns",
"label": "Fundraising campaigns and donations"
}
]
}
]
}
}{
"status": "error",
"code": "workspace_onboarding_session_unavailable",
"message": "This setup session is no longer available. Start again."
}{
"status": "error",
"code": "workspace_onboarding_session_unavailable",
"message": "This setup session is no longer available. Start again."
}{
"status": "error",
"code": "workspace_onboarding_session_unavailable",
"message": "This setup session is no longer available. Start again."
}{
"status": "error",
"code": "workspace_onboarding_session_unavailable",
"message": "This setup session is no longer available. Start again."
}