REST API Basics

Introduction

Rejoiner's REST API provides clients with an additional method for sending data to our servers.

Quick Outline

Base URL

All API URLs start with the following base url. Your Site ID can be found on your Domain Settings page:

https://rj2.rejoiner.com/api/v1/YOUR-SITE-ID/

Authentication

Each Rejoiner user is assigned an API Key. This key is available on the Domain Settings page. This API Key should be sent as part of the HTTP Authorization header for ALL requests.

curl -H "Authorization: Rejoiner YOUR-API-KEY" "https://rj2.rejoiner.com/api/v1/YOUR-SITE-ID/ping/"

Example

curl -H "Authorization: Rejoiner 2000000ab0a00bc00000abcd0a00000a000ab00a" "https://rj2.rejoiner.com/api/v1/rjABCDE/ping/"

Request & Response Format

Rejoiner uses JSON for request and response payloads. Since JSON does not have a standard date format, Rejoiner uses ISO 8601 strings. 

Important Note: All timezones are in UTC

Response status codes have meanings as described in the table below. The response body will usually contain more details about a response as well.

RESPONSE STATUS DESCRIPTION
200 Request was successful
400 Required params were missing and/or the request was malformed
401 Failed authentication
404 The URL or resource does not exist
500 Server Error, please contact support@rejoiner.com for details

Pagination

Some endpoints utilize pagination. To retrieve a specific page number, simply add  ?page=PAGE_NUMBER to the query string of the request. The response for paginated endpoints is also slightly different.

KEY TYPE DESCRIPTION
count Integer The total number of objects retrievable by the endpoint
next String The URL that can be requested for the  next page
previous String The URL that can be requested for the  previous page
results Array An array of objects containing the results of the request

Verifying Authentication

Ping

This endpoint is useful for testing authentication. It does not perform any actions.

GET /ping/

Sample response:

{"status":"success"}

Still need help? Contact Us Contact Us