API Reference

User Organizations

Copy page

Operations for managing user organizations

List user organizations

GET
/manage/api/users/{userId}/organizations

Authorization

bearerAuth cookieAuth
AuthorizationBearer <token>

Bearer token authentication. Use this for API clients and service-to-service communication. Set the Authorization header to "Bearer ".

In: header

better-auth.session_token<token>

Session-based authentication using HTTP-only cookies. Cookies are automatically sent by browsers. For server-side requests, include cookies with names starting with "better-auth." in the Cookie header.

In: cookie

Path Parameters

userId*string

User ID

Response Body

application/json

curl -X GET "https://api.pilot.inkeep.com/manage/api/users/string/organizations"
[
  {
    "createdAt": "string",
    "id": "string",
    "organizationId": "string",
    "organizationName": "string",
    "organizationSlug": "string",
    "role": "string",
    "userId": "string"
  }
]

Add user to organization

POST
/manage/api/users/{userId}/organizations

Authorization

bearerAuth cookieAuth
AuthorizationBearer <token>

Bearer token authentication. Use this for API clients and service-to-service communication. Set the Authorization header to "Bearer ".

In: header

better-auth.session_token<token>

Session-based authentication using HTTP-only cookies. Cookies are automatically sent by browsers. For server-side requests, include cookies with names starting with "better-auth." in the Cookie header.

In: cookie

Path Parameters

userId*string

User ID

Request Body

application/json

organizationId*string
role?string
Default"member"

Response Body

application/json

curl -X POST "https://api.pilot.inkeep.com/manage/api/users/string/organizations" \  -H "Content-Type: application/json" \  -d '{    "organizationId": "string"  }'
{
  "createdAt": "string",
  "organizationId": "string",
  "role": "string"
}