Skip to content
Developers
Get started
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
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.

Media typeapplication/json
object
org_name
required
string
>= 1 characters <= 120 characters
phone
Any of:
string
<= 30 characters /^\+?[0-9 ()\-.]{4,30}$/
first_name
string
>= 1 characters <= 100 characters
last_name
string
>= 1 characters <= 100 characters
plan_intent
Any of:
object
plan
required
string
/^[a-z0-9-]{1,40}$/
cycle
required
string
Allowed values: monthly yearly
currency
required
string
Allowed values: USD INR

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"
}
]
}