API Methods

An introduction to the methods supported in our public API. Enterprise API plans with custom integrations may have access to endpoints that are not defined in our public documentation.
DailyBot's API is versioned, the endpoint paths shown in this reference are omitting the base URL and the version. See the Authentication section to understand about headers and versioning.

As example, a proper URL to call the API is: https://api.dailybot.com/v1/me/

Get contextual info

GET /me/

Returns a JSON object with the organization name and UUID.

Query string params:

  • None

Response example

{
   "user": "Tony Stark",
   "organization_uuid": "b1b292b3-29b2-4235-8103-321ed749db8d",
   "organization_name": "Stark Industries"
}

Listing check-ins

GET /followups/

Returns a JSON list of objects, with all the check-ins that are visible for the user (API key owner).

Query string params:

  • None

Response example

[
{
  "id": "b1b292b3-29b2-4235-8103-321ed749db8d",
  "name": "Team standups",
  "active": true,
  "is_anonymous": true,
  "privacy": "managers_and_members",
  "frequency_type": "weekly",
  "frequency": 1,
  "frequency_on_days": [
    1,
    2,
    3,
    4,
    5
  ],
  "custom_trigger_time": null,
  "send_reports_one_by_one": true,
  "time_for_report": null,
  "start_on": "2021-01-27",
  "end_on": null
},
...
]

Listing check-in responses

GET /followups/{followup-uuid}/responses/

Returns a JSON object with the all responses for the given follow-up.

Query string params:

  1. date_start (optional): YYYY-MM-DD format to set a start date of the query, current date is the default value of this parameter
  2. date_end (optional): YYYY-MM-DD format to set an end date of the query, current date is the default value of this parameter
  3. limit (optional): sets max limit of responses per page
  4. offset (optional): sets the cursor position for the beginning of results

Response example

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
      {
          "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
          "user": {
              "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
              "full_name": "Anonymous Swan",
              "image": "https://some-url.com",
              "username": "anonymous",
              "occupation": "Team Member",
              "anonymous": true
          },
          "is_anonymous": true,
          "responses": [
              {
                  "question": "What did you complete yesterday?",
                  "question_short": "Yesterday's progress",
                  "question_type": "text",
                  "response": "response 1",
                  "is_blocker": false
              },
              {
                  "question": "What are you planning to work on today?",
                  "question_short": "Plans for today",
                  "question_type": "text",
                  "response": "response 2",
                  "is_blocker": false
              },
              {
                  "question": "Great. Do you have any blockers?",
                  "question_short": "Any blockers?",
                  "question_type": "text",
                  "response": "no",
                  "is_blocker": true
              }
          ],
          "response_completed": true,
          "has_issue": false,
          "created_at": "2020-12-22T23:34:33.235720Z",
          "updated_at": "2020-12-22T23:34:33.252585Z"
      },
...
  ]
}

Listing forms

GET /forms/

Returns a JSON list of objects with all the forms currently visible for the user (API key owner).

Query string params:

  • None

Response example

[
{
  "id": "b1b292b3-29b2-4235-8103-321ed749db8d",
  "name": "Vacation request",
  "active": true,
  "collect_responses_anonymously": true,
  "privacy": "everyone",
  "shortcut": "vacation",
  "start_on": "2021-01-27",
  "end_on": "2021-02-28",
  "is_archive": false
},
...
]

Managing Webhooks

POST /webhook-subscription/

Creates a web hook subscription.

Request example

{
   "hook_url": string(URL),
   "subscribed_objects": [string(FollowupUUID),...],
   "subscriptions": [string(EventSubscribed),...],
   "bearer": string(optional),
   "immediate_sample_event": boolean
}

The "EventSubscribed" is a string defining a type of event, see the type of events. The Bearer is optional, if specified the webhook will always include that value in the "X-BEARER" HTTP header.

If immediate_sample_event is set as true, DailyBot will send a sample payload to that URL immediately upon the creation of this outgoing webhook.

Response example

{
   "id": string(HookUUID),
   "url": string(HookURL)
}

DELETE /webhook-subscription/{HookUUID}/

Deletes a web hook subscription, responds with HTTP 200 status when successful.

‍Get organization info

GET /organization​/

Returns a JSON object with the organization info.

Query string params:

  • None

Response example

{
   "uuid": "4e322341-1262-42fa3-942a-0341d90883f6",
   "name": "Alexa OC",
   "image": "https://a.slack-edge.com/80588/img/avatars-teams/image.png",
   "platform": "slack",
   "chat_platform_data": {
       "is_active": true,
       "organization_external_id": "T11CFP91J1G"
   },
   "supported_domains": ["domain.co"],
   "has_email_password_enabled": false
}

GET /users/{uuid}/

Returns a JSON object with the user info.

Query string params:

  • Uuid: User’s id.

Request example

