Create an appeal
Submit an appeal message for an eligible suspended user.
createAnAppeal creates an appeal for a suspended user when appeals are enabled for the organization. It is not a generic note endpoint: provide the Insion user ID and a clear appeal message, and handle the server result or error explicitly.
let response = try await client.createAnAppeal(
userId: "usr_123",
request: .init(text: "Please review this suspension; the account was compromised.")
)
print(response.data.id)
print(response.data.appealUrl)Signature
func createAnAppeal(
userId: String,
request: Requests.PostApiV1UsersUserIdCreateAppealRequest,
requestOptions: RequestOptions? = nil
) async throws -> CreateAppealResponseuserId must be the Insion user ID, not your own clientId. The request model requires text: String; keep it suitable for the review workflow rather than relying on undeclared extra request properties.
Result and eligibility
The response wraps CreateAppealResponseData in data. It includes the appeal id, nullable actionStatus, nullable actionStatusCreatedAt, creation/update dates, and nullable appealUrl. These values describe the appeal/action state returned by the API; they are not a guarantee that the appeal has been approved.
The API can reject appeals when the user is not eligible or appeals are disabled. Catch ApiError.httpError, inspect HTTPError.kind and body?.message, and show an appropriate product message. Obtain the user ID from Retrieve a user or List users before submitting the request.