API ReferenceapicommunityPOST /v1/admin/communities/{slug}/members

POST /v1/admin/communities/\{slug\}/members

Service: community · operationId: (none)

Join a member to a community via service-to-service auth

Required scopes

(no scope declared — review service config)

Path parameters

  • slug (string) required

Request body

{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "user_id"
  ]
}

Responses

200 Member joined or already present

{
  "type": "object",
  "properties": {
    "community_slug": {
      "type": "string"
    },
    "user_id": {
      "type": "string"
    },
    "role": {
      "type": "string"
    },
    "created_at": {
      "type": "string"
    },
    "outcome": {
      "type": "string",
      "enum": [
        "joined",
        "already-joined"
      ]
    }
  },
  "required": [
    "community_slug",
    "user_id",
    "role",
    "created_at",
    "outcome"
  ]
}

404 Community not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://community.platform.loop.health/v1/admin/communities/{slug}/members \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'