subscribers overview
Subscribers API For mor information about subscribers, see Subscriber statuses explained - MailerLite
Added in v0.0.1
Table of contents
utils
IDelParams (interface)
Parmameters DELETE
Signature
export interface IDelParams {
/** Subscriber Id */
id: string
}
Added in v0.0.1
IFetchParams (interface)
Parmameters FETCH (GET)
Signature
export interface IFetchParams {
/** Subscriber Id or Email */
id: string
}
Added in v0.0.1
IListParams (interface)
Parameters GET (List)
Signature
export interface IListParams {
/** default to 25 */
limit?: number
/** Defaults to first page. Cursor value available in response body */
cursor?: string
sort?: `${SortOrder}${SortFields}`
filter?: {
[k in Filters]?: string
}
}
Added in v0.0.1
IListResult (interface)
Signature
export interface IListResult<TCustomFields> {
data: Array<ISubscriber<TCustomFields>>
links: ILinks
meta: IMeta
}
Added in v0.0.1
IMeta (interface)
Signature
export interface IMeta {
path: string
per_page: number
next_cursor: string | null
prev_cursor: string | null
}
Added in v0.0.1
ISubscriber (interface)
Signature
export interface ISubscriber<TCustomFields> {
id: string
email: string
status: string
source: string
sent: number
opens_count: number
clicks_count: number
open_rate: number
click_rate: number
ip_address: string | null
subscribed_at: DatetimeStr
unsubscribed_at: DatetimeStr | null
created_at: DatetimeStr
updated_at: DatetimeStr
fields: IStandardFields & TCustomFields
groups: Array<string>
opted_in_at: DatetimeStr | null
optin_ip: DatetimeStr | null
}
Added in v0.0.1
IUpsertParams (interface)
Parameters UPSERT (POST)
Signature
export interface IUpsertParams<TCustomFields> {
email: string
fields?: Partial<IStandardFields & TCustomFields>
groups?: Array<string>
status?: 'active' | 'unsubscribed' | 'unconfirmed' | 'bounced' | 'junk'
subscribed_at?: DatetimeStr
ip_address?: string | null
opted_in_at?: DatetimeStr | null
optin_ip?: DatetimeStr | null
unsubscribed_at?: DatetimeStr | null
}
Added in v0.0.1
IUpsertResult (interface)
Signature
export interface IUpsertResult<TCustomFields> {
data: ISubscriber<TCustomFields>
}
Added in v0.0.1
del
Signature
export declare const del: (params: IDelParams) => Effect<IDelResult>
Added in v0.0.1
fetch
Signature
export declare const fetch: <TCustomFields>(params: IFetchParams) => Effect<IFetchResult<TCustomFields>>
Added in v0.0.1
list
Signature
export declare const list: <TCustomFields>(params: IListParams) => Effect<IListResult<TCustomFields>>
Added in v0.0.1
upsert
Signature
export declare const upsert: <TCustomFields>(
params: IUpsertParams<TCustomFields>
) => Effect<IUpsertResult<TCustomFields>>
Added in v0.0.1
upsertBatch
Signature
export declare const upsertBatch: <TCustomFields>(
params: IUpsertParams<TCustomFields>
) => E.Either<Error, IBatchRequest>
Added in v0.0.1