Skip to main content
POST
/
v2
/
integrations
Create Gmail Integration
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>"
  }
}

Authorizations

Authorization
string
header
required

JWT token obtained from authentication endpoint

Body

application/json
google_integration_properties
object
required

Response

Integration created successfully

data
object
required

Gmail integration details

metadata
object
required