Skip to main content

MessageSent

Type Alias MessageSent 

Source
pub type MessageSent = CreateNotificationSuccessResponse;
Expand description

The branch of a POST /notifications 200 response where a notification was created (id is a non-empty string). Shares the models::CreateNotificationSuccessResponse shape; see models::CreateNotificationSuccessResponse::as_sent.

Aliased Type§

pub struct MessageSent {
    pub id: Option<String>,
    pub external_id: Option<String>,
    pub errors: Option<Value>,
}

Fields§

§id: Option<String>

Notification identifier when the request created a notification. An empty string means no notification was created; read errors for details (HTTP may still be 200). All OneSignal server SDKs expose message-sent / message-not-sent narrowing helpers (named idiomatically per language — e.g. isMessageSent, is_message_sent, message_sent?); prefer them over comparing id directly.

§external_id: Option<String>

Optional correlation / idempotency-related value from the API response. This is not the end-user External ID used for targeting recipients (that lives under include_aliases.external_id).

§errors: Option<Value>

Polymorphic field: may be an array of human-readable strings and/or an object (for example with invalid_aliases, invalid_external_user_ids, or invalid_player_ids) depending on the API response; HTTP may still be 200 with partial success. Typed SDKs model this loosely so both shapes deserialize.