GleaninX API Reference (1.0)

Download OpenAPI specification:Download

Getting started with the Gleanin API

This API follows the JSONAPI specification. See more here https://jsonapi.org/.

Typical API use cases:

  • Push or pull speaker data to save data entry in multiple places
  • Get speaker campaign links for a mail merge
  • Get campaign links to present to attendees and speakers in another platform.
  • Get results for internal reporting or reward campaigns

Events

You can use Gleanin to run campaigns for all of your events. Each event can have many campaigns, speakers, sessions.

When creating speakers or sessions you have to inform the ID of the event they are going to belong to.

The number of active events you can have depends on your subscription level. We have specific endpoints to archive or activate events, leaving space so you can create more events when necessary.

The Events API allows you to create, update and archive events.

You can also include associated objects to response body of your request. You can include campaigns, sessions, speakers, and images.

List of Events

Example

  curl -X GET \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  https://app.gleanin.com/api/clients/v1/events
Authorizations:
bearerAuth
query Parameters
include
string
Example: include=speakers

Includes associated objects into the response. See the "included" element on the JSON body.

Options: campaigns, sessions, speakers, images

See here how you can fetch included associations.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "included": [
    ]
}

Create a new Event

Example:

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"events","attributes":{"title":"My Event", "account_id":"6e56b49c-a887-43ce-b119-cd751544148a"}}}' \
https://app.gleanin.com/api/clients/v1/events

title and account_id are mandatory. You can see your account_id on the URL when clicking on My Events at https://admin.gleanin.com.

Authorizations:
bearerAuth
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Show an Event

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/1
Authorizations:
bearerAuth
path Parameters
id
required
integer

The ID of the Event

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update an Event

Example: Change title

curl -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"events","attributes":{"title":"My new Event"}}}' \
https://app.gleanin.com/api/clients/v1/events/1
Authorizations:
bearerAuth
path Parameters
id
required
integer

The ID of the Event

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "type": "events",
  • "id": "1",
  • "attributes": {
    },
  • "relationships": {
    }
}

Archive an Event

It changes the state of the event to archive.

All campaigns will be suspended and will no longer receive click and conversion reporting. All links that your speakers shared will continue to work and point to your website.

Example

curl -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/1/archive
Authorizations:
bearerAuth
path Parameters
id
required
integer

The ID of the Event

Responses

Response samples

Content type
application/json
{
  • "type": "events",
  • "id": "1",
  • "attributes": {
    },
  • "relationships": {
    }
}

Activate an Event

It changes the state of the event to active.

The number active events you can have depends on your subscription level.

Example

curl -X PATCH \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/1/activate
Authorizations:
bearerAuth
path Parameters
id
required
integer

The ID of the Event

Responses

Response samples

Content type
application/json
{
  • "type": "events",
  • "id": "1",
  • "attributes": {
    },
  • "relationships": {
    }
}

Campaigns

A campaign represents a specific way of announcing your event. You can create as many campaigns as you want for each event, having different colors, images, and texts.

There are two types of campaigns: speakers and attendees.

In a speakers campaign, the speakers advocate the event. When you create multiple campaigns, each speaker will have a different link to share. Gleanin generates different images for each speaker as options for sharing, according to the styles of your campaign. Consult Sessions and Speakers documentation to see how to create them using the API and how to get links to share for your campaigns.

An attendee campaign is a simplified version where your audience will advocate the event. You have a single link to share and you can use our embed tool to include the share feature in your event website.

A campaign can also have multiple themes. You can create different combinations of texts, images, and colors and let the speakers or attendees pick up the one they like.

Currently, you can't create campaigns and themes using the API, only consult campaigns.

Examples of images of the campaigns you can create using the product:

List of Campaigns

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/campaigns
Authorizations:
bearerAuth
query Parameters
include
string
Example: include=themes

You can include associated objects into the response. The options are "themes" and "event".

See here how you can fetch included associations.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "included": [
    ]
}

Sessions

A session is a panel, talk, or meeting at your event.

When you create a campaign and you select type "speakers", the campaign will have a different share image for each session.

A session can have multiple speakers, each speaker can share his own image.

A session must belong to an event, all API operations have to include the Event ID on the URL of the request.

List of Sessions

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/sessions?include=speakers
Authorizations:
bearerAuth
query Parameters
include
string
Example: include=speakers

Includes speakers data on the response. See here how you can fetch included associations.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "included": [
    ]
}

Create a new session

Example:

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"sessions","attributes":{"title":"Widget API","schedule":"7pm, 5 June 2021"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/sessions
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "included": [
    ]
}

Create or Update a Session

If the informed external_idx already exists in our DB, the record will be updated. Otherwise, a new record will be created.

Example

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"sessions","attributes":{"external_idx":"123abc","title":"Widget API","schedule":"7pm, 5 June 2021"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/sessions/upsert
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "included": [
    ]
}

