API Reference

Authorizing your request

Authorization: Bearer headers are required where noted in the example requests. Most endpoints require authorization with the exception of the public invite redirect link.

Tokens do not expire and are string literals.

To get started, request a new access token from Omneo Support support@omneo.io.

Retrieving invites

To retrieve a listing invites, use this endpoint:

Request:

GET {api_url}/v1/me/invites

Response:

{
    "data": [
        {
            "id": "8c88fd05-ffe0-4b71-af8e-75dcbe21d37d",
            "source_omneo_id": "XXX",
            "recipient_email": "alex@example.org",
            "status": "PENDING",
            "send_count": 2,
            "invited_at": "2018-12-19 17:11:24",
            "expires_at": "2019-01-18 23:59:59",
            "accepted_at": null,
            "rejected_at": null,
            "revoked_at": null,
            "definition": "gold-definition"
        },
        {
            "id": "8c8902cc-0a3f-446e-9370-26312646844c",
            "source_omneo_id": "XXX",
            "recipient_email": "drew@example.org",
            "status": "REVOKED",
            "send_count": 1,
            "invited_at": "2018-12-19 17:27:33",
            "expires_at": "2019-01-18 23:59:59",
            "accepted_at": null,
            "rejected_at": null,
            "revoked_at": null,
            "definition": "gold-definition"
        },
        {
            "id": "8c89033c-82bd-4f1c-a6e6-93c41b831ac3",
            "source_omneo_id": "XXX",
            "recipient_email": "eric@example.org",
            "status": "REVOKED",
            "send_count": 1,
            "invited_at": "2018-12-19 17:28:47",
            "expires_at": "2019-01-18 23:59:59",
            "accepted_at": null,
            "rejected_at": null,
            "revoked_at": null,
            "definition": "gold-definition"
        }
    ],
    "meta": [
        {
            "remaining": 9,
            "override_count": null,
            "eligible_definition": {
                "id": 1,
                "handle": "gold-definition",
                "in_range": true,
                "starts_at": "2019-01-08 08:00:00",
                "ends_at": "2019-01-09 12:00:00",
                "max_invites": 10
            },
            "profile_statuses": [
                "gold"
            ]
        }
    ]
}

Creating an invite

To create a new invite, use the following endpoint:

Request:

POST {api_url}/v1/me/invites

{
	"recipient_first_name": "Alex",
	"recipient_email": "alex@example.org",
	"public_message": "Hey Alex, thought you'd like this!"
}

Response:

{
	"data": {
		"id": "8c88fd05-ffe0-4b71-af8e-75dcbe21d37d",
		"source_omneo_id": "XXX",
		"recipient_email": "alex@example.org",
		"status": "PENDING",
		"send_count": 1,
		"invited_at": "2018-12-19 17:11:24",
		"expires_at": "2019-01-18 23:59:59",
		"accepted_at": null,
		"rejected_at": null,
		"revoked_at": null,
		"definition": "gold-definition"
	}
}

Revoking an invite

To revoke an invite, use the following endpoint:

Request:

POST {api_url}/v1/me/invites/{inviteId}/revoke

Response:

{
	"data": {
		"id": "8c88fd05-ffe0-4b71-af8e-75dcbe21d37d",
		"source_omneo_id": "XXX",
		"recipient_email": "alex@example.org",
		"status": "REVOKED",
		"send_count": 1,
		"invited_at": "2018-12-19 17:11:24",
		"expires_at": "2019-01-18 23:59:59",
		"accepted_at": null,
		"rejected_at": null,
		"revoked_at": "2019-01-18 23:59:59",
		"definition": "gold-definition"
	}
}

Resending an invite

To resend an invite, use the following endpoint:

Request:

POST {api_url}/v1/me/invites/{inviteId}/resend`

Response: 202

{
	"data": {
		"message": "Invite scheduled for re-send."
	}
}

Note: The invites send_count must be less than the configurations max_send_count for a resend.