curl --request POST \
--url https://api.village.do/v2/integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"google_integration_properties": {
"account_identifier": "go:123456789",
"email": "[email protected]",
"authentication_token_data": {
"access_token": "<string>",
"scope": "<string>",
"refresh_token": "<string>"
},
"type": "google",
"data_scope": [
"email",
"contacts"
],
"authorized_gmail": true,
"sync_data": {
"email": "[email protected]"
}
}
}
'{
"data": {
"id": 123,
"type": "google",
"email": "[email protected]",
"status": "connected",
"authorized_gmail": true,
"account_identifier": "google:123456789012345678"
},
"metadata": {
"request_id": "<string>"
}
}Creates a new Gmail integration for mailbox functionality. This endpoint bypasses the OAuth flow and directly creates an integration with provided credentials.
curl --request POST \
--url https://api.village.do/v2/integrations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"google_integration_properties": {
"account_identifier": "go:123456789",
"email": "[email protected]",
"authentication_token_data": {
"access_token": "<string>",
"scope": "<string>",
"refresh_token": "<string>"
},
"type": "google",
"data_scope": [
"email",
"contacts"
],
"authorized_gmail": true,
"sync_data": {
"email": "[email protected]"
}
}
}
'{
"data": {
"id": 123,
"type": "google",
"email": "[email protected]",
"status": "connected",
"authorized_gmail": true,
"account_identifier": "google:123456789012345678"
},
"metadata": {
"request_id": "<string>"
}
}JWT token obtained from authentication endpoint
Show child attributes
Google account identifier
"go:123456789"
Gmail address
Show child attributes
Google OAuth access token
OAuth scopes granted
Google OAuth refresh token
Integration type
google Data scopes for the integration
["email", "contacts"]Must be true for Gmail integration
true, false Integration created successfully
Gmail integration details
Show child attributes
Integration ID
123
Integration type
"google"
Gmail email address
Integration status
"connected"
Whether Gmail is authorized
true
Account identifier
"google:123456789012345678"
Was this page helpful?