{
   "uuid":"5945bf0g2-66f5-4b29-bbd6-07421dfga87"
}

Response example

{
   "uuid":"5945bf0g2-66f5-4b29-bbd6-07421dfga87",
   "full_name": "John Wick",
   "image": "https://secure.gravatar.com/avatar/image.png",
   "username": "Wick10",
   "occupation": "Teammate",
   "birth_date":"05-12",
   "chat_platform_data": {
       "user_external_id":"Z32HVBCQ98D"
   },
   "organization": {
       "uuid": "4e322341-1262-42fa3-942a-0341d90883f6",
       "name": "Alexa OC"
   }
}

GET /users/

Returns a JSON object with info of every user in your org.

Query string params:

  • None

Response example

{
   "count":4,
   "next":null,
   "previous":null,
   "results": [
       {"uuid":"5945bf0g2-66f5-4b29-bbd6-07421dfga87",
       "full_name":"John Wick",
       "image":"https://secure.gavatar.com/avatar/ima.png",
       "username":"Wick10",
       "occupation":"Teammate",
       "birth_date":"05-12",
       "chat_platform_data": {
           "user_external_id":"Z32HVBCQ98D"
       },
       "organization": {
       "uuid":"4e322341-1262-42fa3-942a-0341d90883f6",
       "name":"Alexa OC"
       },...]
}

PATCH /users/{uuid}/

Update the info of a specific user on the organization.

Query string params:

  • Uuid (optional): User id.
  • Full_name: User's full name.
  • Image (optional): URL of the avatar image.
  • Username: username of the user.
  • occupation: occupation of the user in the organization.
  • birth_date: Birth date of the user with MM-DD format.

Request example

{
   "uuid":"5945bf0g2-66f5-4b29-bbd6-07421dfga87",
   "full_name":"John Wick",
   "image":"https://secure.gravatar.com/avatar/image.png",
   "username":"Wick10",
   "occupation":"Teammate",
   "birth_date":"05-12"
}

Response example

  • None

POST /send-message/

Send a message to a specific user or channel.

Query string params:

  • Message: Message to be sended.
  • Target_users: List of users id that will receive the message.
  • Target_channel: List of JSON object that include the following params:
  • id: Id of channel where the message will be sended.
  • is_channel_message: If the message will be sended in private the attribute is false, otherwise the attribute is true.
  • Image_url: url of the image to be sended
  • Buttons (optional): JSON object with include the next params:
  • Label: Text of the button
  • Label_after_click: Message to be shown when the user clicks the button.
  • value: Next instruction to be executed by the bot if the type is command.
  • button_type: Type of the button (command)

Request example 

{
   "exchange_token":"5945bf0g2-66f5-4b29-bbd6-07421dfga87",
   "message": "John Wick",
   "target_users": [user_uuid1, user_uuid2,...],
   "target_channel": [{
           id: "id_channel”,
           is_channel_message: “True|False”,
         }
,...],
   "image_url":"https://secure.gravatar.com/avatar/image.png",
   "buttons":[{
       "label": “Text button”,
       "label_after_click": “Text after click”,
       "value": “next command”,
       "button_type": "Command"
       }
   ]
}

If you use the target users field the target channel field is not necessary, and vice versa. The message field, image_url and buttons are optional.

Request example #2

{
       "message": “Welcome”,
       "target_channels":[
         {
           id: “IDLKSAN”,
           is_channel_message: false,
         }
       ],       "exchange_token":“108af73c0c11780c787745004189a8376f75bd6cad19b9c149e1d75428010e43”
}

Response example

  • None

POST ​/send-email​/

Send an email to a list of users.

Query string params:

  • users_uuids: List of users with whom the channel will be created.
  • Exchange_token: Parameter that arrives in the request.
  • Email_subject: Subject message.
  • Email_content: Message content.

Request example

{
   "users_uuids": [“5945bf0g2-66f5-4b29-bbd6-07421dfga87”],
   "exchange_token": “108af73c0c11780c787745004189a8376f75bd6cad19b9c149e1d75428010e43”,
   "email_subject": “Encabezado del mensaje”,
   "email_content": “Contenido del mensaje”
}

Response example

  • None

POST ​/open-conversation/​

Create a private channel in Slack between users.

Query string params:

  • users_uuids: List of users with whom the channel will be created.
  • Exchange_token: Parameter that arrives in the request.

Request example

{
   "users_uuids":
[“5945bf0g2-66f5-4b29-bbd6-07421dfga87”,...],
   "exchange_token":
“108af73c0c11780c787745004189a8376f75bd6cad19b9c149e1d75428010e43”,
}

Response example

JSON object, if you want to obtain the id of the created channel, is found in the channel attribute of the body.

{
   ...,
   “body”: {
“Channel”: “Channel Id”
   }
}


Need support?
Contact us