Update a Session

This endpoint is used to update a Session. Only the informed fields will be updated. The speaker_ids list represents the speakers of the session. Informing a new list of speaker_ids will replace the current list.

Example:

curl -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"sessions","attributes":{"title":"The new Widget API"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/sessions/913
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Session

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "included": [
    ]
}

Show a Session

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/sessions/913
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Session

query Parameters
include
string
Example: include=speakers

Includes speakers data on the response. See here how you can fetch included associations.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "included": [
    ]
}

Delete a Session

Example

curl -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/sessions/913
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Session

Responses

Response samples

Content type
application/json
{
  • "errors": {
    }
}

Refresh all - Assign Speakers

Create all speaker <> session relationships in a single request using your IDs.

Takes an array of objects, each of which represents a speaker to session relationship. If a relationship with a given session_idx is included in the payload, it is assumed that ALL speaker relationships for that session are included in the payload; all existing relationships for that session will be replaced.

When implementing an integration we recommend first calling upsert for each speaker and each session, ignoring the relationships. Then use this refresh_all endpoint to create all relationships.

{
  "speaker_sessions": [
    {
      "session_idx": "session-123",
      "speaker_idx": "speaker-456"
    },
    {
      "session_idx": "session-123",
      "speaker_idx": "speaker-897"
    },
    {
      "session_idx": "another-session-456",
      "speaker_idx": "speaker-897"
    }
  ]
}

Example

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"speaker_sessions":[{"session_idx":"session-123","speaker_idx":"speaker-456"},{"session_idx":"session-123","speaker_idx":"speaker-897"}]}' \
https://app.gleanin.com/api/clients/v1/events/26/session_speakers/refresh_all

Purge absent

Remove all relationships not in the payload.

We're not always aware that sessions and speakers have been deleted from your platform. To help accommodate this, passing the purge_absent flag will remove all speaker <> session relationships before creating the ones in the payload. Purging all relationships means speakers won't get links promoting deleted sessions. The default behaviour is to leave sessions not in the payload unaltered.

{
  "speaker_sessions": [
    ...
  ],
  "purge_absent": true
}
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

Request Body schema: application/json
required
Array of objects
purge_absent
boolean
Default: false

Unassign speakers from sessions that aren't in the payload. Default is false.

Responses

Request samples

Content type
application/json
{
  • "speaker_sessions": [
    ],
  • "purge_absent": true
}

Speakers

A speaker or panelist is a member of a session.

Each speaker will have its own link to share one or many campaigns. The image to share includes the information of the speaker you provide through the web app or through the API.

The attributes are name, job title, company, headshot, and e-mail. Only name is mandatory. Gleanin doesn't send any e-mail to speakers, this attribute will be useful only for your own purposes (e.g. mail merge).

A speaker must belong to an event, all API operations have to include the Event ID on the URL of the request. You can see the ID of your event at https://admin.gleanin.com.

You can associate a speaker to one or more sessions. A session can have up to five speakers.

List of Speakers

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/speakers
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

query Parameters
include
string
Example: include=sessions

Includes sessions data on the response. See here how you can fetch included associations.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "included": [
    ]
}

Create a new Speaker

Example

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"speakers","attributes":{"name":"John Smith","company_name":"Smith SA","job_title": "VP"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/speakers
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Create or Update a Speaker

If the informed external_idx already exists in our DB, the record will be updated. Otherwise, a new record will be created.

Example

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"speakers","attributes":{"external_idx":"123abc","name":"John Smith","company_name":"Smith SA","job_title": "VP"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/speakers/upsert
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update a Speaker

This endpoint is used to update a Speaker. Only the informed fields will be updated. The session_ids list represents the sessions where the speaker is attending. Informing a new list of session_ids will replace the current list.

Example

curl -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"speakers","attributes":{"name":"Ajay API"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/speakers/2177
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Speaker

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "included": [
    ]
}

Show a Speaker

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/speakers/913
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Speaker

query Parameters
include
string
Example: include=sessions

Includes sessions data on the response. See here how you can fetch included associations.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "included": [
    ]
}

Delete a speaker

Example

curl -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/speakers/913

If you delete a speaker his shared images will not be destroyed, so you can keep consulting the results of your event at the Shared Images API.

Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Speaker

Responses

Response samples

Content type
application/json
{
  • "errors": {
    }
}

Upload a Speaker Headshot

Upload a image file using multipart form-data.

This is an alternative for the image_url attribute you can set when creating or updating a speaker. In this endpoint you can upload a binary file.

Example

curl -X PUT \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-F "image=@/home/user1/Desktop/headshot.jpg" \
https://app.gleanin.com/api/clients/v1/events/26/speakers/2177/headshot
Authorizations:
bearerAuth
path Parameters
id
required
integer

The ID of the Speaker

Request Body schema: multipart/form-data
object

Responses

Response samples

Content type
application/json
{
  • "type": "speakers",
  • "id": "1",
  • "attributes": {
    }
}

Session Speakers

Assigns speakers to sessions.

You can assign speakers to sessions using the API.

Refresh all - Assign Speakers

Create all speaker <> session relationships in a single request using your IDs.

Takes an array of objects, each of which represents a speaker to session relationship. If a relationship with a given session_idx is included in the payload, it is assumed that ALL speaker relationships for that session are included in the payload; all existing relationships for that session will be replaced.

When implementing an integration we recommend first calling upsert for each speaker and each session, ignoring the relationships. Then use this refresh_all endpoint to create all relationships.

{
  "speaker_sessions": [
    {
      "session_idx": "session-123",
      "speaker_idx": "speaker-456"
    },
    {
      "session_idx": "session-123",
      "speaker_idx": "speaker-897"
    },
    {
      "session_idx": "another-session-456",
      "speaker_idx": "speaker-897"
    }
  ]
}

Example

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"speaker_sessions":[{"session_idx":"session-123","speaker_idx":"speaker-456"},{"session_idx":"session-123","speaker_idx":"speaker-897"}]}' \
https://app.gleanin.com/api/clients/v1/events/26/session_speakers/refresh_all

