Documentation Index¶
Fetch the complete documentation index at: https://makakoo-traylinx-35.mintlify.app/llms.txt Use this file to discover all available pages before exploring further.
Organization Service¶
Organization management API operations.
The Organization service manages organizations, their projects, members, and invitations. It is served by the Organizations & Metrics microservice, configured via REACT_APP_ORGANIZATIONS_API_BASE_URL (default: https://api.traylinx.com/ma-metrics-wsp-ms/v1/api).
All requests require both Api-Key and Authorization: Bearer <token> headers.
List Organizations¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations
Return all organizations accessible to the authenticated user, including projects, users, and permission metadata.
```bash theme={null}
curl https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations \
-H "Authorization: Bearer <ResponseField name="data" type="array">
Array of organization objects.
<Expandable title="Organization object">
<ResponseField name="id" type="string">
The organization’s unique ID.
</ResponseField>
<ResponseField name="type" type="string">
Always `"organization"`.
</ResponseField>
<ResponseField name="attributes.name" type="string">
The organization name.
</ResponseField>
<ResponseField name="attributes.currentUserRole" type="string">
The authenticated user’s role in this organization: `OWNER`, `ADMIN`, `MEMBER`, or `VIEWER`.
</ResponseField>
<ResponseField name="meta.can" type="object">
Permission map for UI visibility.
</ResponseField>
</Expandable>
</ResponseField>
***
## Create Organization
<CodeGroup>
```http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations
```
</CodeGroup>
Create a new organization. An organization wallet is automatically created after a successful creation.
<ParamField body="data.type" type="string" required>
Must be `"organization"`.
</ParamField>
<ParamField body="data.attributes.name" type="string" required>
The name for the new organization.
</ParamField>
```bash theme={null}
curl -X POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations \
-H "Authorization: Bearer <token>" \
-H "Api-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"data": {
"type": "organization",
"attributes": { "name": "Acme Corp" }
}
}'
Response: 200 OK with the created organization object.
Get Organization¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}
Fetch details for a specific organization, optionally including related resources.
users, projects, organization_memberships.
true, bypasses client-side caching. Cached data is considered stale after 5 minutes.
```bash theme={null}
curl "https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/123?include=users,projects" \
-H "Authorization: Bearer <ResponseField name="data.id" type="string">
The organization ID. Always validate that this matches the requested ID.
</ResponseField>
<ResponseField name="data.attributes.name" type="string">
The organization name.
</ResponseField>
<ResponseField name="meta.can" type="object">
Permission map scoped to the authenticated user.
</ResponseField>
<ResponseField name="included" type="array">
Related resources (users, projects, memberships) when `include` is specified.
</ResponseField>
***
## Update Organization Name
<CodeGroup>
```http theme={null}
PATCH https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}
```
</CodeGroup>
Update the name of an existing organization.
<ParamField path="organizationId" type="string" required>
The organization’s unique ID.
</ParamField>
<ParamField body="data.attributes.name" type="string" required>
The new name for the organization.
</ParamField>
```bash theme={null}
curl -X PATCH https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/123 \
-H "Authorization: Bearer <token>" \
-H "Api-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"data": {
"attributes": { "name": "New Name" }
}
}'
Response: 200 OK with the updated organization object.
List Organization Members¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/users
List all members of an organization.
Response: Array of user objects with their membership roles.
Add User to Organization¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/add_user
Add an existing platform user to an organization. If the user does not exist, automatically falls back to sending an invitation email.
"users".
OWNER, ADMIN, MEMBER, VIEWER.
```bash theme={null}
curl -X POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/123/add_user \
-H "Authorization: Bearer ***
## Send Organization Invitation
<CodeGroup>
```http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/invitations
```
</CodeGroup>
Send an email invitation to join an organization to a user who may not yet have a platform account.
<ParamField path="organizationId" type="string" required>
The organization’s unique ID.
</ParamField>
<ParamField body="data.type" type="string" required>
Must be `"membershipInvitation"`.
</ParamField>
<ParamField body="data.attributes.email" type="string" required>
The email address to invite.
</ParamField>
<ParamField body="data.attributes.orgRole" type="string">
The role to grant on acceptance. Defaults to `"member"`. Accepted values: `"owner"`, `"admin"`, `"member"`, `"viewer"`.
</ParamField>
```bash theme={null}
curl -X POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/123/invitations \
-H "Authorization: Bearer <token>" \
-H "Api-Key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"data": {
"type": "membershipInvitation",
"attributes": { "email": "newuser@example.com", "orgRole": "member" }
}
}'
422 with redirect_to_add_member), the service automatically calls POST /organizations/{id}/add_user instead.
List Organization Invitations¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/invitations
List all pending invitations for an organization.
Resend Organization Invitation¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/invitations/{invitationId}/resend
Cancel Organization Invitation¶
http theme={null}
DELETE https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/invitations/{invitationId}
Update Organization Invitation¶
http theme={null}
PATCH https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/invitations/{invitationId}
Update the role of a pending invitation before it is accepted.
"owner", "admin", "member", "viewer".
Update Member Role¶
http theme={null}
PATCH https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/members/{userId}/role
Change an organization member’s role.
OWNER, ADMIN, MEMBER, VIEWER.
Error codes:
| Code | Description |
|---|---|
CANNOT_CHANGE_OWN_ROLE |
Users cannot change their own role. |
INVALID_ROLE_TRANSITION |
Cannot demote the last owner. Transfer ownership first. |
INSUFFICIENT_PERMISSIONS |
Admins cannot promote users to the owner role. |
Remove Member from Organization¶
http theme={null}
DELETE https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/remove_user/{userId}
Check Pending Invitations (Current User)¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/me/pending_invitations
List invitations pending acceptance by the authenticated user.
Accept Invitation¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/me/accept_invitation/{invitationId}
Reject Invitation¶
http theme={null}
DELETE https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/me/reject_invitation/{invitationId}
Global Credentials Hub¶
Organization-scoped endpoints for listing credentials across all projects.
List Organization API Keys¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/api_keys
List Organization LLM API Keys¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/llm_api_keys
List Organization Sentinel Passes¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/organizations/{organizationId}/sentinel_passes
All three endpoints accept organizationId as a path parameter and return an array of the respective credential objects.
Built with Mintlify.