Description
With the incoming WebHooks, information can be forwarded directly to Stackfield without much detour. This interface uses HTTP requests in combination with JSON payloads to create elements, such as messages, tasks, etc., on Stackfield.
To send data to a Stackfield, POST URLs must be generated.
Where do I get the POST URL?
Sending data to a Room
The POST URL for sending data to a Room can be accessed through the Room Settings. There you can find the tab "Integrations", in which the button "Add new WebHook" can be selected.
Changing the Room Settings
Likewise in the Room Settings, tab "Integrations", there is the Room API ID, via which the room settings can be controlled.
(This feature is only available in the Enterprise version!)
Changing the Organization Settings
Within the Organization Settings is the tab "Integrations" located, which allows the administration of all interfaces to the organization. This tab also includes the option "WebHook". After clicking on "More", the necessary options for adding new WebHooks to control the Organization Settings are displayed.
(This feature is only available in the Enterprise version!)
Limitations
A maximum of one request per second can be processed.
Availability
In addition to sending information to Stackfield, it is also possible to make changes to the settings of the rooms and the organization. The editing of the settings via API is only available in the Enterprise version.
Error Codes
Error Code
|
Description
|
200 | Successful request and response. |
4030 | Request could not be completed. |
4031 | Invalid request. |
4032 | Encrypted rooms are not supported. |
4033 | Room type is not supported. |
4034 | Invalid request. |
4035 | List level: Module, Room or Organisation not active. |
4035 | Invalid request. ObjectId is invalid. |
4036 | Room level: Module, Room or Organisation not active. |
4037 | Organisation level: Module, Room or Organisation not active. |
4038 | Integration disabled. |
4038 | Module disabled. |
4039 | This organization is not a payed organization. |
4040 | API call limit exceeded. |
4041 | No files found. |
4042 | File is too big. Max 1GB. |
4042 | There is not enough free storage space in this organization to perform the upload. |
4043 | Cannot read file. |
4044 | Attachment could not be added. |
4045 | Invalid file type. |
4050 | Invalid request. Title is null or empty. |
4051 | Invalid request. Users is null or empty. |
4052 | Invalid request. Command is unknown. |
4055 | Invalid request. DateEnd is before DateStart. |
4056 | Invalid request. User contains invalid email. |
4056 | Invalid request. Property could not be parsed. |
4057 | Double request. |
4060 | Invalid Email. |
4061 | Invalid email. Item not found |
4070 | Invalid request. Command is null or empty. |
4071 | Invalid request. RoomId is null or empty. |
4072 | Not enough free slots. |
4073 | To many invitations |
4074 | Users are managed by your domain. |
4075 | Invalid request. User with email not member of this organization. |
4076 | Invalid request. User with email is already deactivated. |
4077 | Invalid request. You can not remove all admins. |
4078 | Invalid email and group combination |
4079 | Room is already archived |
4080 | User is already member of this organization. |
4081 | Setting: Rooms must be encrypted. |
4082 | You can not use encrypted templates. |
Chat Messages
Location of the POST URL
Room Settings > Integrations > Add a new WebHook > Chat Message
Parameter
Parameter
|
Mandatory field
|
Description
|
Title
|
Yes
|
Content of the Chat Message
|
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Title":"Hello World!"}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Discussions
Location of the POST URL
Room Settings > Integrations > Add a new WebHook > Discussion
Parameter
Parameter
|
Mandatory field
|
Description
|
Title | Yes | Title of the Discussion |
Content | No | Description of the Discussion |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Title":"That's a title!", "Content":"Look at that description!"}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Tasks
Location of the POST URL
Room Settings > Integrations > Add a new WebHook > Task
Parameter
Parameter
|
Mandatory field
|
Description
|
Title | Yes | Title of the Task |
Content | No | Description of the Task |
DateStart | No | Start date |
DateEnd | No | End date |
Users | No | List of email addresses of assigned users |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Title":"That's a title!", "Content":"Look at that description!", "DateStart":"2019-07-08 22:00", "Users":["user1@demo.de","user2@demo.de"]}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Pages
Location of the POST URL
Room Settings > Integrations > Add a new WebHook > Page
Parameter
Parameter
|
Mandatory field
|
Description
|
Title | Yes | Title of the Page |
Content | No | Description of the Page |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Title":"That's a title!", "Content":"Look at that description!"}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Files
Location of the POST URL
Room Settings > Integrations > Add a new WebHook > File
Parameter
Parameter
|
Mandatory field
|
Description
|
File | Yes | File path |
Type
POST
Content-Type: "multipart/form-data"
Example
curl -F 'File=@C:\Pictures\MyImage.jpg'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Events
Location of the POST URL
Room Settings > Integrations > Add a new WebHook > Event
Parameter
Parameter
|
Mandatory field
|
Description
|
Title | Yes | Title of the Event |
Content | No | Description of the Event |
DateStart | Yes | Start date |
DateEnd | Yes | End date |
Users | No | List of invited users |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Title":"That's a title!", "Content":"Look at that description!", "DateStart":"2019-07-08 22:00","DateEnd":"2019-07-08 23:00", "Users":["user1@demo.de","user2@demo.de"]}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Adding Users to the Organization
(This feature is only available in the Enterprise version!)
POST Url
Organization Settings > Integrations > WebHook > Add a new WebHook > User
Parameter
Parameter
|
Mandatory field
|
Description
|
Command | Yes | Command name: CreateUser |
Email | Yes | Email address of the user |
DisplayName | Yes | Display name of the user |
UserName | Only for Windows Authentication (On-Premise-Version) | UserId |
OrgRoleId | Yes | Role within the Organization: 1 - Admin 2 - Member 3 - Guest 4 - External |
AuthProvider | No (only used with SSO) | Id of Identity Provider |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Command":"CreateUser","Email":"apiTester01@webhook.de","DisplayName":"Api Tester01","OrgRoleId":2}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Removing User from the Organization
(This feature is only available in the Enterprise version!)
Location of the POST URL
Organization Settings > Integrations > WebHook > Add a new WebHook
Parameter
Parameter
|
Mandatory field
|
Description
|
Command | Yes | Command name: RemoveUser |
Email | Yes | Email address of the User |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Command":"RemoveUser","Email":"apiTester01@webhook.de"}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Deactivating Users
(This feature is only available in the Enterprise version!)
Location of the POST URL
Organization Settings > Integrations > WebHook > Add a new WebHook
Parameter
Parameter
|
Mandatory field
|
Description
|
Command | Yes | Befehlsname: DeactivateUser |
Email | Yes | Email address of the User |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Command":"DeactivateUser","Email":"apiTester01@webhook.de"}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Creating Rooms
(This feature is only available in the Enterprise version!)
Location of the POST URL
Organization Settings > Integrations > WebHook > Add a new WebHook
Parameter
Parameter
|
Mandatory field
|
Description
|
Command | Yes | Command name: CreateRoom |
RoomId | (Return) | Id of the Room |
Name | Yes | Name of the Room |
Description | Nein | Description of the Room |
TemplateId | Nein | Id of the Room Template |
Users | Nein | List of Room Members |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Command":"CreateRoom","Name":"webhook room from template6","Description":"neuer webhook room desc","TemplateId":"03852566-669e-4991-9491-12', "Users":[{"Email":"remtester@mail.de","GroupId":2,"IsAdmin":"true"}]}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Archiving Rooms
(This feature is only available in the Enterprise version!)
Location of the POST URL
Organization Settings > Integrations > WebHook > Add a new WebHook > Room Settings
Parameter
Parameter
|
Mandatory field
|
Description
|
Command | Yes | Command name: ArchiveRoom |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Command":"ArchiveRoom"}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Adding Users to a Room
(This feature is only available in the Enterprise version!)
Location of the POST URL
Organization Settings > Integrations > WebHook > Add a new WebHook > Room Settings
Room Settings > Integrations > WebHook > Add a new WebHook > Room Settings
Parameter
Parameter
|
Mandatory field
|
Description
|
Command | Yes | Command name: GrantRoomAccess |
Users | Yes | List of Room Members |
RoomId | No | Raum API Id |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Command":"GrantRoomAccess", "Users":[{"Email":"remtester@mail.de","GroupId":2,"IsAdmin":"true"}]}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5
Removing Users from a Room
(This feature is only available in the Enterprise version!)
Location of the POST URL
Organization Settings > Integrations > WebHook > Add a new WebHook > Room Settings
Room Settings > Integrations > WebHook > Add a new WebHook > Room Settings
Parameter
Parameter
|
Mandatory field
|
Description
|
Command | Yes | Command name: RevokeRoomAccess |
Users | Yes | List of Room Members |
RoomId | No | Raum API Id |
Type
POST
Content-Type: "application/json"
Example
curl -X POST -H 'Content-Type: application/json' -d '{"Command":"RevokeRoomAccess","Users":["remtester@mail.te"]}'
https://www.stackfield.com/apiwh/e5a1cfbd-970e-45a1-b81c-3e004f9bdab5