Skip to main content

Teams

The Teams router lets you create multi-tenant teams, invite members by email, assign roles (admin, member, readonly), and manage membership.

Base URL: https://novyx-ram-api.fly.dev

Tier: Pro+


Create Team

POST /v1/teams

Create a new team. You become the owner.

Request body

ParameterTypeRequiredDefaultDescription
namestringYesTeam name (1–100 characters)

Response fields

FieldTypeDescription
team_idstringUnique team identifier
namestringTeam name
owner_tenant_idstringOwner's tenant ID
membersarrayList of members with tenant_id, role, joined_at
member_countnumberTotal members
created_atstringISO 8601 timestamp
updated_atstringISO 8601 timestamp

Examples

from novyx import Novyx

nx = Novyx(api_key="nram_your_key")

team = nx.create_team(name="engineering")
print(team["team_id"])

Response

{
"team_id": "team_a1b2c3d4",
"name": "engineering",
"owner_tenant_id": "tenant_abc123",
"members": [
{
"tenant_id": "tenant_abc123",
"role": "owner",
"joined_at": "2026-03-09T12:00:00Z"
}
],
"member_count": 1,
"created_at": "2026-03-09T12:00:00Z",
"updated_at": "2026-03-09T12:00:00Z"
}

Errors

StatusCodeCause
400VALIDATION_ERRORName is blank or too long
403FEATURE_NOT_AVAILABLERequires Pro+ plan

List Teams

GET /v1/teams

List all teams you own or belong to.

Response fields

FieldTypeDescription
teamsarrayArray of team objects
total_countnumberTotal teams

Examples

result = nx.list_teams()
for team in result["teams"]:
print(f"{team['name']}: {team['member_count']} members")

Get Team

GET /v1/teams/{team_id}

Retrieve a team with its full member list.

Path parameters

ParameterTypeDescription
team_idstringTeam identifier

Examples

team = nx.get_team("team_a1b2c3d4")
for member in team["members"]:
print(f" {member['tenant_id']}: {member['role']}")

Errors

StatusCodeCause
404NOT_FOUNDTeam does not exist

Update Team

PUT /v1/teams/{team_id}

Update team details. Requires owner or admin role.

Path parameters

ParameterTypeDescription
team_idstringTeam identifier

Request body

ParameterTypeRequiredDescription
namestringNoUpdated team name (1–100 characters)

Examples

updated = nx.update_team("team_a1b2c3d4", name="platform-engineering")

Errors

StatusCodeCause
403FORBIDDENMust be owner or admin
404NOT_FOUNDTeam does not exist

Delete Team

DELETE /v1/teams/{team_id}

Delete a team. Owner only.

Path parameters

ParameterTypeDescription
team_idstringTeam identifier

Examples

nx.delete_team("team_a1b2c3d4")

Response

Returns 204 No Content on success.

Errors

StatusCodeCause
403FORBIDDENOwner only
404NOT_FOUNDTeam does not exist

Invite Member

POST /v1/teams/{team_id}/invite

Invite a user to join the team by email. Requires owner or admin role.

Path parameters

ParameterTypeDescription
team_idstringTeam identifier

Request body

ParameterTypeRequiredDefaultDescription
emailstringYesInvitee's email address
rolestringNo"member"Role: admin, member, or readonly

Response fields

FieldTypeDescription
invitation_idstringInvitation identifier
team_idstringTeam identifier
emailstringInvitee email
rolestringAssigned role
expires_atstringInvitation expiry (ISO 8601)
messagestringConfirmation message

Examples

invite = nx.invite_member(
"team_a1b2c3d4",
email="alice@example.com",
role="admin",
)
print(invite["invitation_id"])

Errors

StatusCodeCause
400VALIDATION_ERRORInvalid email or role
403FORBIDDENMust be owner or admin

Join Team

POST /v1/teams/join

Accept a team invitation using the invitation token.

Request body

ParameterTypeRequiredDescription
invitation_idstringYesInvitation ID from the invite email

Response fields

FieldTypeDescription
team_idstringJoined team ID
team_namestringTeam name
rolestringAssigned role
messagestringConfirmation message

Examples

result = nx.join_team(invitation_id="inv_x1y2z3")
print(f"Joined {result['team_name']} as {result['role']}")

Errors

StatusCodeCause
400INVALID_TOKENInvitation expired or invalid

Update Member Role

PUT /v1/teams/{team_id}/members/{tenant_id}

Change a team member's role. Requires owner or admin role.

Path parameters

ParameterTypeDescription
team_idstringTeam identifier
tenant_idstringMember's tenant ID

Request body

ParameterTypeRequiredDescription
rolestringYesNew role: admin, member, or readonly

Examples

nx.update_member_role("team_a1b2c3d4", "tenant_xyz789", role="admin")

Errors

StatusCodeCause
400VALIDATION_ERRORInvalid role
403FORBIDDENMust be owner or admin

Remove Member

DELETE /v1/teams/{team_id}/members/{tenant_id}

Remove a member from the team. Requires owner or admin role.

Path parameters

ParameterTypeDescription
team_idstringTeam identifier
tenant_idstringMember's tenant ID

Examples

nx.remove_member("team_a1b2c3d4", "tenant_xyz789")

Response

Returns 204 No Content on success.

Errors

StatusCodeCause
403FORBIDDENMust be owner or admin
404NOT_FOUNDMember not found in team