· View as Markdown

Events

An event is an organized ride, with its routes and the riders who RSVP to it.

The participant endpoints read, set and withdraw the authenticated user's own RSVP, and let an event owner (including an organization) remove a participant from their event. An app RSVPs for a rider with that rider's own token: organization accounts can't RSVP for their members. Get notified of RSVPs with webhooks.

Events

Returns a list of events

GET /api/v1/events.json

Returns a paginated list of events accessible to the authenticated user.

Supports filtering by name, visibility and archived status.

Archived events are left out unless archived=true is passed, which returns them on their own.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • page integer query
    Page number for pagination
  • page_size integer query
    Number of items per page (20-200)
  • name string query
    Filter by name (partial match)
  • visibility string query
    Filter by visibility
    One of: public, followers_only, mutual_followers_only, private
  • archived string query
    Filter by archived status
    One of: true, false

Response 200

  • events array of objects
    21 fields
    • id integer
    • user_id integer
    • url string
    • html_url string
    • visibility string
    • name string
    • description string or null
    • logo_url string or null
    • banner_url string or null
    • location string or null
    • lat number or null
      Latitude
    • lng number or null
      Longitude
    • time_zone string
    • start_date string
    • start_time string
    • end_date string
    • end_time string
    • all_day boolean
    • archived boolean
    • created_at date-time
    • updated_at date-time
  • meta object
    1 field
    • pagination object
      4 fields
      • record_count integer
        Total number of records
      • page_count integer
        Total number of pages
      • page_size integer
        Number of records per page
      • next_page_url string or null
        URL for the next page (null if last page)

Errors

  • 401 Unauthorized
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/events.json
Response 200
{
  "events": [
    {
      "id": 123,
      "user_id": 123,
      "url": "https://ridewithgps.com/api/v1/events/123.json",
      "html_url": "https://ridewithgps.com/events/123",
      "visibility": "public",
      "name": "Portland Century",
      "description": "A 100 mile ride around Portland",
      "logo_url": "https://ridewithgps.com/files/logo.jpg",
      "banner_url": "https://ridewithgps.com/files/banner.jpg",
      "location": "Portland, OR",
      "lat": 45.521529,
      "lng": -122.691804,
      "time_zone": "America/Los_Angeles",
      "start_date": "2000-01-01",
      "start_time": "09:00",
      "end_date": "2000-01-01",
      "end_time": "15:00",
      "all_day": false,
      "archived": false,
      "created_at": "2000-01-01T12:00:00Z",
      "updated_at": "2000-01-01T12:00:00Z"
    }
  ],
  "meta": {
    "pagination": {
      "record_count": 45,
      "page_count": 3,
      "page_size": 20,
      "next_page_url": "https://ridewithgps.com/api/v1/events.json?page=2"
    }
  }
}

Returns the specified event

GET /api/v1/events/{id}.json

Returns detailed information about a specific event.

The participants array is included only when the authenticated user is the event owner.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required
  • privacy_code string query
    Privacy code for the non public asset

