> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.mangopay.com/api-reference/events/list-events/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server. # List all Events GET https://api.sandbox.mangopay.com/v2.01/{ClientId}/events **Note** Events are returned up to 45 days after they occur. Any request attempting to access an event older than 45 days will result in an HTTP 400 - error. List all Events Reference: https://docs.mangopay.com/api-reference/events/list-events ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. If your platform is using a [proxy](/guides/sca/proxy-management) to take SCA-triggering action on behalf of users, you also need to integrate [mTLS authentication](/guides/sca/platform) and use the `api-mtls` base URL. ## Servers - `https://api.sandbox.mangopay.com` (Sandbox, default) - `https://api.mangopay.com` (Production) - `https://api-mtls.sandbox.mangopay.com` (mTLS Sandbox) - `https://api-mtls.mangopay.com` (mTLS Production) ## Request ### Path parameters - `ClientId` (string, required) — Platform's API account identifier, associated with the API key. ### Query parameters - `EventType` (string, required) — **Allowed values:** An `EventType` listed in the event types list The type of the event. - `BeforeDate` (integer, optional) — The date before which the event was created (based on the event's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. - `AfterDate` (integer, optional) — The date after which the event was created (based on the event's `CreationDate` parameter). You can filter on a specific time range by using both the `AfterDate` and `BeforeDate` query parameters. ## Response ### 200 Success - `Array (Events)` (list of ListAllEventsResponseArrayEventsItems, optional) — The list of events created by the platform. ## Errors ### 400 Bad Request Error Bad Request - `Message` (string, optional) — Description of the error. - `Type` (string, optional) — The category of the error. - `Id` (string, optional) — Unique identifier of the error instance, useful when contacting Mangopay for support. - `Date` (double, optional) — Unix timestamp (UTC) of the date and time the error was triggered. - `errors` (map from string to string, optional, nullable) — Object containing one or more field-level errors. ## Types ### ListAllEventsResponseArrayEventsItems - `Object` (EventResponse, optional) ### EventResponse - `ResourceId` (string, optional) — Max. length: 255 characters The unique identifier of the event. - `Date` (integer, optional) — The date and time the event occurred. - `EventType` (string, optional) — **Returned values:** An `EventType` listed in the event types list The type of the event. ## Examples **Response** ```json [ { "Date": 1655891453, "EventType": "UBO_DECLARATION_CREATED", "ResourceId": "144085929" }, { "Date": 1655891893, "EventType": "KYC_CREATED", "ResourceId": "144086566" } ] ``` **SDK Code** ```python from pprint import pprint import mangopay mangopay.client_id='your-client-id' mangopay.apikey='your-api-key' from mangopay.api import APIRequest handler = APIRequest(sandbox=True) from mangopay.resources import Event events = Event.all() for event in events: pprint(event._data) print() ``` ```javascript const mangopayInstance = require('mangopay4-nodejs-sdk') const mangopay = new mangopayInstance({ clientId: 'your-client-id', clientApiKey: 'your-api-key', }) const listEvents = async () => { return await mangopay.Events.getAll() .then((response) => { console.info(response) return response }) .catch((err) => { console.log(err) return false }) } listEvents() ``` ```java import java.util.List; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.mangopay.MangoPayApi; import com.mangopay.core.FilterEvents; import com.mangopay.core.Pagination; import com.mangopay.entities.Event; import com.mangopay.core.enumerations.EventType; public class ListEvents { public static void main(String[] args) throws Exception { MangoPayApi mangopay = new MangoPayApi(); mangopay.getConfig().setClientId("your-client-id"); mangopay.getConfig().setClientPassword("your-api-key"); FilterEvents eventsFilter = new FilterEvents(); eventsFilter.setType(EventType.PAYIN_NORMAL_CREATED); List events = mangopay.getEventApi().get(eventsFilter, new Pagination(1, 100), null); Gson prettyPrint = new GsonBuilder().setPrettyPrinting().create(); String prettyJson = prettyPrint.toJson(events); System.out.println(prettyJson); } } ``` ```csharp using MangoPay.SDK; using Newtonsoft.Json; class Program { static async Task Main(string[] args) { MangoPayApi api = new MangoPayApi(); api.Config.ClientId = "your-client-id"; api.Config.ClientPassword = "your-api-key"; var events = await api.Events.GetAllAsync(null); string prettyPrint = JsonConvert.SerializeObject(events, Formatting.Indented); Console.WriteLine(prettyPrint); } } ``` ```php Config->ClientId = 'your-client-id'; $api->Config->ClientPassword = 'your-api-key'; $api->Config->TemporaryFolder = 'tmp/'; try { $response = $api->Events->GetAll(); print_r($response); } catch(MGPResponseException $e) { print_r($e); } catch(MGPException $e) { print_r($e); } ``` ```ruby require 'mangopay' MangoPay.configure do |client| client.preproduction = true client.client_id = 'your-client-id' client.client_apiKey = 'your-api-key' client.log_file = File.join(Dir.pwd, 'mangopay.log') end def listEvents() begin response = MangoPay::Event.fetch() puts response return response rescue MangoPay::ResponseError => error puts "Failed to fetch events: #{error.message}" puts "Error details: #{error.details}" return false end end listEvents() ```