Freeday API (v1.0)
Download OpenAPI specification:Download
Authenticates user with username and password
Authorizations:
Request Body schema: application/json
| username | string User name |
| password | string User password |
Responses
Request samples
- Payload
{- "username": "lucie.bronze",
- "password": "password123"
}Response samples
- 200
- 400
- 401
- 500
{- "userId": "5c37cf93b24a96f47a29bec",
- "limit": "2018-09-28T15:35:49.828Z",
- "token": "Ep2uHmVctSupD5z2yCXa"
}Creates the first user using the welcome secret code
Welcome secret code must be provided in the Authorization header
Authorizations:
Request Body schema: application/json
| username required | string >= 6 characters User name |
| language | string <country-code> User language |
| theme | string Enum: "light" "dark" User theme |
| password required | string >= 6 characters Default: "en" User password |
Responses
Request samples
- Payload
{- "username": "lucie.bronze",
- "language": "en",
- "theme": "dark",
- "password": "password123"
}Response samples
- 200
- 400
- 401
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "username": "lucie.bronze",
- "language": "en",
- "theme": "dark"
}Deletes self user and all tokens then generates initialization/welcome data and return secret code
- This endpoint is available only in test mode
- It can be used to test the welcome course
- Self user must be the only one in database
Authorizations:
Responses
Response samples
- 200
- 401
- 403
- 500
{- "secret": "ajdVTPRWQwY3S0RUNX3SDtWcRwWbZUMGbm9NQWlF0Jg"
}Creates a new user
Authorizations:
Request Body schema: application/json
| username required | string >= 6 characters User name |
| language | string <country-code> User language |
| theme | string Enum: "light" "dark" User theme |
| password required | string >= 6 characters Default: "en" User password |
Responses
Request samples
- Payload
{- "username": "lucie.bronze",
- "language": "en",
- "theme": "dark",
- "password": "password123"
}Response samples
- 200
- 400
- 401
- 409
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "username": "lucie.bronze",
- "language": "en",
- "theme": "dark"
}Edits a new user
Authorizations:
path Parameters
| userId required | string <uuid> |
Request Body schema: application/json
| username | string >= 6 characters User name |
| language | string <country-code> User language |
| theme | string Enum: "light" "dark" User theme |
| password | string >= 6 characters Default: "en" User password |
Responses
Request samples
- Payload
{- "username": "lucie.bronze",
- "language": "en",
- "theme": "dark",
- "password": "password123"
}Response samples
- 200
- 400
- 401
- 404
- 409
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "username": "lucie.bronze",
- "language": "en",
- "theme": "dark"
}Response samples
- 200
- 400
- 401
- 500
Registers Slack app with OAuth data returned by Slack
Authorizations:
Request Body schema: application/json
| code required | string Slack OAuth verification code |
| state required | string Slack OAuth state needed to authenticate OAuth data |
Responses
Request samples
- Payload
{- "code": "516549849849.65498498469498498",
- "state": "91d516f51b519a546d5654a6f4b654"
}Response samples
- 200
- 400
- 401
- 500
{ }Gets the list Slack users
- Calling this method updates the Slack user list in database by synchronizing with Slack API (max. one time per minute)
Authorizations:
query Parameters
| deleted | boolean |
number or string | |
| limit | number |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "slackUsers": [
- {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}
], - "total": 1,
- "current": 1
}Creates Slack user in database or updates if exists
- This endpoint is available only in test mode
Authorizations:
Request Body schema: application/json
| slackId required | string <slack-id> Slack user ID |
| name required | string Slack user name |
| avatar required | string <uri> Slack user avatar URL |
| locale | string <LCID> Slack user locale taken from their client preferences |
| forcedLocale | string <LCID> Slack user locale that they chose to use with the Freeday bot |
| deleted | boolean If user has been deleted on Slack |
Responses
Request samples
- Payload
{- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}Response samples
- 200
- 400
- 401
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}Gets Slack user information
Authorizations:
path Parameters
| slackUserId required | string <slack-id> |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}Gets the list Slack channels
- Calling this method updates the Slack channel list in database by synchronizing with Slack API (max. one time per minute)
Authorizations:
query Parameters
| memberOnly | boolean |
number or string | |
| limit | number |
Responses
Response samples
- 200
- 401
- 500
{- "slackChannels": [
- {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "C7J5HLC85",
- "name": "random-channel",
- "isChannel": false,
- "isGroup": false,
- "isIm": false,
- "isMpIm": false,
- "isMember": false,
- "isPrivate": false,
- "archived": false
}
], - "total": 1,
- "current": 1
}Creates Slack channel in database or updates if exists
- This endpoint is available only in test mode
Authorizations:
Request Body schema: application/json
| slackId required | string <slack-id> Slack channel ID |
| name required | string Slack channel name |
| isChannel | boolean If channel is a public channel |
| isGroup | boolean If channel is a private channel |
| isIm | boolean If channel is a direct message between two members |
| isMpIm | boolean If channel is a direct message between more than two members |
| isMember | boolean If bot is a member of the conversation |
| isPrivate | boolean If channel is privileged between two or more members |
| archived | boolean If channel is archived |
Responses
Request samples
- Payload
{- "slackId": "C7J5HLC85",
- "name": "random-channel",
- "isChannel": false,
- "isGroup": false,
- "isIm": false,
- "isMpIm": false,
- "isMember": false,
- "isPrivate": false,
- "archived": false
}Response samples
- 200
- 400
- 401
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "C7J5HLC85",
- "name": "random-channel",
- "isChannel": false,
- "isGroup": false,
- "isIm": false,
- "isMpIm": false,
- "isMember": false,
- "isPrivate": false,
- "archived": false
}Gets Slack channel information
Authorizations:
path Parameters
| slackChannelId required | string <slack-id> |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "C7J5HLC85",
- "name": "random-channel",
- "isChannel": false,
- "isGroup": false,
- "isIm": false,
- "isMpIm": false,
- "isMember": false,
- "isPrivate": false,
- "archived": false
}Gets the list of days-off
Authorizations:
query Parameters
| start | string <date> |
| end | string <date> |
| type | Array of strings <uuid> e.g. |
| slackUser | Array of strings <slack-id> e.g. |
| status | string Enum: "confirmed" "canceled" "pending" |
| order | string Enum: "asc" "desc" |
number or string | |
| limit | number |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "daysoff": [
- {
- "id": "5c37cf93b24a96f47a29bec",
- "start": "2018-12-23T23:00:00.000Z",
- "end": "2018-12-25T23:00:00.000Z",
- "startPeriod": "am",
- "endPeriod": "pm",
- "count": 2,
- "days": [
- "2018-12-23T23:00:00.000Z",
- "2018-12-24T23:00:00.000Z",
- "2018-12-25T23:00:00.000Z"
], - "type": {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}, - "slackUser": {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}, - "comment": "Some comment",
- "confirmed": true,
- "canceled": false
}
], - "total": 1,
- "current": 1
}Creates a new dayoff
- If conflicts with other daysoff are detected an error is thrown
- This endpoint can be used to create a dayoff for one or multiple users
- Send a Slack user ID as a string in
slackUserIdto create a dayoff for one user - Send an array of Slack user ID in
slackUserIdto create a dayoff for multiple users
- Send a Slack user ID as a string in
Authorizations:
Request Body schema: application/json
| start required | string <date> Start date |
| end | string <date> Default: "Same as start date" End date |
| startPeriod | string Default: "am" Enum: "am" "pm" Start date period |
| endPeriod | string Default: "pm" Enum: "am" "pm" End date period |
| type required | string <uuid> Dayoff type ID |
| comment | string Comment |
| force | boolean Default: false If true skips conflict detection |
required | string or Array of strings Slack user ID or list of Slack user IDs |
Responses
Request samples
- Payload
{- "start": "2018-12-23",
- "end": "2018-12-25",
- "startPeriod": "am",
- "endPeriod": "pm",
- "type": "5edb896d286e1fba4f7047a1",
- "comment": "Some comment",
- "force": false,
- "slackUserId": "UGJ7AVX32"
}Response samples
- 200
- 400
- 401
- 409
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "start": "2018-12-23T23:00:00.000Z",
- "end": "2018-12-25T23:00:00.000Z",
- "startPeriod": "am",
- "endPeriod": "pm",
- "count": 2,
- "days": [
- "2018-12-23T23:00:00.000Z",
- "2018-12-24T23:00:00.000Z",
- "2018-12-25T23:00:00.000Z"
], - "type": {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}, - "slackUser": {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}, - "comment": "Some comment",
- "confirmed": true,
- "canceled": false
}Response samples
- 200
- 400
- 401
- 404
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "start": "2018-12-23T23:00:00.000Z",
- "end": "2018-12-25T23:00:00.000Z",
- "startPeriod": "am",
- "endPeriod": "pm",
- "count": 2,
- "days": [
- "2018-12-23T23:00:00.000Z",
- "2018-12-24T23:00:00.000Z",
- "2018-12-25T23:00:00.000Z"
], - "type": {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}, - "slackUser": {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}, - "comment": "Some comment",
- "confirmed": true,
- "canceled": false
}Edits a dayoff
- Dayoff status is reset back to 'pending' any time dayoff is edited
- If conflicts with other daysoff are detected an error is thrown
Authorizations:
path Parameters
| dayoffId required | string <uuid> |
Request Body schema: application/json
| start | string <date> Start date |
| end | string <date> Default: "Same as start date" End date |
| startPeriod | string Default: "am" Enum: "am" "pm" Start date period |
| endPeriod | string Default: "pm" Enum: "am" "pm" End date period |
| type | string <uuid> Dayoff type ID |
| comment | string Comment |
| force | boolean Default: false If true skips conflict detection |
Responses
Request samples
- Payload
{- "start": "2018-12-23",
- "end": "2018-12-25",
- "startPeriod": "am",
- "endPeriod": "pm",
- "type": "5edb896d286e1fba4f7047a1",
- "comment": "Some comment",
- "force": false
}Response samples
- 200
- 400
- 401
- 404
- 409
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "start": "2018-12-23T23:00:00.000Z",
- "end": "2018-12-25T23:00:00.000Z",
- "startPeriod": "am",
- "endPeriod": "pm",
- "count": 2,
- "days": [
- "2018-12-23T23:00:00.000Z",
- "2018-12-24T23:00:00.000Z",
- "2018-12-25T23:00:00.000Z"
], - "type": {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}, - "slackUser": {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}, - "comment": "Some comment",
- "confirmed": true,
- "canceled": false
}Gets the conflits of a dayoff
Authorizations:
path Parameters
| dayoffId required | string <uuid> |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "conflicts": [
- {
- "id": "5c37cf93b24a96f47a29bec",
- "start": "2018-12-23T23:00:00.000Z",
- "end": "2018-12-25T23:00:00.000Z",
- "startPeriod": "am",
- "endPeriod": "pm",
- "count": 2,
- "days": [
- "2018-12-23T23:00:00.000Z",
- "2018-12-24T23:00:00.000Z",
- "2018-12-25T23:00:00.000Z"
], - "type": {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}, - "slackUser": {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}, - "comment": "Some comment",
- "confirmed": true,
- "canceled": false
}
]
}Sets dayoff status as confirmed
Authorizations:
path Parameters
| dayoffId required | string <uuid> |
Request Body schema: application/json
| force | boolean Default: false
|
Responses
Request samples
- Payload
{- "force": false
}Response samples
- 200
- 400
- 401
- 404
- 409
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "start": "2018-12-23T23:00:00.000Z",
- "end": "2018-12-25T23:00:00.000Z",
- "startPeriod": "am",
- "endPeriod": "pm",
- "count": 2,
- "days": [
- "2018-12-23T23:00:00.000Z",
- "2018-12-24T23:00:00.000Z",
- "2018-12-25T23:00:00.000Z"
], - "type": {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}, - "slackUser": {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}, - "comment": "Some comment",
- "confirmed": true,
- "canceled": false
}Sets dayoff status as canceled
Authorizations:
path Parameters
| dayoffId required | string <uuid> |
Request Body schema: application/json
| cancelReason | string Cancelation reason |
Responses
Request samples
- Payload
{- "cancelReason": "string"
}Response samples
- 200
- 400
- 401
- 404
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "start": "2018-12-23T23:00:00.000Z",
- "end": "2018-12-25T23:00:00.000Z",
- "startPeriod": "am",
- "endPeriod": "pm",
- "count": 2,
- "days": [
- "2018-12-23T23:00:00.000Z",
- "2018-12-24T23:00:00.000Z",
- "2018-12-25T23:00:00.000Z"
], - "type": {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}, - "slackUser": {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}, - "comment": "Some comment",
- "confirmed": true,
- "canceled": false
}Resets dayoff status
Authorizations:
path Parameters
| dayoffId required | string <uuid> |
Responses
Response samples
- 200
- 400
- 401
- 404
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "start": "2018-12-23T23:00:00.000Z",
- "end": "2018-12-25T23:00:00.000Z",
- "startPeriod": "am",
- "endPeriod": "pm",
- "count": 2,
- "days": [
- "2018-12-23T23:00:00.000Z",
- "2018-12-24T23:00:00.000Z",
- "2018-12-25T23:00:00.000Z"
], - "type": {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}, - "slackUser": {
- "id": "5c37cf93b24a96f47a29bec",
- "slackId": "UGJ7AVX32",
- "name": "Sam Kerr",
- "locale": "en",
- "forcedLocale": "fr",
- "deleted": false
}, - "comment": "Some comment",
- "confirmed": true,
- "canceled": false
}Gets the list of day-off types
Authorizations:
query Parameters
| enabled | boolean |
| displayed | boolean |
| important | boolean |
number or string | |
| limit | number |
Responses
Response samples
- 200
- 400
- 401
- 500
{- "dayoffTypes": [
- {
- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}
], - "total": 1,
- "current": 1
}Creates a new dayoff type
- If a dayoff type with same name already exist conflict error will be thrown
Authorizations:
Request Body schema: application/json
| name required | string <= 75, characters Dayoff type name |
| emoji | string or null An emoji representing the dayoff type |
| enabled | boolean Default: true If daysoff can be created with this dayoff type |
| displayed | boolean Default: true f the dayoff type is displayed in filters and forms |
| important | boolean Default: false Daysoff with an important type will be highlighted on front clients |
Responses
Request samples
- Payload
{- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}Response samples
- 200
- 400
- 401
- 409
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}Edit a dayoff type
- If a dayoff type with same name already exist conflict error will be thrown
- When a dayoff type is modified all dayoff type data within daysoff are also updated
Authorizations:
path Parameters
| dayoffTypeId required | string <uuid> |
Request Body schema: application/json
| name | string <= 75, characters Dayoff type name |
| emoji | string or null An emoji representing the dayoff type |
| enabled | boolean Default: true If daysoff can be created with this dayoff type |
| displayed | boolean Default: true f the dayoff type is displayed in filters and forms |
| important | boolean Default: false Daysoff with an important type will be highlighted on front clients |
Responses
Request samples
- Payload
{- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}Response samples
- 200
- 400
- 401
- 404
- 409
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "name": "Sick",
- "emoji": "no_mouth",
- "enabled": true,
- "displayed": true,
- "important": false
}Edit configuration
Authorizations:
Request Body schema: application/json
| brandingName | string Branding name |
| brandingLogo | string <base64> Branding logo in base64 |
| slackReferrer | string <slack-id> Slack referrer user ID |
| workDays required | Array of integers[ items [ 0 .. 6 ] ] List of work days |
Responses
Request samples
- Payload
{- "brandingName": "Coddity",
- "brandingLogo": "data:image/png;base64,A0/b1C2//d3E4f==",
- "slackReferrer": "UXJOA3X11",
- "workDays": [
- 1,
- 2,
- 3
]
}Response samples
- 200
- 400
- 401
- 500
{- "brandingName": "Coddity",
- "brandingLogo": "data:image/png;base64,A0/b1C2//d3E4f==",
- "slackReferrer": "UXJOA3X11",
- "workDays": [
- 1,
- 2,
- 3
]
}Gets current public configuration
Public configuration is exposed for non-authenticated users in order to obtain basic information about the instance
Authorizations:
Responses
Response samples
- 200
- 500
{- "brandingName": "Coddity",
- "brandingLogo": "data:image/png;base64,A0/b1C2//d3E4f=="
}Edit a jobs settings
Authorizations:
path Parameters
| jobName required | string |
Request Body schema: application/json
| enabled | boolean (enabled) Defines if the job should be run |
| dayOfMonth | string (dayOfMonth) The day of the month during which we want the job to run (supports the cron format) |
| hour | string (hour) The hour of the day we want to run this job at |
| minute | string (minute) The minute we want to run this job at |
Responses
Request samples
- Payload
{- "enabled": true,
- "dayOfMonth": "*",
- "hour": "*",
- "minute": "*"
}Response samples
- 200
- 400
- 401
- 500
{- "id": "5c37cf93b24a96f47a29bec",
- "name": "string",
- "enabled": true,
- "dayOfMonth": "*",
- "hour": "*",
- "minute": "*"
}