Get memberships
curl --request GET \
--url https://api.wellapp.ai/v1/memberships \
--header 'Authorization: <authorization>'import requests
url = "https://api.wellapp.ai/v1/memberships"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.wellapp.ai/v1/memberships', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wellapp.ai/v1/memberships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wellapp.ai/v1/memberships"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wellapp.ai/v1/memberships")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/memberships")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"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"
}
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 20,
"total_pages": 1
}
}{
"code": "SCHEMA_VALIDATION_ERROR",
"status": 400,
"title": "Validation Error",
"message": "The request is invalid",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
},
"details": [
{
"instancePath": "<string>",
"schemaPath": "<string>",
"keyword": "<string>",
"params": {},
"message": "<string>"
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}Memberships
Get All Memberships
Retrieve memberships with optional filtering by person
GET
/
v1
/
memberships
Get memberships
curl --request GET \
--url https://api.wellapp.ai/v1/memberships \
--header 'Authorization: <authorization>'import requests
url = "https://api.wellapp.ai/v1/memberships"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.wellapp.ai/v1/memberships', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wellapp.ai/v1/memberships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.wellapp.ai/v1/memberships"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.wellapp.ai/v1/memberships")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wellapp.ai/v1/memberships")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"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"
}
}
],
"meta": {
"total": 1,
"page": 1,
"limit": 20,
"total_pages": 1
}
}{
"code": "SCHEMA_VALIDATION_ERROR",
"status": 400,
"title": "Validation Error",
"message": "The request is invalid",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
},
"details": [
{
"instancePath": "<string>",
"schemaPath": "<string>",
"keyword": "<string>",
"params": {},
"message": "<string>"
}
]
}{
"code": "UNAUTHORIZED",
"status": 401,
"title": "Unauthorized",
"message": "You are not authorized to access this resource",
"meta": {
"log_id": "65c669d4-679c-4a8b-b8c0-fbe37699bb5b"
}
}Filtering & sorting on related objects
Filter and sort on a related (included) object by nesting into the relationship — the same relationships you pass toinclude.
- To-one relations nest directly:
{ "issuer": { "name": { "_eq": "Acme" } } }, and sort by a dot-path:"orderBy": { "field": "issuer.name", "direction": "asc" }. - To-many relations must be quantified with
_some,_every, or_none:{ "items": { "_some": { "quantity": { "_gt": 1 } } } }. They are not directly sortable (a to-many sort needs an aggregate proxy). - Composite
composite_*columns are virtual — filter and sort on their underlying source fields, not on the composite.
include) and how to filter or sort on each:
| Relationship | Cardinality | Filter on a field | Sort by a field |
|---|---|---|---|
person | to-one (people) | { "person": { "full_name": { "_eq": … } } } | "field": "person.full_name" ✅ |
workspace | to-one (workspace) | { "workspace": { "name": { "_eq": … } } } | "field": "workspace.name" ✅ |
invited_by | to-one (people) | { "invited_by": { "full_name": { "_eq": … } } } | "field": "invited_by.full_name" ✅ |
field_name with any field of the related object. See its object-reference page for the full field list.
Filter by a to-one relation (and sort by it):
{
"root": "memberships",
"whereClause": { "person": { "full_name": { "_ilike": "%acme%" } } },
"orderBy": { "field": "person.full_name", "direction": "asc" }
}
Headers
Bearer token for authentication
Query Parameters
Filter memberships by person ID
Page number
Required range:
x >= 1Number of items per page
Required range:
1 <= x <= 100