Buttons

Button is a special kind of custom field that is displayed in the mobile app. To configure a button, you need to provide a URL of the button handler in the job template.

Button field sequence diagram

Button handlers

Processing button presses are analogous to handling webhooks. The main difference is the richer response API.

Request format

When a button is pressed, the server makes a POST request in the format of status webhooks.

Response format

The request timeout for button handlers is 30 seconds.

Response must have 2xx status code. Response body must be valid JSON-encoded data in the following format:

Field Type JSON Type Required Description

status

String

String

Yes

"ok" or "error"

message

Message

Object

No

Optional message shown to the user

update_job

Job update

Object

No

Optional job update in the format of update request

Currently, the message format is fixed to the following:

Field Type JSON Type Required Description

type

String

String

Yes

Must be "popup"

title

String

String

Yes

Non-empty string with the window title

body

String

String

Yes

Non-empty string with the message

If a response doesn’t conform to the format, it is interpreted as an error without a message.