Navigation

List all challenges

Returns a list of your challenges. The challenges are returned sorted by creation date, with the most recently created challenges appearing first.

Parameters


page number optional, default is 1

The page of the query.


limit number optional, default is 10

The number of results to return in the query. Maximum is 100.


start_date date

The beginning of the query range compared to the createdAt date of the challenge.


end_date date

The end of the query range compared to the createdAt date of the challenge.


Returns


Returns a paginated response.
GET /v2/challenges
const { data, total } = await Rupt.getChallenges({
  page: 1,
  limit: 10,
});
Response
{
  "data": [
    {
      "_id": "649873be6e8b6f9b33722a0c",
      "user": {
        "_id": "649873be6e8b6f9b33722a0c",
        "external_id": "external_account_id",
        "email": "ab*****@rupt.dev",
        "phone": "******34",
      },
      "status": "pending",
      "reasons": ["limit_exceeded", "concurrency"],
      "createdAt": "2021-09-01T00:00:00.000Z"
    }
    ...
  ],
  "page": 1,
  "limit": 10,
  "total": 1000,
}