Early access: these pages are being written and reviewed. Facts in the header boxes come straight from the product.
Finish a Google sign-up: create the workspace and sign in
POST
/api/v1/auth/google/complete
const url = 'https://api.pitch2sale.com/api/v1/auth/google/complete';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"org_name":"example","phone":"","first_name":"example","last_name":"example","plan_intent":{"plan":"example","cycle":"monthly","currency":"USD"}}'};
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://api.pitch2sale.com/api/v1/auth/google/complete \ --header 'Content-Type: application/json' \ --data '{ "org_name": "example", "phone": "", "first_name": "example", "last_name": "example", "plan_intent": { "plan": "example", "cycle": "monthly", "currency": "USD" } }'Body { org_name, phone?, first_name?, last_name?, plan_intent? } (JSON only; no token in the body). Consumes the single-use sign-up token from the google_login_signup cookie (cleared), creates the organization (trial) and its owner with the Google-verified email (no password), sets the refresh cookie and returns the same { user, org, accessToken } body as password login.
Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Workspace created; signed in
Validation failed
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}The email already has an account
Unknown, used or expired token (GOOGLE_SIGNUP_EXPIRED)
Rate limit exceeded
Media typeapplication/json
object
error
required
string
code
string
message
string
details
Array<object>
object
field
required
string
message
required
string
code
required
string
Examplegenerated
{ "error": "example", "code": "example", "message": "example", "details": [ { "field": "example", "message": "example", "code": "example" } ]}