Response 200

  • event object
    26 fields
    • id integer
    • user_id integer
    • url string
    • html_url string
    • visibility string
    • name string
    • description string or null
    • logo_url string or null
    • banner_url string or null
    • location string or null
    • lat number or null
      Latitude
    • lng number or null
      Longitude
    • time_zone string
    • start_date string
    • start_time string
    • end_date string
    • end_time string
    • all_day boolean
    • archived boolean
    • created_at date-time
    • updated_at date-time
    • tags array of strings
      Tags. Only present on club-owned events.
    • organizers array of objects
      Event organizers. Only present on organization-owned events, and limited to organizers who are still active members of the organization.
      4 fields
      • id integer
      • name string
      • created_at date-time
      • updated_at date-time
    • routes array of objects
      29 fields
      • id integer
      • user_id integer
      • url string
      • html_url string
      • visibility string
      • name string
      • description string or null
      • locality string or null
      • administrative_area string or null
      • country_code string or null
      • distance number
        Distance in meters
      • elevation_gain number
        Elevation gain in meters
      • elevation_loss number
        Elevation loss in meters
      • first_lat number
      • first_lng number
      • last_lat number
      • last_lng number
      • sw_lat number
        Southwest bounding box latitude
      • sw_lng number
        Southwest bounding box longitude
      • ne_lat number
        Northeast bounding box latitude
      • ne_lng number
        Northeast bounding box longitude
      • track_type string or null
      • terrain string or null
      • difficulty string or null
      • unpaved_pct number or null
      • surface string or null
      • archived boolean or null
        null for non owned routes
      • created_at date-time
      • updated_at date-time
    • photos array of objects
      12 fields
      • id integer
      • url string
      • highlighted boolean
      • caption string or null
      • lat number or null
      • lng number or null
      • elevation integer or null
      • location string or null
      • locality string or null
      • administrative_area string or null
      • country_code string or null
      • created_at date-time
    • participants array of objects
      Event participants. Only included for the event owner.
      4 fields
      • user object
        5 fields
        • id integer
        • name string
        • email string or null
          Null for accounts without a real email address.
        • created_at date-time
        • updated_at date-time
      • status string
        participant (going), interested, declined (not going), or disallowed (removed by an organizer, or expired). A disallowed rider can neither RSVP again nor withdraw.
        One of: participant, interested, declined, disallowed
      • created_at date-time
      • updated_at date-time

Errors

  • 401 Unauthorized
  • 403 Forbidden - Event not visible to user
  • 404 Not Found - Event not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/events/123.json
