Auth Organization Members
Member management and listing methods for organizations.
Endpoints and Methods
auth.organization.member.remove()->POST /organization/remove-memberauth.organization.member.updateRole()->POST /organization/update-member-roleauth.organization.member.invite()->POST /organization/invite-memberauth.organization.member.getActive()->GET /organization/get-active-memberauth.organization.member.list()->GET /organization/list-members
Examples
ATHENA_AUTH_BASE_URL="http://localhost:3001/api/auth"
ATHENA_AUTH_TOKEN="<bearer-token>"
# Adjust payload fields using the OpenAPI schema in this page.
# auth.organization.member.remove() -> POST /organization/remove-member
curl -X POST "$ATHENA_AUTH_BASE_URL/organization/remove-member" \
-H "content-type: application/json" \
-H "authorization: Bearer $ATHENA_AUTH_TOKEN" \
-d '{"...":"See OpenAPI requestBody schema"}'
# auth.organization.member.updateRole() -> POST /organization/update-member-role
curl -X POST "$ATHENA_AUTH_BASE_URL/organization/update-member-role" \
-H "content-type: application/json" \
-H "authorization: Bearer $ATHENA_AUTH_TOKEN" \
-d '{"...":"See OpenAPI requestBody schema"}'
# auth.organization.member.invite() -> POST /organization/invite-member
curl -X POST "$ATHENA_AUTH_BASE_URL/organization/invite-member" \
-H "content-type: application/json" \
-H "authorization: Bearer $ATHENA_AUTH_TOKEN" \
-d '{"...":"See OpenAPI requestBody schema"}'
# auth.organization.member.getActive() -> GET /organization/get-active-member
curl -X GET "$ATHENA_AUTH_BASE_URL/organization/get-active-member" \
-H "authorization: Bearer $ATHENA_AUTH_TOKEN"
# auth.organization.member.list() -> GET /organization/list-members
curl -X GET "$ATHENA_AUTH_BASE_URL/organization/list-members" \
-H "authorization: Bearer $ATHENA_AUTH_TOKEN"use reqwest::Client;
use serde_json::json;
let base_url = "http://localhost:3001/api/auth";
let token = "<bearer-token>";
let http = Client::new();
// Adjust payload fields using the OpenAPI schema in this page.
// auth.organization.member.remove() -> POST /organization/remove-member
let response = http
.post(format!("{base_url}/organization/remove-member"))
.bearer_auth(token)
.json(&json!({
"...": "See OpenAPI requestBody schema"
}))
.send()
.await?;
let _ = response.error_for_status()?;
// auth.organization.member.updateRole() -> POST /organization/update-member-role
let response = http
.post(format!("{base_url}/organization/update-member-role"))
.bearer_auth(token)
.json(&json!({
"...": "See OpenAPI requestBody schema"
}))
.send()
.await?;
let _ = response.error_for_status()?;
// auth.organization.member.invite() -> POST /organization/invite-member
let response = http
.post(format!("{base_url}/organization/invite-member"))
.bearer_auth(token)
.json(&json!({
"...": "See OpenAPI requestBody schema"
}))
.send()
.await?;
let _ = response.error_for_status()?;
// auth.organization.member.getActive() -> GET /organization/get-active-member
let response = http
.get(format!("{base_url}/organization/get-active-member"))
.bearer_auth(token)
.send()
.await?;
let _ = response.error_for_status()?;
// auth.organization.member.list() -> GET /organization/list-members
let response = http
.get(format!("{base_url}/organization/list-members"))
.bearer_auth(token)
.send()
.await?;
let _ = response.error_for_status()?;import { client } from "./auth-client"
await client.auth.organization.member.remove({
memberIdOrEmail: "member@example.com",
})
await client.auth.organization.member.updateRole({
memberId: "member_1",
role: "admin",
})
await client.auth.organization.member.invite({
email: "new-member@example.com",
role: "member",
})
await client.auth.organization.member.getActive()
await client.auth.organization.member.list({
query: {
organizationId: "org_1",
limit: 50,
sortBy: "createdAt",
sortDirection: "desc",
},
})OpenAPI Contract
Authorization
bearerAuth Bearer token authentication
In: header
Request Body
application/json
The ID or email of the member to remove
The ID of the organization to remove the member from. If not provided, the active organization will be used
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:3001/api/auth/organization/remove-member" \ -H "Content-Type: application/json" \ -d '{ "memberIdOrEmail": "string" }'{
"member": {
"id": "string",
"userId": "string",
"organizationId": "string",
"role": "string"
}
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}Authorization
bearerAuth Bearer token authentication
In: header
Request Body
application/json
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:3001/api/auth/organization/update-member-role" \ -H "Content-Type: application/json" \ -d '{ "role": "string", "memberId": "string" }'{
"member": {
"id": "string",
"userId": "string",
"organizationId": "string",
"role": "string"
}
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}Authorization
bearerAuth Bearer token authentication
In: header
Request Body
application/json
The email address of the user to invite
The organization ID to invite the user to
Resend the invitation email, if the user is already invited
The team ID to invite the user to
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:3001/api/auth/organization/invite-member" \ -H "Content-Type: application/json" \ -d '{ "email": "string", "role": "string" }'{
"id": "string",
"email": "string",
"role": "string",
"organizationId": "string",
"inviterId": "string",
"status": "string",
"expiresAt": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}Authorization
bearerAuth Bearer token authentication
In: header
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:3001/api/auth/organization/get-active-member"{
"id": "string",
"userId": "string",
"organizationId": "string",
"role": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}Authorization
bearerAuth Bearer token authentication
In: header
Query Parameters
Response Body
application/json
curl -X GET "http://localhost:3001/api/auth/organization/list-members"{
"members": [
{}
],
"total": 0
}