NAV
shell

Authentication

CoClick requires you to create API Keys from the developer console before being able to authenticate.

Please note that APi Keys are created company-wide but are only visible to administrator users.

Obtain a Bearer Token

In order to obtain a Bearer Token, you must provide the Secret ID and Secret Key provided when you created your APi Key in the console.

curl -X POST https://www.coclick.io/api/v1/authenticate \
     -H "Content-Type: application/json" \
     -d '{ "secret_id": "e89...b3a", "secret_key": "d49...f92" }'

The above command returns JSON structured like this:

{
    "token": "eyJhbGciOiJIUzI1NiJ9.eyJjb21wYW55IjoxLCJleHAiOjE2NTY1OTU0MTR9.C9vzT4jSR6QyZiVNlqs5P65Mvc_rdSn9ElIqpIL8eL8",
    "expires_at": "2022-06-30T15:23:34.752+02:00",
    "company": "MyCompany"
}

Authenticating

Once you have obtained your Bearer Token, you can use it for each of the other requests using the the following header:

Authorization: Bearer <token>

Meetings

Get all meetings

curl "https://www.coclick.io/api/v1/meetings" \
  -H "Authorization: Bearer <token>"

The above command returns JSON structured like this:

[
    {
        "id": "bcc18d36d0ba07c00639c48421411f33a7b35c0aa41958dd6964a33892a735b1",
        "user": "[email protected]",
        "status": "scheduled",
        "starts_at": "2021-10-27T17:10:36.000+02:00"
    },
    {
        "id": "c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694",
        "user": "[email protected]",
        "status": "scheduled",
        "starts_at": "2021-10-30T14:29:33.000+02:00"
    }
]

The meeting resource represent the an appointment between a presenter and a prospect, each item contains data related to the meeting. The request support filtering and pagination. Filtering is done via Url parameters, pagination using HTTP Headers (X-Page and X-Per).

HTTP Request

GET https://www.coclick.io/api/v1/meetings

Query Parameters

Parameter Default Type Description
q N/A Object A parameter url to filter, by example to filter on meeting of a specific user by email: https://www.coclick.io/api/v1/meetings?q%5Buser_email_cont%5D=hugh
X-Page 1 Integer Page number.
X-Per 20 Integer Page size.

Returned values

Parameter Type Description
id String Unique identifier of a meeting (exposed as short version in the console).
user String email adress of the meeting owner.
status Enum Meeting status. Possible values are : scheduled, in_progress, closed, cancelled.
starts_at Date Starting date of a meeting..

Get a specific Meeting

curl "https://www.coclick.io/api/v1/meetings/<token>" \
  -H "Authorization: Bearer <token>"

The above command returns JSON structured like this:

{
    "token": "c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694",
    "status": "scheduled",
    "starts_at": "2021-10-30T14:29:33.000+02:00",
    "duration": null,
    "cobrowsing_url": "http://www.coclick.io",
    "cobrowsing_cookies_data": [],
    "user": "[email protected]",
    "custom_data": {
        "user_id": 17,
        "username": "Phil"
    },
    "presenter_waiting_room_iframe_url": null,
    "prospect_waiting_room_iframe_url": null,
    "prospect_room_url": "http://www.coclick.io/essai/room/c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694",
    "presenter_room_url": "http://www.coclick.io/essai/presenter/c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694"
}

This endpoint retrieves a specific meeting.

HTTP Request

GET https://www.coclick.io/api/v1/meetings/<id>

URL Parameters

Parameter Description
id The id of the meeting to retrieve

Returned values

Parameter Type Description
id String Unique identifier of a meeting (exposed as short version in the console).
user String email adress of the meeting owner.
status Enum Meeting status. Possible values are : scheduled, in_progress, closed, cancelled.
starts_at Date Starting date of a meeting..
cobrowsing_url String Destination URL of the website that will be shared in the cobrowsing session.
cobrowsing_cookies_data Array Cookies used by the cobrowsing session.
This is usefull if you want to have your cobrowsing session to already have a client context directly in it. It has to follow this JSON Schema:
{
  type: "array",
  items: {
    type: "object",
    properties: {
      domain: {
        type: "string"
      },
      name: {
        type: "string"
      },
      value: {
        type: "string"
      }
    },
    additionalProperties: false,
    required: [
      "domain",
      "name","
      value"
    ]
  }
}
custom_data Object Free data that you can use to associate Meetings with your own application.
presenter_waiting_room_iframe_url String URL of the Iframe for the presenter waiting room. example: https://www.youtube.com/embed/dQw4w9WgXcQ
prospect_waiting_room_iframe_url String URL of the Iframe for the prospect waiting room. example: https://www.youtube.com/embed/dQw4w9WgXcQ
prospect_room_url String URL of the prospect meeting room. It allow your prospect to join the meeting. This URL is public. Note: The prospect cannot join the room until the presenter started the meeting.
presenter_room_url String URL of the the presenter meeting room. The presenter needs to be logged in to access this URL.