Response 200
{
  "event": {
    "id": 123,
    "user_id": 123,
    "url": "https://ridewithgps.com/api/v1/events/123.json",
    "html_url": "https://ridewithgps.com/events/123",
    "visibility": "public",
    "name": "Portland Century",
    "description": "A 100 mile ride around Portland",
    "logo_url": "https://ridewithgps.com/files/logo.jpg",
    "banner_url": "https://ridewithgps.com/files/banner.jpg",
    "location": "Portland, OR",
    "lat": 45.521529,
    "lng": -122.691804,
    "time_zone": "America/Los_Angeles",
    "start_date": "2000-01-01",
    "start_time": "09:00",
    "end_date": "2000-01-01",
    "end_time": "15:00",
    "all_day": false,
    "archived": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "tags": [
      "Tags"
    ],
    "organizers": [
      {
        "id": 123,
        "name": "Alex Rider",
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ],
    "routes": [
      {
        "id": 123,
        "user_id": 123,
        "url": "https://ridewithgps.com/api/v1/routes/123.json",
        "html_url": "https://ridewithgps.com/routes/123",
        "visibility": "public",
        "name": "Forest Park loop",
        "description": "Morning ride through Forest Park",
        "locality": "Portland",
        "administrative_area": "OR",
        "country_code": "US",
        "distance": 40237,
        "elevation_gain": 457,
        "elevation_loss": 461,
        "first_lat": 45.521529,
        "first_lng": -122.691804,
        "last_lat": 45.521529,
        "last_lng": -122.691804,
        "sw_lat": 45.432536,
        "sw_lng": -122.836749,
        "ne_lat": 45.652881,
        "ne_lng": -122.471777,
        "track_type": "loop",
        "terrain": "rolling",
        "difficulty": "moderate",
        "unpaved_pct": 12,
        "surface": "mostly_paved",
        "archived": false,
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ],
    "photos": [
      {
        "id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "highlighted": false,
        "caption": "View from Pittock Mansion",
        "lat": 45.521529,
        "lng": -122.691804,
        "elevation": 290,
        "location": "Pittock Mansion",
        "locality": "Portland",
        "administrative_area": "OR",
        "country_code": "US",
        "created_at": "2000-01-01T12:00:00Z"
      }
    ],
    "participants": [
      {
        "user": {
          "id": 123,
          "name": "Alex Rider",
          "email": "alex@example.com",
          "created_at": "2000-01-01T12:00:00Z",
          "updated_at": "2000-01-01T12:00:00Z"
        },
        "status": "participant",
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ]
  }
}

Creates an event

POST /api/v1/events.json

Creates a new event for the authenticated user.

Note: The organizer_ids, logo, and banner fields are supported only for organization-owned events. They are not supported for user-owned events.

Multipart uploads: To upload logo and banner images, send a request with Content-Type: multipart/form-data using the following fields: - event[name] - Event name - event[description] - Event description - event[logo] - Logo image (binary) - event[banner] - Banner image (binary) - etc.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Request body application/json

  • event object required
    16 fields
    • name string
    • description string or null
    • visibility string
    • location string
    • lat number
      Latitude
    • lng number
      Longitude
    • time_zone string or null
    • start_date string
    • start_time string
    • end_date string
    • end_time string
    • logo file or null
    • banner file or null
    • archived boolean
      Archives or unarchives the event. Archived events are left out of GET /api/v1/events.json unless it is called with archived=true, but they stay reachable by id. Archiving does not remove the event from public event search on ridewithgps.com.

      Archiving an already archived event leaves its original archive date untouched.

    • route_ids array of integers
      Routes attached to the event, in display order.

      This replaces the current set: routes already on the event but missing from the array are detached, and an empty array detaches all of them. Omit the field to leave the event's routes untouched.

      Only routes owned by the event owner can be attached. For organization-owned events the owner is the organization account, not the manager making the request. Ids that fail this check are ignored without an error. On a personal (not organization-owned) ride planned in the Ride with GPS mobile app, whose routes can belong to other riders, a new id that fails it, or the id of a deleted route, instead leaves all of the event's routes unchanged, still without an error.

    • organizer_ids array of integers
      User ids of the event organizers. Organization-owned events only: the field is accepted and stored for user-owned events, but those events never return an organizers array, so it has no visible effect.

      This replaces the current set: ids already on the event but missing from the array are dropped, and an empty array clears all of them. Omit the field to leave the event's organizers untouched.

      The organizers array in the response is filtered to users who are active members of the organization, so an id that does not match one is stored but never returned. Unlike route_ids, this array carries no display order.

Response 201

  • event object
    26 fields
    • id integer
    • user_id integer
    • url string
    • html_url string
    • visibility string
    • name string
    • description string or null
    • logo_url string or null
    • banner_url string or null
    • location string or null
    • lat number or null
      Latitude
    • lng number or null
      Longitude
    • time_zone string
    • start_date string
    • start_time string
    • end_date string
    • end_time string
    • all_day boolean
    • archived boolean
    • created_at date-time
    • updated_at date-time
    • tags array of strings
      Tags. Only present on club-owned events.
    • organizers array of objects
      Event organizers. Only present on organization-owned events, and limited to organizers who are still active members of the organization.
      4 fields
      • id integer
      • name string
      • created_at date-time
      • updated_at date-time
    • routes array of objects
      29 fields
      • id integer
      • user_id integer
      • url string
      • html_url string
      • visibility string
      • name string
      • description string or null
      • locality string or null
      • administrative_area string or null
      • country_code string or null
      • distance number
        Distance in meters
      • elevation_gain number
        Elevation gain in meters
      • elevation_loss number
        Elevation loss in meters
      • first_lat number
      • first_lng number
      • last_lat number
      • last_lng number
      • sw_lat number
        Southwest bounding box latitude
      • sw_lng number
        Southwest bounding box longitude
      • ne_lat number
        Northeast bounding box latitude
      • ne_lng number
        Northeast bounding box longitude
      • track_type string or null
      • terrain string or null
      • difficulty string or null
      • unpaved_pct number or null
      • surface string or null
      • archived boolean or null
        null for non owned routes
      • created_at date-time
      • updated_at date-time
    • photos array of objects
      12 fields
      • id integer
      • url string
      • highlighted boolean
      • caption string or null
      • lat number or null
      • lng number or null
      • elevation integer or null
      • location string or null
      • locality string or null
      • administrative_area string or null
      • country_code string or null
      • created_at date-time
    • participants array of objects
      Event participants. Only included for the event owner.
      4 fields
      • user object
        5 fields
        • id integer
        • name string
        • email string or null
          Null for accounts without a real email address.
        • created_at date-time
        • updated_at date-time
      • status string
        participant (going), interested, declined (not going), or disallowed (removed by an organizer, or expired). A disallowed rider can neither RSVP again nor withdraw.
        One of: participant, interested, declined, disallowed
      • created_at date-time
      • updated_at date-time

Errors

  • 401 Unauthorized
  • 422 Validation error
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "event": {
    "name": "Portland Century",
    "description": "A 100 mile ride around Portland",
    "visibility": "public",
    "location": "Portland, OR",
    "lat": 45.521529,
    "lng": -122.691804,
    "time_zone": "America/Los_Angeles",
    "start_date": "2000-01-01",
    "start_time": "09:00",
    "end_date": "2000-01-01",
    "end_time": "15:00",
    "archived": false,
    "route_ids": [
      1
    ],
    "organizer_ids": [
      1
    ]
  }
}' \
  https://ridewithgps.com/api/v1/events.json
Response 201
{
  "event": {
    "id": 123,
    "user_id": 123,
    "url": "https://ridewithgps.com/api/v1/events/123.json",
    "html_url": "https://ridewithgps.com/events/123",
    "visibility": "public",
    "name": "Portland Century",
    "description": "A 100 mile ride around Portland",
    "logo_url": "https://ridewithgps.com/files/logo.jpg",
    "banner_url": "https://ridewithgps.com/files/banner.jpg",
    "location": "Portland, OR",
    "lat": 45.521529,
    "lng": -122.691804,
    "time_zone": "America/Los_Angeles",
    "start_date": "2000-01-01",
    "start_time": "09:00",
    "end_date": "2000-01-01",
    "end_time": "15:00",
    "all_day": false,
    "archived": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "tags": [
      "Tags"
    ],
    "organizers": [
      {
        "id": 123,
        "name": "Alex Rider",
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ],
    "routes": [
      {
        "id": 123,
        "user_id": 123,
        "url": "https://ridewithgps.com/api/v1/routes/123.json",
        "html_url": "https://ridewithgps.com/routes/123",
        "visibility": "public",
        "name": "Forest Park loop",
        "description": "Morning ride through Forest Park",
        "locality": "Portland",
        "administrative_area": "OR",
        "country_code": "US",
        "distance": 40237,
        "elevation_gain": 457,
        "elevation_loss": 461,
        "first_lat": 45.521529,
        "first_lng": -122.691804,
        "last_lat": 45.521529,
        "last_lng": -122.691804,
        "sw_lat": 45.432536,
        "sw_lng": -122.836749,
        "ne_lat": 45.652881,
        "ne_lng": -122.471777,
        "track_type": "loop",
        "terrain": "rolling",
        "difficulty": "moderate",
        "unpaved_pct": 12,
        "surface": "mostly_paved",
        "archived": false,
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ],
    "photos": [
      {
        "id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "highlighted": false,
        "caption": "View from Pittock Mansion",
        "lat": 45.521529,
        "lng": -122.691804,
        "elevation": 290,
        "location": "Pittock Mansion",
        "locality": "Portland",
        "administrative_area": "OR",
        "country_code": "US",
        "created_at": "2000-01-01T12:00:00Z"
      }
    ],
    "participants": [
      {
        "user": {
          "id": 123,
          "name": "Alex Rider",
          "email": "alex@example.com",
          "created_at": "2000-01-01T12:00:00Z",
          "updated_at": "2000-01-01T12:00:00Z"
        },
        "status": "participant",
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ]
  }
}

Updates the specified event

PUT /api/v1/events/{id}.json

Updates an existing event owned by the authenticated user.

Note: The organizer_ids, logo, and banner fields are supported only for organization-owned events. They are not supported for user-owned events.

Multipart uploads: To upload logo and banner images, send a request with Content-Type: multipart/form-data using the following fields: - event[name] - Event name - event[description] - Event description - event[logo] - Logo image (binary) - event[banner] - Banner image (binary) - etc.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required

Request body application/json

  • event object required
    16 fields
    • name string
    • description string or null
    • visibility string
    • location string
    • lat number
      Latitude
    • lng number
      Longitude
    • time_zone string or null
    • start_date string
    • start_time string
    • end_date string
    • end_time string
    • logo file or null
    • banner file or null
    • archived boolean
      Archives or unarchives the event. Archived events are left out of GET /api/v1/events.json unless it is called with archived=true, but they stay reachable by id. Archiving does not remove the event from public event search on ridewithgps.com.

      Archiving an already archived event leaves its original archive date untouched.

    • route_ids array of integers
      Routes attached to the event, in display order.

      This replaces the current set: routes already on the event but missing from the array are detached, and an empty array detaches all of them. Omit the field to leave the event's routes untouched.

      Only routes owned by the event owner can be attached. For organization-owned events the owner is the organization account, not the manager making the request. Ids that fail this check are ignored without an error. On a personal (not organization-owned) ride planned in the Ride with GPS mobile app, whose routes can belong to other riders, a new id that fails it, or the id of a deleted route, instead leaves all of the event's routes unchanged, still without an error.

    • organizer_ids array of integers
      User ids of the event organizers. Organization-owned events only: the field is accepted and stored for user-owned events, but those events never return an organizers array, so it has no visible effect.

      This replaces the current set: ids already on the event but missing from the array are dropped, and an empty array clears all of them. Omit the field to leave the event's organizers untouched.

      The organizers array in the response is filtered to users who are active members of the organization, so an id that does not match one is stored but never returned. Unlike route_ids, this array carries no display order.

Response 200

  • event object
    26 fields
    • id integer
    • user_id integer
    • url string
    • html_url string
    • visibility string
    • name string
    • description string or null
    • logo_url string or null
    • banner_url string or null
    • location string or null
    • lat number or null
      Latitude
    • lng number or null
      Longitude
    • time_zone string
    • start_date string
    • start_time string
    • end_date string
    • end_time string
    • all_day boolean
    • archived boolean
    • created_at date-time
    • updated_at date-time
    • tags array of strings
      Tags. Only present on club-owned events.
    • organizers array of objects
      Event organizers. Only present on organization-owned events, and limited to organizers who are still active members of the organization.
      4 fields
      • id integer
      • name string
      • created_at date-time
      • updated_at date-time
    • routes array of objects
      29 fields
      • id integer
      • user_id integer
      • url string
      • html_url string
      • visibility string
      • name string
      • description string or null
      • locality string or null
      • administrative_area string or null
      • country_code string or null
      • distance number
        Distance in meters
      • elevation_gain number
        Elevation gain in meters
      • elevation_loss number
        Elevation loss in meters
      • first_lat number
      • first_lng number
      • last_lat number
      • last_lng number
      • sw_lat number
        Southwest bounding box latitude
      • sw_lng number
        Southwest bounding box longitude
      • ne_lat number
        Northeast bounding box latitude
      • ne_lng number
        Northeast bounding box longitude
      • track_type string or null
      • terrain string or null
      • difficulty string or null
      • unpaved_pct number or null
      • surface string or null
      • archived boolean or null
        null for non owned routes
      • created_at date-time
      • updated_at date-time
    • photos array of objects
      12 fields
      • id integer
      • url string
      • highlighted boolean
      • caption string or null
      • lat number or null
      • lng number or null
      • elevation integer or null
      • location string or null
      • locality string or null
      • administrative_area string or null
      • country_code string or null
      • created_at date-time
    • participants array of objects
      Event participants. Only included for the event owner.
      4 fields
      • user object
        5 fields
        • id integer
        • name string
        • email string or null
          Null for accounts without a real email address.
        • created_at date-time
        • updated_at date-time
      • status string
        participant (going), interested, declined (not going), or disallowed (removed by an organizer, or expired). A disallowed rider can neither RSVP again nor withdraw.
        One of: participant, interested, declined, disallowed
      • created_at date-time
      • updated_at date-time

Errors

  • 401 Unauthorized
  • 404 Event not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{
  "event": {
    "name": "Portland Century",
    "description": "A 100 mile ride around Portland",
    "visibility": "public",
    "location": "Portland, OR",
    "lat": 45.521529,
    "lng": -122.691804,
    "time_zone": "America/Los_Angeles",
    "start_date": "2000-01-01",
    "start_time": "09:00",
    "end_date": "2000-01-01",
    "end_time": "15:00",
    "archived": false,
    "route_ids": [
      1
    ],
    "organizer_ids": [
      1
    ]
  }
}' \
  https://ridewithgps.com/api/v1/events/123.json
Response 200
{
  "event": {
    "id": 123,
    "user_id": 123,
    "url": "https://ridewithgps.com/api/v1/events/123.json",
    "html_url": "https://ridewithgps.com/events/123",
    "visibility": "public",
    "name": "Portland Century",
    "description": "A 100 mile ride around Portland",
    "logo_url": "https://ridewithgps.com/files/logo.jpg",
    "banner_url": "https://ridewithgps.com/files/banner.jpg",
    "location": "Portland, OR",
    "lat": 45.521529,
    "lng": -122.691804,
    "time_zone": "America/Los_Angeles",
    "start_date": "2000-01-01",
    "start_time": "09:00",
    "end_date": "2000-01-01",
    "end_time": "15:00",
    "all_day": false,
    "archived": false,
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z",
    "tags": [
      "Tags"
    ],
    "organizers": [
      {
        "id": 123,
        "name": "Alex Rider",
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ],
    "routes": [
      {
        "id": 123,
        "user_id": 123,
        "url": "https://ridewithgps.com/api/v1/routes/123.json",
        "html_url": "https://ridewithgps.com/routes/123",
        "visibility": "public",
        "name": "Forest Park loop",
        "description": "Morning ride through Forest Park",
        "locality": "Portland",
        "administrative_area": "OR",
        "country_code": "US",
        "distance": 40237,
        "elevation_gain": 457,
        "elevation_loss": 461,
        "first_lat": 45.521529,
        "first_lng": -122.691804,
        "last_lat": 45.521529,
        "last_lng": -122.691804,
        "sw_lat": 45.432536,
        "sw_lng": -122.836749,
        "ne_lat": 45.652881,
        "ne_lng": -122.471777,
        "track_type": "loop",
        "terrain": "rolling",
        "difficulty": "moderate",
        "unpaved_pct": 12,
        "surface": "mostly_paved",
        "archived": false,
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ],
    "photos": [
      {
        "id": 123,
        "url": "https://ridewithgps.com/api/v1/photos/123/8275d8de285be31d7b2437bc3ae69756.jpg",
        "highlighted": false,
        "caption": "View from Pittock Mansion",
        "lat": 45.521529,
        "lng": -122.691804,
        "elevation": 290,
        "location": "Pittock Mansion",
        "locality": "Portland",
        "administrative_area": "OR",
        "country_code": "US",
        "created_at": "2000-01-01T12:00:00Z"
      }
    ],
    "participants": [
      {
        "user": {
          "id": 123,
          "name": "Alex Rider",
          "email": "alex@example.com",
          "created_at": "2000-01-01T12:00:00Z",
          "updated_at": "2000-01-01T12:00:00Z"
        },
        "status": "participant",
        "created_at": "2000-01-01T12:00:00Z",
        "updated_at": "2000-01-01T12:00:00Z"
      }
    ]
  }
}

Deletes the specified event

DELETE /api/v1/events/{id}.json

Deletes an event owned by the authenticated user

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • id integer path required

Response 204

Event deleted successfully

Errors

  • 401 Unauthorized
  • 404 Event not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X DELETE \
  https://ridewithgps.com/api/v1/events/123.json
Response 204
// Event deleted successfully

Event Participants

Returns the authenticated user's RSVP to the event

GET /api/v1/events/{event_id}/participant.json

Returns the authenticated user's RSVP, or null for participant when they have none.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • event_id integer path required
    Event ID
  • privacy_code string query
    Privacy code for the non public asset

Response 200

  • participant object
    4 fields
    • user object
      5 fields
      • id integer
      • name string
      • email string or null
        Null for accounts without a real email address.
      • created_at date-time
      • updated_at date-time
    • status string
      participant (going), interested, declined (not going), or disallowed (removed by an organizer, or expired). A disallowed rider can neither RSVP again nor withdraw.
      One of: participant, interested, declined, disallowed
    • created_at date-time
    • updated_at date-time

Errors

  • 401 Unauthorized
  • 403 Forbidden - Event not visible to user, or an organization account
  • 404 Not Found - Event not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  https://ridewithgps.com/api/v1/events/123/participant.json
Response 200
{
  "participant": {
    "user": {
      "id": 123,
      "name": "Alex Rider",
      "email": "alex@example.com",
      "created_at": "2000-01-01T12:00:00Z",
      "updated_at": "2000-01-01T12:00:00Z"
    },
    "status": "participant",
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Sets the authenticated user's RSVP to the event

POST /api/v1/events/{event_id}/participant.json

RSVPs to the event as the authenticated user, with participant.status: participant (going, the default), interested, or declined (not going). Sending the same status again changes nothing.

Organization accounts can't RSVP, so an integration acting for a rider uses that rider's own token.

An event whose organization requires its own waiver answers participant with a 422 and a waiver_url until the rider has signed it.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • event_id integer path required
    Event ID
  • privacy_code string query
    Privacy code for the non public asset

Request body application/json

  • participant object
    1 field
    • status string
      One of: participant, interested, declined

Response 200

  • participant object
    4 fields
    • user object
      5 fields
      • id integer
      • name string
      • email string or null
        Null for accounts without a real email address.
      • created_at date-time
      • updated_at date-time
    • status string
      participant (going), interested, declined (not going), or disallowed (removed by an organizer, or expired). A disallowed rider can neither RSVP again nor withdraw.
      One of: participant, interested, declined, disallowed
    • created_at date-time
    • updated_at date-time

Errors

  • 400 Malformed body: participant is not an object, or status is not a string
  • 401 Unauthorized
  • 403 Forbidden - Event not visible to user, an organization account, an RSVP removed by the organizer or expired, or a planned ride that refuses the rider
  • 404 Not Found - Event not found
  • 422 Invalid status, or a waiver to sign first
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
  "participant": {
    "status": "participant"
  }
}' \
  https://ridewithgps.com/api/v1/events/123/participant.json
Response 200
{
  "participant": {
    "user": {
      "id": 123,
      "name": "Alex Rider",
      "email": "alex@example.com",
      "created_at": "2000-01-01T12:00:00Z",
      "updated_at": "2000-01-01T12:00:00Z"
    },
    "status": "participant",
    "created_at": "2000-01-01T12:00:00Z",
    "updated_at": "2000-01-01T12:00:00Z"
  }
}

Withdraws the authenticated user's RSVP to the event

DELETE /api/v1/events/{event_id}/participant.json

Removes the authenticated user from the event's participants, so they can RSVP again later. It works even if the user can no longer see the event, but not for an RSVP the organizer removed or that expired (disallowed, 403).

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • event_id integer path required
    Event ID

Response 204

RSVP withdrawn

Errors

  • 401 Unauthorized
  • 403 Forbidden - An RSVP removed by the organizer or expired, or an organization account
  • 404 Not Found - Event not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X DELETE \
  https://ridewithgps.com/api/v1/events/123/participant.json
Response 204
// RSVP withdrawn

Removes a participant from the event

DELETE /api/v1/events/{event_id}/participants/{user_id}.json

Removes the specified rider from the event's participants, so they can RSVP again later.

Only the event owner (including an organization account for its own events) can remove participants. Removes an RSVP in any status, including disallowed.

Headers

  • x-rwgps-api-key string required
    API key for identifying the client application
  • x-rwgps-auth-token string required
    Authentication token for the user

Parameters

  • event_id integer path required
    Event ID
  • user_id integer path required
    User ID of the participant to remove

Response 204

Participant removed

Errors

  • 401 Unauthorized
  • 403 Forbidden - Authenticated user cannot modify this event
  • 404 Not Found - Event or participant not found
Request
curl \
  -H "x-rwgps-api-key: $API_KEY" \
  -H "x-rwgps-auth-token: $AUTH_TOKEN" \
  -X DELETE \
  https://ridewithgps.com/api/v1/events/123/participants/123.json
Response 204
// Participant removed