Skip to main content
POST
/
groups
/
upsert
curl --request POST \
--url https://api.village.do/v1/groups/upsert \
--header 'Content-Type: application/json' \
--header 'user-identifier: <user-identifier>' \
--header 'x-access-token: <api-key>' \
--data '{
"name": "Tech Entrepreneurs",
"logo": "https://example.com/logo.png"
}'
{
  "success": true,
  "data": {
    "id": "app-123-tech-entrepreneurs",
    "name": "Tech Entrepreneurs",
    "logo": "https://example.com/logo.png",
    "invite_link": "https://village.do/invite/abc123"
  }
}

Authorizations

x-access-token
string
header
required

JWT token obtained from /users/authorization endpoint

Headers

user-identifier
string
required

Specify the user making the request. This identifier should match the one you used when integrating the user with Village. Not needed when using user token authentication.

Body

application/json
name
string
required

Name of the group

Example:

"Tech Entrepreneurs"

group_id
string

Optional. Group identifier for update operations. If provided, updates existing group; if omitted, creates new group.

Example:

"app-123-tech-entrepreneurs"

Logo URL for the group (optional)

Example:

"https://example.com/logo.png"

Response

Group updated successfully

success
boolean
Example:

true

data
object