Rust
Ingest a user
Create or update user data independently of a content record.
ingest_a_user accepts UserInput directly. Use a stable application client_id to update the same user on subsequent calls.
let user = UserInput::builder()
.client_id("member-9")
.client_url("https://example.com/users/member-9")
.email("member@example.com")
.name("Avery Member")
.username("avery")
.protected(false)
.build()?;
let response = client.ingest_a_user(&user, None).await?;
println!("Insion user ID: {}", response.id);Signature, input, and outcome
async fn ingest_a_user(
&self,
request: &UserInput,
options: Option<RequestOptions>,
) -> Result<IngestUserResponse, ApiError>Only client_id is required by UserInput::builder(). Optional fields are client_url, stripe_account_id, email, name, username, protected, and metadata. Set protected deliberately: it controls whether the user is protected from automated moderation actions.
The success response has message and Insion user id. Save the returned ID for retrieval, user filters, and appeals; it is different from your external client_id.