Purge absent

Remove all relationships not in the payload.

We're not always aware that sessions and speakers have been deleted from your platform. To help accommodate this, passing the purge_absent flag will remove all speaker <> session relationships before creating the ones in the payload. Purging all relationships means speakers won't get links promoting deleted sessions. The default behaviour is to leave sessions not in the payload unaltered.

{
  "speaker_sessions": [
    ...
  ],
  "purge_absent": true
}
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

Request Body schema: application/json
required
Array of objects
purge_absent
boolean
Default: false

Unassign speakers from sessions that aren't in the payload. Default is false.

Responses

Request samples

Content type
application/json
{
  • "speaker_sessions": [
    ],
  • "purge_absent": true
}

List of links of a campaign

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/campaigns/4/links

The response will be different according to the type of the campaign.

For an attendees campaign, the links object contains the URLs: splash_screen and image_preview.

For a speakers campaign, the links object contains a list of links, one for each speaker of your event.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Shared Images

An API to consult the results of your event. This endpoint returns the list of shared images informing how many shares, clicks and conversions each one got.

If you delete a speaker his shared images will not be destroyed, so you can keep consulting the results of your event. However, the fields refering the speaker will return null values.

List of shared images of an event.

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/shared_images

This endpoint paginates the result returning 100 records per page.

Authorizations:
bearerAuth
query Parameters
page
integer
Example: page=2

The number of the page of the results. It returns 100 per page.

Responses

Response samples

Content type
application/json
{}

Exhibitors

List of Exhibitors

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/exhibitors
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

query Parameters
include
string
Example: include=event

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new Exhibitor

Example

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"exhibitors","attributes":{"name":"John Smith","stand_code":"123"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/exhibitors
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Create or Update Exhibitor

If the informed external_idx already exists in our DB, the record will be updated. Otherwise, a new record will be created.

Example

curl -X POST \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"exhibitors","attributes":{"external_idx":"123abc","name":"John Smith","stand_code": "123"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/exhibitors/upsert
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{
  • "data": {
    }
}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Update Exhibitor

This endpoint is used to update Exhibitor. Only the informed fields will be updated.

Example

curl -X PUT \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-d '{"data":{"type":"exhibitors","attributes":{"name":"Ajay API"}}}' \
https://app.gleanin.com/api/clients/v1/events/26/exhibitors/2177
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Exhibitor

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
{
  • "data": {
    }
}

Show a Exhibitor

Example

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/exhibitors/913
Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Exhibitor

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Delete Exhibitor

Example

curl -X DELETE \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
https://app.gleanin.com/api/clients/v1/events/26/exhibitors/913

If you delete exhibitor his shared images will not be destroyed, so you can keep consulting the results of your event at the Shared Images API.

Authorizations:
bearerAuth
path Parameters
event_id
required
integer

The ID of the Event

id
required
integer

The ID of the Exhibitor

Responses

Response samples

Content type
application/json
{
  • "errors": {
    }
}

Upload a Logo

Upload a image file using multipart form-data.

This is an alternative for the logo_url attribute you can set when creating or updating exhibitor. In this endpoint you can upload a binary file.

Example

curl -X PUT \
-H 'Content-Type: multipart/form-data' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-F "image=@/home/user1/Desktop/headshot.jpg" \
https://app.gleanin.com/api/clients/v1/events/26/exhibitors/2177/logo
Authorizations:
bearerAuth
path Parameters
id
required
integer

The ID of the Exhibitor

Request Body schema: multipart/form-data
object

Responses

Response samples

Content type
application/json
{
  • "type": "exhibitors",
  • "id": "1",
  • "attributes": {
    }
}