Skip to main content
POST
/
groups
/
upsert
Upsert Group
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",
  "group_id": "app-123-tech-entrepreneurs",
  "logo": "https://example.com/logo.png"
}
'
{
  "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

id
string

Unique identifier for the group

Example:

"app-123-tech-entrepreneurs"

name
string

Name of the group

Example:

"Tech Entrepreneurs"

logo
string | null

Logo URL for the group

Example:

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

Invite link for the group

Example:

"https://village.do/invite/abc123"