Skip to main content
PATCH
/
v1
/
memberships
/
{id}
Update a membership
curl --request PATCH \
  --url https://api.wellapp.ai/v1/memberships/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "membership",
  "attributes": {
    "role": "admin"
  }
}'
{
  "data": {
    "type": "memberships",
    "id": "550e8400-e29b-41d4-a716-446655440007",
    "attributes": {
      "role": "member",
      "created_at": "2024-01-20T10:30:00Z",
      "updated_at": "2024-01-20T10:30:00Z"
    },
    "relationships": {
      "workspace": {
        "data": {
          "type": "workspace",
          "id": "550e8400-e29b-41d4-a716-446655440003"
        }
      },
      "person": {
        "data": {
          "type": "people",
          "id": "550e8400-e29b-41d4-a716-446655440000"
        }
      }
    }
  },
  "included": [
    {
      "type": "workspace",
      "id": "550e8400-e29b-41d4-a716-446655440003",
      "attributes": {
        "name": "Marketing Team Workspace",
        "description": "Collaborative workspace for the marketing team to manage campaigns and content",
        "avatar_color": "#FF5733",
        "external_workspace_id": "mkt-workspace-001",
        "auto_extract_enabled": false,
        "created_at": "2024-01-05T08:00:00Z",
        "updated_at": "2024-01-18T12:15:00Z"
      }
    },
    {
      "type": "people",
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "attributes": {
        "first_name": "Sarah",
        "last_name": "Johnson",
        "full_name": "Sarah Johnson",
        "created_at": "2024-01-10T09:00:00Z",
        "updated_at": "2024-01-10T09:00:00Z"
      }
    }
  ]
}

Headers

Authorization
string
required

Bearer token for authentication

Path Parameters

id
string<uuid>
required

UUID of the membership to update

Body

application/json
data
object
required

Response

Membership updated successfully

data
object
I