Expand description
§Organization Invites Admin API
This module provides a Rust interface to Anthropic’s Admin API for managing organization invites, which allows you to list, get, create, and delete invites to your organization.
§Key Features
- List all invites with pagination support
- Get detailed information about a specific invite
- Create new invites to the organization
- Delete pending invites
§Basic Usage
use anthropic_api::{admin::invites::*, Credentials};
#[tokio::main]
async fn main() {
let credentials = Credentials::from_env();
// List invites
let invites = InviteList::builder()
.credentials(credentials.clone())
.create()
.await
.unwrap();
println!("Organization invites: {:?}", invites.data);
// Get a specific invite
if let Some(invite) = invites.data.first() {
let invite_details = Invite::builder(&invite.id)
.credentials(credentials.clone())
.create()
.await
.unwrap();
println!("Invite details: {:?}", invite_details);
}
}Structs§
- Invite
- An invite to the organization
- Invite
Builder - Builder for
InviteRequest. - Invite
Create Builder - Builder for
InviteCreateRequest. - Invite
Create Request - Request parameters for creating an invite
- Invite
Delete Builder - Builder for
InviteDeleteRequest. - Invite
Delete Request - Request parameters for deleting an invite
- Invite
Deleted - Response from the Delete Invite API
- Invite
List - Response from the List Invites API
- Invite
List Builder - Builder for
InviteListRequest. - Invite
List Request - Request parameters for listing invites
- Invite
Request - Request parameters for getting a specific invite
Enums§
- Invite
Builder Error - Error type for InviteBuilder
- Invite
Create Builder Error - Error type for InviteCreateBuilder
- Invite
Delete Builder Error - Error type for InviteDeleteBuilder
- Invite
List Builder Error - Error type for InviteListBuilder
- Invite
Role - Organization role of an invited user
- Invite
Status - Status of an invite