InsionInsion
Rust

Create an appeal

Submit an appeal message for an eligible suspended user.

create_an_appeal creates an appeal for a suspended user when appeals are enabled for the organization. It takes the Insion user ID as a separate &str and a typed request containing the required appeal text.

let appeal = PostApiV1UsersUserIdCreateAppealRequest::builder()
    .text("Please review this suspension; the account was compromised.")
    .build()?;

let response = client
    .create_an_appeal("usr_123", &appeal, None)
    .await?;

println!("appeal ID: {}", response.data.id);
println!("appeal URL: {:?}", response.data.appeal_url);

Signature and requirements

async fn create_an_appeal(
    &self,
    user_id: &str,
    request: &PostApiV1UsersUserIdCreateAppealRequest,
    options: Option<RequestOptions>,
) -> Result<CreateAppealResponse, ApiError>

Build the request with .text(...); the builder rejects missing text. user_id must be Insion's user ID, never your external client_id. Obtain it from Retrieve a user or List users.

Response and rejection cases

CreateAppealResponse.data contains an appeal ID, optional action status and action-status time, creation/update timestamps, and optional appeal_url. These values report the returned state and do not imply approval. If the user is ineligible or appeals are disabled, the method returns ApiError; match the typed HTTP error and surface the server message in your product flow.

On this page