Skip to content

List recent events

POST
/events/recent
curl --request POST \
--url https://api.roamex.com/v1/events/recent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "esim.activated", "limit": 20 }'

Returns your most recent events, newest first, optionally of one type. pagination.hasMore is true when older events exist beyond limit. The same events go to the webhook endpoints you subscribed to them.

Optional. An empty body returns the 10 most recent events of every type. A body that is present must be a JSON object.

Media typeapplication/json
object
type

Only events of this type. Any other value returns 400 INVALID_TYPE.

string
Allowed values: esim.provisioned order.created esim.topped_up customer_topup.succeeded wallet.low_balance wallet.topped_up esim.low_data esim.activated esim.expiring_soon
limit

Events to return. A missing, zero or non-numeric value means 10; values are kept between 1 and 50.

integer
default: 10 >= 1 <= 50

Example

{
"type": "esim.activated",
"limit": 20
}

The events.

Media typeapplication/json
object
success
required
boolean
events
required
Array<object>
object
id
required

The event id. The webhook sends it as event_id.

string format: uuid
type
required
  • esim.provisioned: new eSIMs were provisioned.
  • order.created: an order paid from your balance was created.
  • esim.topped_up: an eSIM got more data or days.
  • customer_topup.succeeded: a traveller paid for a top-up and received it.
  • wallet.low_balance: your balance fell below your low-balance threshold.
  • wallet.topped_up: your balance was topped up.
  • esim.low_data: an eSIM is running low on data.
  • esim.activated: an eSIM connected for the first time.
  • esim.expiring_soon: an eSIM is close to its end date.
string
Allowed values: esim.provisioned order.created esim.topped_up customer_topup.succeeded wallet.low_balance wallet.topped_up esim.low_data esim.activated esim.expiring_soon
created_at
required

When the event happened.

string format: date-time
data
required

The event’s fields. They depend on the event type.

object
key
additional properties
any
pagination
required
object
limit
required
integer
returned
required
integer
hasMore
required
boolean

Example

{
"success": true,
"events": [
{
"id": "00000000-0000-4000-8000-0000000000e1",
"type": "esim.topped_up",
"created_at": "2026-10-22T09:12:00+00:00",
"data": {
"esim_id": "00000000-0000-4000-8000-0000000000c1",
"iccid": "8900000000000000000",
"package_name": "Japan · 1 GB · 7 days",
"volume_bytes": 1073741824,
"duration": 7,
"duration_unit": "DAY",
"cost_minor": 450,
"currency": "EUR",
"new_balance_minor": 23650
}
}
],
"pagination": {
"limit": 10,
"returned": 1,
"hasMore": false
}
}
X-RateLimit-Limit
integer

Calls allowed per minute for this endpoint group.

X-RateLimit-Remaining
integer

Calls left in the current minute.

X-RateLimit-Reset
integer

When the current window ends, in Unix seconds.

  • INVALID_JSON: the body is not valid JSON, or not a JSON object.
  • INVALID_TYPE: type is not a known event type. The message lists them.
Media typeapplication/json
object
success
required
boolean
error
required
object
code
required

Machine-readable. Branch on this.

string
message
required

A sentence for people. It can change.

string

Example

{
"success": false
}

AUTH_ERROR: the key is missing, malformed, unknown or revoked. The message says which, for example Missing Authorization header, Invalid Authorization header format. Use: Bearer <api_key>, Invalid API key format or Invalid API key.

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required

Machine-readable. Branch on this.

string
message
required

A sentence for people. It can change.

string

Example

{
"success": false,
"error": {
"code": "AUTH_ERROR",
"message": "Invalid API key"
}
}

AUTH_ERROR: the account is suspended (Your account is suspended. Please contact support.) or rejected (Account is not approved for API access).

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required

Machine-readable. Branch on this.

string
message
required

A sentence for people. It can change.

string

Example

{
"success": false
}

NOT_FOUND: the API is switched off on the platform. Every endpoint answers this before the key is checked, with the message This feature is not available.

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required

Machine-readable. Branch on this.

string
message
required

A sentence for people. It can change.

string

Example

{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "This feature is not available."
}
}

PAYLOAD_TOO_LARGE: the Content-Length header is over 100 KB.

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required

Machine-readable. Branch on this.

string
message
required

A sentence for people. It can change.

string

Example

{
"success": false
}

RATE_LIMITED: the account’s per-minute budget for this endpoint group is used up, or too many refused keys came from this IP address. Wait the Retry-After seconds.

Media typeapplication/json
object
success
required
boolean
error
required
object
code
required

Machine-readable. Branch on this.

string
message
required

A sentence for people. It can change.

string

Example

{
"success": false,
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Please wait 42 seconds before retrying."
}
}
X-RateLimit-Limit
integer

Calls allowed per minute for this endpoint group.

X-RateLimit-Remaining
integer

Calls left in the current minute.

X-RateLimit-Reset
integer

When the current window ends, in Unix seconds.

Retry-After
integer

Seconds to wait before retrying.

  • FETCH_FAILED: the events could not be read.
  • INTERNAL_ERROR, or AUTH_ERROR with status 500: see the shared errors.
Media typeapplication/json
object
success
required
boolean
error
required
object
code
required

Machine-readable. Branch on this.

string
message
required

A sentence for people. It can change.

string

Example

{
"success": false
}