Create a Meeting

curl "https://www.coclick.io/api/v1/meetings/<token>" \
  -H "Authorization: Bearer <token>" \
  -X POST \
  -H "Content-Type: application/json"

The content of the request JSON body is structured like this:

{

    "starts_at": "2021-10-30T14:29:33.000+02:00",
    "cobrowsing_url": "http://www.coclick.io",
    "cobrowsing_cookies_data": [],
    "user": "[email protected]",
    "custom_data": {
        "user_id": 17,
        "username": "Phil"
    },
    "presenter_waiting_room_iframe_url": null,
    "prospect_waiting_room_iframe_url": null,
    "prospect_room_url": "http://www.coclick.io/essai/room/c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694",
    "presenter_room_url": "http://www.coclick.io/essai/presenter/c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694"
}

The above command returns JSON structured like this:

{
    "token": "c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694",
    "status": "scheduled",
    "starts_at": "2021-10-30T14:29:33.000+02:00",
    "duration": null,
    "cobrowsing_url": "http://www.coclick.io",
    "cobrowsing_cookies_data": [],
    "user": "[email protected]",
    "custom_data": {
        "user_id": 17,
        "username": "Phil"
    },
    "presenter_waiting_room_iframe_url": null,
    "prospect_waiting_room_iframe_url": null,
    "prospect_room_url": "http://www.coclick.io/essai/room/c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694",
    "presenter_room_url": "http://www.coclick.io/essai/presenter/c3d9f69827eef8a25eedc920f1950a0ab9b3f6c9a0bfdca1111dff277a2d7694"
}

In case of error the above command returns JSON structured like this:

{
    "token": null,
    "status": "scheduled",
    "starts_at": null,
    "duration": null,
    "cobrowsing_url": null,
    "cobrowsing_cookies_data": [],
    "user": null,
    "custom_data": null,
    "presenter_waiting_room_iframe_url": null,
    "prospect_waiting_room_iframe_url": null,
    "prospect_room_url": null,
    "presenter_room_url": null,
    "errors": {
        "user": [
            "User must exist"
        ],
        "starts_at": [
            "please specify a start date"
        ],
        "cobrowsing_url": [
            "Please specify a cobrowsing URL",
            "Cobrowsing URL is not valid"
        ]
    }
}


This endpoint creates a specific meeting.

HTTP Request

POST https://www.coclick.io/api/v1/meetings

Parameters

Parameter Type Optionnal Description
user String false email adress of the meeting owner.
starts_at Date false Starting date of a meeting..
cobrowsing_url String false Destination URL of the website that will be shared in the cobrowsing session.
cobrowsing_cookies_data Array true Cookies used by the cobrowsing session.
This is usefull if you want to have your cobrowsing session to already have a client context directly in it. It has to follow this JSON Schema:
{
  type: "array",
  items: {
    type: "object",
    properties: {
      domain: {
        type: "string"
      },
      name: {
        type: "string"
      },
      value: {
        type: "string"
      }
    },
    additionalProperties: false,
    required: [
      "domain",
      "name","
      value"
    ]
  }
}
custom_data Object true Free data that you can use to associate Meetings with your own application.
presenter_waiting_room_iframe_url String true URL of the Iframe for the presenter waiting room. example: https://www.youtube.com/embed/dQw4w9WgXcQ
prospect_waiting_room_iframe_url String true URL of the Iframe for the prospect waiting room. example: https://www.youtube.com/embed/dQw4w9WgXcQ

Returned values

Parameter Type Description
id String Unique identifier of a meeting (exposed as short version in the console).
user String email adress of the meeting owner.
status Enum Meeting status. Possible values are : scheduled, in_progress, closed, cancelled.
starts_at Date Starting date of a meeting..
cobrowsing_url String Destination URL of the website that will be shared in the cobrowsing session.
cobrowsing_cookies_data Array Cookies used by the cobrowsing session.
This is usefull if you want to have your cobrowsing session to already have a client context directly in it. It has to follow this JSON Schema:
{
  type: "array",
  items: {
    type: "object",
    properties: {
      domain: {
        type: "string"
      },
      name: {
        type: "string"
      },
      value: {
        type: "string"
      }
    },
    additionalProperties: false,
    required: [
      "domain",
      "name","
      value"
    ]
  }
}
custom_data Object Free data that you can use to associate Meetings with your own application.
presenter_waiting_room_iframe_url String URL of the Iframe for the presenter waiting room. example: https://www.youtube.com/embed/dQw4w9WgXcQ
prospect_waiting_room_iframe_url String URL of the Iframe for the prospect waiting room. example: https://www.youtube.com/embed/dQw4w9WgXcQ
prospect_room_url String URL of the prospect meeting room. It allow your prospect to join the meeting. This URL is public. Note: The prospect cannot join the room until the presenter started the meeting.
presenter_room_url String URL of the the presenter meeting room. The presenter needs to be logged in to access this URL.

Errors

The Coclick API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
404 Not Found -- The specified coclick could not be found.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.