Back to top

Web1on1 API Reference

Authentication

All API requests are made on behalf of a registered User. An API request should always include the Authorization: Bearer _token_ header in the request HTTP headers list.

Example of valid API requests using cURL utility:

$ curl -H "Authorization: Bearer 94c70d470e391bdc16a8d8363b5d4891" \
       https://api.web1on1.chat/v2/path/to/resource

API tokens that are tied to a user with role “bot” do not expire, but may be revoked. The API key has the permissions of the associated user, and actions appear as if they were that user. If the associated user has its permissions changed, such as being removed from an organization, then the functionality of the key will change.

We recommend that different systems have different API tokens (bot users) for security purposes.

Time-based Tokens

Web1on1 supports time-based tokens that expire after a set amount of time. These tokens are tied to the user session, and used primarily in our applications.

Create an Access Token
POST/auth/token

To obtain an access token, make a POST request to https://api.web1on1.chat/v2/auth/token. The users’s email and password must be used in a JSON object posted to the token API URL.

The token expires after 24 hours; use the refresh token flow before expiration. After expiration a new token should be generated.

Example URI

POST https://api.web1on1.chat/v2/auth/token
Request
HideShow
Headers
Content-Type: application/json
Body
{
  "email": "jeff@jeffdoe.com",
  "password": "z3krut"
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "tokenType": "Bearer",
  "token": "eyK8eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfaWQiOiI1NDUwMDBlNTZkYWU2NzQxMTVjZWYyN2MiLCJpYXQiOjE0MTc0NjQzNDksImV4cCI6MTQxNzQ4MjM0OX0._ihtI_m5vf53m_qF0y_m-y_5X9Hy8Ik2A5qUTSkgNhA",
  "refreshToken": "eyK8eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfaWQiOiI1NDUwMDBlNTZkYWU2NzQxMTVjZWYyN2MiLCJpYXQiOjE0MTc0NjQzNDksImV4cCI6MTQxNzQ4MjM0OX0._ihtI_m5vf53m_qF0y_m-y_5X9Hy8Ik2A5qUTSkgNhA",
  "user": "599e1fcd9da1c72645c95886",
  "organization": "57c8479433f5d57d3013a0bc",
  "expiresAt": "2016-01-07T14:03:43Z",
  "scope": "admin"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "tokenType": {
      "type": "string",
      "description": "Token type."
    },
    "token": {
      "type": "string",
      "description": "Authentication token. Expires after 24h."
    },
    "refreshToken": {
      "type": "string",
      "description": "Authentication token for refresh authentication. Expires after 1 month."
    },
    "user": {
      "type": "string",
      "description": "The ID of the User authenticated."
    },
    "organization": {
      "type": "string",
      "description": "Authenticated user organization ID."
    },
    "expiresAt": {
      "type": "string",
      "description": "ISO8601 date ant ime when token expires."
    },
    "scope": {
      "type": "string",
      "description": "Authenticated user scope."
    }
  }
}

Refresh an Access Token
GET/auth/token?{refreshToken}

Use the refresh token to request a new access token prior to expiration.

Example URI

GET https://api.web1on1.chat/v2/auth/token?refreshToken
URI Parameters
HideShow
refreshToken
string (required) 

Refresh token.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "tokenType": "Bearer",
  "token": "eyK8eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfaWQiOiI1NDUwMDBlNTZkYWU2NzQxMTVjZWYyN2MiLCJpYXQiOjE0MTc0NjQzNDksImV4cCI6MTQxNzQ4MjM0OX0._ihtI_m5vf53m_qF0y_m-y_5X9Hy8Ik2A5qUTSkgNhA",
  "refreshToken": "eyK8eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJfaWQiOiI1NDUwMDBlNTZkYWU2NzQxMTVjZWYyN2MiLCJpYXQiOjE0MTc0NjQzNDksImV4cCI6MTQxNzQ4MjM0OX0._ihtI_m5vf53m_qF0y_m-y_5X9Hy8Ik2A5qUTSkgNhA",
  "user": "599e1fcd9da1c72645c95886",
  "organization": "57c8479433f5d57d3013a0bc",
  "expiresAt": "2016-01-07T14:03:43Z",
  "scope": "admin"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "tokenType": {
      "type": "string",
      "description": "Token type."
    },
    "token": {
      "type": "string",
      "description": "Authentication token. Expires after 24h."
    },
    "refreshToken": {
      "type": "string",
      "description": "Authentication token for refresh authentication. Expires after 1 month."
    },
    "user": {
      "type": "string",
      "description": "The ID of the User authenticated."
    },
    "organization": {
      "type": "string",
      "description": "Authenticated user organization ID."
    },
    "expiresAt": {
      "type": "string",
      "description": "ISO8601 date ant ime when token expires."
    },
    "scope": {
      "type": "string",
      "description": "Authenticated user scope."
    }
  }
}

Provisioning

The Provisioning APIs provide methods for configuring primary entities in the system for proper account setup.

Users

Users are people or apps that can log into Web1on1. A User resource specifies the profile, permissions, preferences and login credentials for Web1on1 agents and admin users.

A User object has the following attributes:

Property Type Description Example
id string The unique ID of the user. 57c8479433f5d57d3013a0bc
familyName string Family name or surname. In the U.S. and most of Europe, the last name of an User. This can be used along with givenName instead of the displayName property. Vries
givenName string Given name. In the U.S. and most of Europe, the first name of a User. This can be used along with familyName instead of the displayName property. Hans
additionalName string An additional name for a User, can be used for a middle name. de
displayName string Name of the User as it will be displayed in user interfaces. If not provided, this will be composed by concatenating givenName, additionalName and familyName. Hans de Vries
email string* Email address of the User, used to log in. jeff@jeffdoe.com
phone string User telephone number. +31209876543
password string Login password for the User. z3krUt
avatar string Avatar URL for the User. http://yoursite.com/images/avatar.png
organization string The ID of the organization the user belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations. 55dcf8aa048ee2227d4aa1a4
role enum The role of the agent within the organization. One of agent, admin, owner. Defaults to agent. agent
settings Settings User preferences. {Settings}
meta MetaParams Free-form object of key-values, that will be passed on to external systems, eg in webhook data. {MetaParams}
status enum The status of the user for given organization. One of queued, invited, active, archived. Defaults to queued. queued
apiToken string API key for role ‘bot’ users. eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV
lastLogin string ISO8601 date and time of when the user last logged in. 2016-08-05T08:40:51.620Z
createdAt string ISO8601 date and time of when the user was created. 2016-01-07T14:03:43Z
updatedAt string ISO8601 date and time of when the user was last modified. 2016-01-07T14:03:43Z

Person name conventions are adapted from JSON-LD standards as specified by Google and described at Schema.org.

The user.settings object specifies user preferences and may have the following properties:

Property Type Description Example
timezone string Timezone preference for displaying relative dates/times, specified as one of the Zones in the IANA Time Zone Database (https://www.iana.org/time-zones). If not specified, this will be auto-set the first time the user logs in. Europe/Amsterdam
timezoneSet boolean Boolean indicating that the timezone has been manually set by the user (as opposed to inferred by the system). Defaults to false. false
locale enum ISO 639-1 language code. If not specified, this setting will be inferred by the system based on user-agent settings and/or user IP location. One of en, nl, de, fr. Defaults to en. en
localeSet boolean Boolean indicating that the locale has been manually set by the user (as opposed to inferred by the system). Defaults to false. false
audioOnChat boolean Boolean to bleep on queue increments. Defaults to true. true
audioOnMessage boolean Boolean to bleep on new messages. Defaults to false. false
notifyOnChat boolean Boolean to show desktop notifications on queue increments. Defaults to false. false
notifyOnMessage boolean Boolean to show a desktop notification on each incoming message. Defaults to false. false
tabdotNotify boolean Boolean to show a browser tab notification on queued conversations. Defaults to true. true
tabdotMessage boolean Boolean to show a browser tab notification on unread messages. Defaults to true. true
pushNotify boolean Boolean to enable mobile push inbox notifications. Defaults to false. false
focusOnAccept boolean Boolean to activate conversations after accepting. Defaults to true for level2+ agents, false for top-level agents. Defaults to false. false
notifications array List of notification roles for the user. [technical]
cannedResponses array List of canned responses. [What is your name?]

List All Users
GET/users

Return a list of all account users (agents and admins).

Example URI

GET https://api.web1on1.chat/v2/users
Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "57c8479433f5d57d3013a0bc",
    "familyName": "Vries",
    "givenName": "Hans",
    "additionalName": "de",
    "displayName": "Hans de Vries",
    "email": "jeff@jeffdoe.com",
    "phone": "+31209876543",
    "password": "z3krUt",
    "avatar": "http://yoursite.com/images/avatar.png",
    "organization": "55dcf8aa048ee2227d4aa1a4",
    "role": "agent",
    "settings": {
      "timezone": "Europe/Amsterdam",
      "timezoneSet": true,
      "locale": "en",
      "localeSet": true,
      "audioOnChat": true,
      "audioOnMessage": true,
      "notifyOnChat": true,
      "notifyOnMessage": true,
      "tabdotNotify": true,
      "tabdotMessage": true,
      "pushNotify": true,
      "focusOnAccept": true,
      "notifications": [
        "technical",
        "billing",
        "reporting",
        "knowledge",
        "results"
      ],
      "cannedResponses": [
        "What is your name?",
        "Thank you {{ givenName }}"
      ]
    },
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "status": "queued",
    "apiToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV",
    "lastLogin": "2016-08-05T08:40:51.620Z",
    "createdAt": "2016-01-07T14:03:43Z",
    "updatedAt": "2016-01-07T14:03:43Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create a New User
POST/users

You may create a user using this action. It takes a JSON object containing a name, email and password, and optional settings, role and/or organization.

Example URI

POST https://api.web1on1.chat/v2/users
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "familyName": "Vries",
  "givenName": "Hans",
  "additionalName": "de",
  "displayName": "Hans de Vries",
  "email": "jeff@jeffdoe.com",
  "phone": "+31209876543",
  "password": "z3krUt",
  "avatar": "http://yoursite.com/images/avatar.png",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "role": "agent",
  "settings": {
    "timezone": "Europe/Amsterdam",
    "timezoneSet": true,
    "locale": "en",
    "localeSet": true,
    "audioOnChat": true,
    "audioOnMessage": true,
    "notifyOnChat": true,
    "notifyOnMessage": true,
    "tabdotNotify": true,
    "tabdotMessage": true,
    "pushNotify": true,
    "focusOnAccept": true,
    "notifications": [
      "technical",
      "billing",
      "reporting",
      "knowledge",
      "results"
    ],
    "cannedResponses": [
      "What is your name?",
      "Thank you {{ givenName }}"
    ]
  },
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "status": "queued"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "familyName": {
      "type": "string",
      "description": "Family name or surname. In the U.S. and most of Europe, the last name of an User. This can be used along with givenName instead of the displayName property."
    },
    "givenName": {
      "type": "string",
      "description": "Given name. In the U.S. and most of Europe, the first name of a User. This can be used along with familyName instead of the displayName property."
    },
    "additionalName": {
      "type": "string",
      "description": "An additional name for a User, can be used for a middle name."
    },
    "displayName": {
      "type": "string",
      "description": "Name of the User as it will be displayed in user interfaces. If not provided, this will be composed by concatenating givenName, additionalName and familyName."
    },
    "email": {
      "type": "string",
      "description": "Email address of the User, used to log in."
    },
    "phone": {
      "type": "string",
      "description": "User telephone number."
    },
    "password": {
      "type": "string",
      "description": "Login password for the User."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar URL for the User."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization the user belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "role": {
      "type": "string",
      "enum": [
        "agent",
        "admin",
        "owner"
      ],
      "default": "agent",
      "description": "The role of the agent within the organization."
    },
    "settings": {
      "type": "object",
      "properties": {
        "timezone": {
          "type": "string",
          "description": "Timezone preference for displaying relative dates/times, specified as one of the Zones in the IANA Time Zone Database (https://www.iana.org/time-zones). If not specified, this will be auto-set the first time the user logs in."
        },
        "timezoneSet": {
          "type": "boolean",
          "description": "Boolean indicating that the timezone has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "locale": {
          "type": "string",
          "enum": [
            "en",
            "nl",
            "de",
            "fr"
          ],
          "default": "en",
          "description": "ISO 639-1 language code. If not specified, this setting will be inferred by the system based on user-agent settings and/or user IP location."
        },
        "localeSet": {
          "type": "boolean",
          "description": "Boolean indicating that the locale has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "audioOnChat": {
          "type": "boolean",
          "description": "Boolean to bleep on queue increments.",
          "default": true
        },
        "audioOnMessage": {
          "type": "boolean",
          "description": "Boolean to bleep on new messages.",
          "default": false
        },
        "notifyOnChat": {
          "type": "boolean",
          "description": "Boolean to show desktop notifications on queue increments.",
          "default": false
        },
        "notifyOnMessage": {
          "type": "boolean",
          "description": "Boolean to show a desktop notification on each incoming message.",
          "default": false
        },
        "tabdotNotify": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on queued conversations.",
          "default": true
        },
        "tabdotMessage": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on unread messages.",
          "default": true
        },
        "pushNotify": {
          "type": "boolean",
          "description": "Boolean to enable mobile push inbox notifications.",
          "default": false
        },
        "focusOnAccept": {
          "type": "boolean",
          "description": "Boolean to activate conversations after accepting. Defaults to true for level2+ agents, false for top-level agents.",
          "default": false
        },
        "notifications": {
          "type": "array",
          "description": "List of notification roles for the user."
        },
        "cannedResponses": {
          "type": "array",
          "description": "List of canned responses."
        }
      },
      "description": "User preferences."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "invited",
        "active",
        "archived"
      ],
      "default": "queued",
      "description": "The status of the user for given organization."
    }
  },
  "required": [
    "email"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /users/57c8479433f5d57d3013a0bc
Body
{
  "id": "57c8479433f5d57d3013a0bc",
  "familyName": "Vries",
  "givenName": "Hans",
  "additionalName": "de",
  "displayName": "Hans de Vries",
  "email": "jeff@jeffdoe.com",
  "phone": "+31209876543",
  "password": "z3krUt",
  "avatar": "http://yoursite.com/images/avatar.png",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "role": "agent",
  "settings": {
    "timezone": "Europe/Amsterdam",
    "timezoneSet": true,
    "locale": "en",
    "localeSet": true,
    "audioOnChat": true,
    "audioOnMessage": true,
    "notifyOnChat": true,
    "notifyOnMessage": true,
    "tabdotNotify": true,
    "tabdotMessage": true,
    "pushNotify": true,
    "focusOnAccept": true,
    "notifications": [
      "technical",
      "billing",
      "reporting",
      "knowledge",
      "results"
    ],
    "cannedResponses": [
      "What is your name?",
      "Thank you {{ givenName }}"
    ]
  },
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "status": "queued",
  "apiToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV",
  "lastLogin": "2016-08-05T08:40:51.620Z",
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the user."
    },
    "familyName": {
      "type": "string",
      "description": "Family name or surname. In the U.S. and most of Europe, the last name of an User. This can be used along with givenName instead of the displayName property."
    },
    "givenName": {
      "type": "string",
      "description": "Given name. In the U.S. and most of Europe, the first name of a User. This can be used along with familyName instead of the displayName property."
    },
    "additionalName": {
      "type": "string",
      "description": "An additional name for a User, can be used for a middle name."
    },
    "displayName": {
      "type": "string",
      "description": "Name of the User as it will be displayed in user interfaces. If not provided, this will be composed by concatenating givenName, additionalName and familyName."
    },
    "email": {
      "type": "string",
      "description": "Email address of the User, used to log in."
    },
    "phone": {
      "type": "string",
      "description": "User telephone number."
    },
    "password": {
      "type": "string",
      "description": "Login password for the User."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar URL for the User."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization the user belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "role": {
      "type": "string",
      "enum": [
        "agent",
        "admin",
        "owner"
      ],
      "default": "agent",
      "description": "The role of the agent within the organization."
    },
    "settings": {
      "type": "object",
      "properties": {
        "timezone": {
          "type": "string",
          "description": "Timezone preference for displaying relative dates/times, specified as one of the Zones in the IANA Time Zone Database (https://www.iana.org/time-zones). If not specified, this will be auto-set the first time the user logs in."
        },
        "timezoneSet": {
          "type": "boolean",
          "description": "Boolean indicating that the timezone has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "locale": {
          "type": "string",
          "enum": [
            "en",
            "nl",
            "de",
            "fr"
          ],
          "default": "en",
          "description": "ISO 639-1 language code. If not specified, this setting will be inferred by the system based on user-agent settings and/or user IP location."
        },
        "localeSet": {
          "type": "boolean",
          "description": "Boolean indicating that the locale has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "audioOnChat": {
          "type": "boolean",
          "description": "Boolean to bleep on queue increments.",
          "default": true
        },
        "audioOnMessage": {
          "type": "boolean",
          "description": "Boolean to bleep on new messages.",
          "default": false
        },
        "notifyOnChat": {
          "type": "boolean",
          "description": "Boolean to show desktop notifications on queue increments.",
          "default": false
        },
        "notifyOnMessage": {
          "type": "boolean",
          "description": "Boolean to show a desktop notification on each incoming message.",
          "default": false
        },
        "tabdotNotify": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on queued conversations.",
          "default": true
        },
        "tabdotMessage": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on unread messages.",
          "default": true
        },
        "pushNotify": {
          "type": "boolean",
          "description": "Boolean to enable mobile push inbox notifications.",
          "default": false
        },
        "focusOnAccept": {
          "type": "boolean",
          "description": "Boolean to activate conversations after accepting. Defaults to true for level2+ agents, false for top-level agents.",
          "default": false
        },
        "notifications": {
          "type": "array",
          "description": "List of notification roles for the user."
        },
        "cannedResponses": {
          "type": "array",
          "description": "List of canned responses."
        }
      },
      "description": "User preferences."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "invited",
        "active",
        "archived"
      ],
      "default": "queued",
      "description": "The status of the user for given organization."
    },
    "apiToken": {
      "type": "string",
      "description": "API key for role 'bot' users."
    },
    "lastLogin": {
      "type": "string",
      "description": "ISO8601 date and time of when the user last logged in."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the user was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the user was last modified."
    }
  },
  "required": [
    "email"
  ]
}

User

Retrieve a User
GET/users/{user_id}

View a User. Get the currently authenticated User by issuing a request for GET /users/me.

Example URI

GET https://api.web1on1.chat/v2/users/user_id
URI Parameters
HideShow
user_id
number (required) 

ID of the User, or the string ‘me’ to return the current user.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "57c8479433f5d57d3013a0bc",
  "familyName": "Vries",
  "givenName": "Hans",
  "additionalName": "de",
  "displayName": "Hans de Vries",
  "email": "jeff@jeffdoe.com",
  "phone": "+31209876543",
  "password": "z3krUt",
  "avatar": "http://yoursite.com/images/avatar.png",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "role": "agent",
  "settings": {
    "timezone": "Europe/Amsterdam",
    "timezoneSet": true,
    "locale": "en",
    "localeSet": true,
    "audioOnChat": true,
    "audioOnMessage": true,
    "notifyOnChat": true,
    "notifyOnMessage": true,
    "tabdotNotify": true,
    "tabdotMessage": true,
    "pushNotify": true,
    "focusOnAccept": true,
    "notifications": [
      "technical",
      "billing",
      "reporting",
      "knowledge",
      "results"
    ],
    "cannedResponses": [
      "What is your name?",
      "Thank you {{ givenName }}"
    ]
  },
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "status": "queued",
  "apiToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV",
  "lastLogin": "2016-08-05T08:40:51.620Z",
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the user."
    },
    "familyName": {
      "type": "string",
      "description": "Family name or surname. In the U.S. and most of Europe, the last name of an User. This can be used along with givenName instead of the displayName property."
    },
    "givenName": {
      "type": "string",
      "description": "Given name. In the U.S. and most of Europe, the first name of a User. This can be used along with familyName instead of the displayName property."
    },
    "additionalName": {
      "type": "string",
      "description": "An additional name for a User, can be used for a middle name."
    },
    "displayName": {
      "type": "string",
      "description": "Name of the User as it will be displayed in user interfaces. If not provided, this will be composed by concatenating givenName, additionalName and familyName."
    },
    "email": {
      "type": "string",
      "description": "Email address of the User, used to log in."
    },
    "phone": {
      "type": "string",
      "description": "User telephone number."
    },
    "password": {
      "type": "string",
      "description": "Login password for the User."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar URL for the User."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization the user belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "role": {
      "type": "string",
      "enum": [
        "agent",
        "admin",
        "owner"
      ],
      "default": "agent",
      "description": "The role of the agent within the organization."
    },
    "settings": {
      "type": "object",
      "properties": {
        "timezone": {
          "type": "string",
          "description": "Timezone preference for displaying relative dates/times, specified as one of the Zones in the IANA Time Zone Database (https://www.iana.org/time-zones). If not specified, this will be auto-set the first time the user logs in."
        },
        "timezoneSet": {
          "type": "boolean",
          "description": "Boolean indicating that the timezone has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "locale": {
          "type": "string",
          "enum": [
            "en",
            "nl",
            "de",
            "fr"
          ],
          "default": "en",
          "description": "ISO 639-1 language code. If not specified, this setting will be inferred by the system based on user-agent settings and/or user IP location."
        },
        "localeSet": {
          "type": "boolean",
          "description": "Boolean indicating that the locale has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "audioOnChat": {
          "type": "boolean",
          "description": "Boolean to bleep on queue increments.",
          "default": true
        },
        "audioOnMessage": {
          "type": "boolean",
          "description": "Boolean to bleep on new messages.",
          "default": false
        },
        "notifyOnChat": {
          "type": "boolean",
          "description": "Boolean to show desktop notifications on queue increments.",
          "default": false
        },
        "notifyOnMessage": {
          "type": "boolean",
          "description": "Boolean to show a desktop notification on each incoming message.",
          "default": false
        },
        "tabdotNotify": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on queued conversations.",
          "default": true
        },
        "tabdotMessage": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on unread messages.",
          "default": true
        },
        "pushNotify": {
          "type": "boolean",
          "description": "Boolean to enable mobile push inbox notifications.",
          "default": false
        },
        "focusOnAccept": {
          "type": "boolean",
          "description": "Boolean to activate conversations after accepting. Defaults to true for level2+ agents, false for top-level agents.",
          "default": false
        },
        "notifications": {
          "type": "array",
          "description": "List of notification roles for the user."
        },
        "cannedResponses": {
          "type": "array",
          "description": "List of canned responses."
        }
      },
      "description": "User preferences."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "invited",
        "active",
        "archived"
      ],
      "default": "queued",
      "description": "The status of the user for given organization."
    },
    "apiToken": {
      "type": "string",
      "description": "API key for role 'bot' users."
    },
    "lastLogin": {
      "type": "string",
      "description": "ISO8601 date and time of when the user last logged in."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the user was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the user was last modified."
    }
  },
  "required": [
    "email"
  ]
}

Update a User
PATCH/users/{user_id}

You may edit a user using this action. It takes a (possibly partial) JSON object containing one or more of the user attributes.

Example URI

PATCH https://api.web1on1.chat/v2/users/user_id
URI Parameters
HideShow
user_id
number (required) 

ID of the User, or the string ‘me’ to return the current user.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "familyName": "Vries",
  "givenName": "Hans",
  "additionalName": "de",
  "displayName": "Hans de Vries",
  "email": "jeff@jeffdoe.com",
  "phone": "+31209876543",
  "password": "z3krUt",
  "avatar": "http://yoursite.com/images/avatar.png",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "role": "agent",
  "settings": {
    "timezone": "Europe/Amsterdam",
    "timezoneSet": true,
    "locale": "en",
    "localeSet": true,
    "audioOnChat": true,
    "audioOnMessage": true,
    "notifyOnChat": true,
    "notifyOnMessage": true,
    "tabdotNotify": true,
    "tabdotMessage": true,
    "pushNotify": true,
    "focusOnAccept": true,
    "notifications": [
      "technical",
      "billing",
      "reporting",
      "knowledge",
      "results"
    ],
    "cannedResponses": [
      "What is your name?",
      "Thank you {{ givenName }}"
    ]
  },
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "status": "queued"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "familyName": {
      "type": "string",
      "description": "Family name or surname. In the U.S. and most of Europe, the last name of an User. This can be used along with givenName instead of the displayName property."
    },
    "givenName": {
      "type": "string",
      "description": "Given name. In the U.S. and most of Europe, the first name of a User. This can be used along with familyName instead of the displayName property."
    },
    "additionalName": {
      "type": "string",
      "description": "An additional name for a User, can be used for a middle name."
    },
    "displayName": {
      "type": "string",
      "description": "Name of the User as it will be displayed in user interfaces. If not provided, this will be composed by concatenating givenName, additionalName and familyName."
    },
    "email": {
      "type": "string",
      "description": "Email address of the User, used to log in."
    },
    "phone": {
      "type": "string",
      "description": "User telephone number."
    },
    "password": {
      "type": "string",
      "description": "Login password for the User."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar URL for the User."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization the user belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "role": {
      "type": "string",
      "enum": [
        "agent",
        "admin",
        "owner"
      ],
      "default": "agent",
      "description": "The role of the agent within the organization."
    },
    "settings": {
      "type": "object",
      "properties": {
        "timezone": {
          "type": "string",
          "description": "Timezone preference for displaying relative dates/times, specified as one of the Zones in the IANA Time Zone Database (https://www.iana.org/time-zones). If not specified, this will be auto-set the first time the user logs in."
        },
        "timezoneSet": {
          "type": "boolean",
          "description": "Boolean indicating that the timezone has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "locale": {
          "type": "string",
          "enum": [
            "en",
            "nl",
            "de",
            "fr"
          ],
          "default": "en",
          "description": "ISO 639-1 language code. If not specified, this setting will be inferred by the system based on user-agent settings and/or user IP location."
        },
        "localeSet": {
          "type": "boolean",
          "description": "Boolean indicating that the locale has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "audioOnChat": {
          "type": "boolean",
          "description": "Boolean to bleep on queue increments.",
          "default": true
        },
        "audioOnMessage": {
          "type": "boolean",
          "description": "Boolean to bleep on new messages.",
          "default": false
        },
        "notifyOnChat": {
          "type": "boolean",
          "description": "Boolean to show desktop notifications on queue increments.",
          "default": false
        },
        "notifyOnMessage": {
          "type": "boolean",
          "description": "Boolean to show a desktop notification on each incoming message.",
          "default": false
        },
        "tabdotNotify": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on queued conversations.",
          "default": true
        },
        "tabdotMessage": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on unread messages.",
          "default": true
        },
        "pushNotify": {
          "type": "boolean",
          "description": "Boolean to enable mobile push inbox notifications.",
          "default": false
        },
        "focusOnAccept": {
          "type": "boolean",
          "description": "Boolean to activate conversations after accepting. Defaults to true for level2+ agents, false for top-level agents.",
          "default": false
        },
        "notifications": {
          "type": "array",
          "description": "List of notification roles for the user."
        },
        "cannedResponses": {
          "type": "array",
          "description": "List of canned responses."
        }
      },
      "description": "User preferences."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "invited",
        "active",
        "archived"
      ],
      "default": "queued",
      "description": "The status of the user for given organization."
    }
  },
  "required": [
    "email"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "57c8479433f5d57d3013a0bc",
  "familyName": "Vries",
  "givenName": "Hans",
  "additionalName": "de",
  "displayName": "Hans de Vries",
  "email": "jeff@jeffdoe.com",
  "phone": "+31209876543",
  "password": "z3krUt",
  "avatar": "http://yoursite.com/images/avatar.png",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "role": "agent",
  "settings": {
    "timezone": "Europe/Amsterdam",
    "timezoneSet": true,
    "locale": "en",
    "localeSet": true,
    "audioOnChat": true,
    "audioOnMessage": true,
    "notifyOnChat": true,
    "notifyOnMessage": true,
    "tabdotNotify": true,
    "tabdotMessage": true,
    "pushNotify": true,
    "focusOnAccept": true,
    "notifications": [
      "technical",
      "billing",
      "reporting",
      "knowledge",
      "results"
    ],
    "cannedResponses": [
      "What is your name?",
      "Thank you {{ givenName }}"
    ]
  },
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "status": "queued",
  "apiToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV",
  "lastLogin": "2016-08-05T08:40:51.620Z",
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the user."
    },
    "familyName": {
      "type": "string",
      "description": "Family name or surname. In the U.S. and most of Europe, the last name of an User. This can be used along with givenName instead of the displayName property."
    },
    "givenName": {
      "type": "string",
      "description": "Given name. In the U.S. and most of Europe, the first name of a User. This can be used along with familyName instead of the displayName property."
    },
    "additionalName": {
      "type": "string",
      "description": "An additional name for a User, can be used for a middle name."
    },
    "displayName": {
      "type": "string",
      "description": "Name of the User as it will be displayed in user interfaces. If not provided, this will be composed by concatenating givenName, additionalName and familyName."
    },
    "email": {
      "type": "string",
      "description": "Email address of the User, used to log in."
    },
    "phone": {
      "type": "string",
      "description": "User telephone number."
    },
    "password": {
      "type": "string",
      "description": "Login password for the User."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar URL for the User."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization the user belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "role": {
      "type": "string",
      "enum": [
        "agent",
        "admin",
        "owner"
      ],
      "default": "agent",
      "description": "The role of the agent within the organization."
    },
    "settings": {
      "type": "object",
      "properties": {
        "timezone": {
          "type": "string",
          "description": "Timezone preference for displaying relative dates/times, specified as one of the Zones in the IANA Time Zone Database (https://www.iana.org/time-zones). If not specified, this will be auto-set the first time the user logs in."
        },
        "timezoneSet": {
          "type": "boolean",
          "description": "Boolean indicating that the timezone has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "locale": {
          "type": "string",
          "enum": [
            "en",
            "nl",
            "de",
            "fr"
          ],
          "default": "en",
          "description": "ISO 639-1 language code. If not specified, this setting will be inferred by the system based on user-agent settings and/or user IP location."
        },
        "localeSet": {
          "type": "boolean",
          "description": "Boolean indicating that the locale has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "audioOnChat": {
          "type": "boolean",
          "description": "Boolean to bleep on queue increments.",
          "default": true
        },
        "audioOnMessage": {
          "type": "boolean",
          "description": "Boolean to bleep on new messages.",
          "default": false
        },
        "notifyOnChat": {
          "type": "boolean",
          "description": "Boolean to show desktop notifications on queue increments.",
          "default": false
        },
        "notifyOnMessage": {
          "type": "boolean",
          "description": "Boolean to show a desktop notification on each incoming message.",
          "default": false
        },
        "tabdotNotify": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on queued conversations.",
          "default": true
        },
        "tabdotMessage": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on unread messages.",
          "default": true
        },
        "pushNotify": {
          "type": "boolean",
          "description": "Boolean to enable mobile push inbox notifications.",
          "default": false
        },
        "focusOnAccept": {
          "type": "boolean",
          "description": "Boolean to activate conversations after accepting. Defaults to true for level2+ agents, false for top-level agents.",
          "default": false
        },
        "notifications": {
          "type": "array",
          "description": "List of notification roles for the user."
        },
        "cannedResponses": {
          "type": "array",
          "description": "List of canned responses."
        }
      },
      "description": "User preferences."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "invited",
        "active",
        "archived"
      ],
      "default": "queued",
      "description": "The status of the user for given organization."
    },
    "apiToken": {
      "type": "string",
      "description": "API key for role 'bot' users."
    },
    "lastLogin": {
      "type": "string",
      "description": "ISO8601 date and time of when the user last logged in."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the user was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the user was last modified."
    }
  },
  "required": [
    "email"
  ]
}

Retrieve user organizations
GET/users/me/organizations

Return a list of currently authenticated user organizations.

Example URI

GET https://api.web1on1.chat/v2/users/me/organizations
Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "57c8479433f5d57d3013a0bc",
  "organizations": [
    {
      "organization": "55dcf8aa048ee2227d4aa1a4",
      "role": "agent",
      "selected": true
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the user."
    },
    "organizations": {
      "type": "array",
      "description": "A list of user organizations (boolean)."
    }
  }
}

Remove organization from user
DELETE/users/{user_id}/organizations/{organization_id}

Remove user from organizations list.

Example URI

DELETE https://api.web1on1.chat/v2/users/user_id/organizations/organization_id
URI Parameters
HideShow
user_id
string (required) 

ID of the User.

organization_id
string (required) 

ID of the Organization.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Delete a User
DELETE/users/{user_id}

Sets the archived bit for a User, which will prevent it from coming up in listings and search results, but will keep internal references intact to preserve system data integrity.

Example URI

DELETE https://api.web1on1.chat/v2/users/user_id
URI Parameters
HideShow
user_id
number (required) 

ID of the User, or the string ‘me’ to return the current user.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

User Avatar

Upload a User Avatar
POST/users/{user_id}/avatar

Upload a user profile image into cloud storage. The image will be resized and cropped.

Example URI

POST https://api.web1on1.chat/v2/users/user_id/avatar
URI Parameters
HideShow
user_id
string (required) 

ID of the User.

Request
HideShow
Headers
Content-Type: multipart/form-data;boundary=---BOUNDARY
Authorization: Bearer <token>
Body
---BOUNDARY--
Content-Disposition: form-data; name="file"; filename="photo.jpg"
Content-Type: image/jpeg
Content-Transfer-Encoding: base64

/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAABAAEDASIA
AhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFAEB
AAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AL+AD//Z
-----BOUNDARY
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": "57c8479433f5d57d3013a0bc",
  "familyName": "Vries",
  "givenName": "Hans",
  "additionalName": "de",
  "displayName": "Hans de Vries",
  "email": "jeff@jeffdoe.com",
  "phone": "+31209876543",
  "password": "z3krUt",
  "avatar": "http://yoursite.com/images/avatar.png",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "role": "agent",
  "settings": {
    "timezone": "Europe/Amsterdam",
    "timezoneSet": true,
    "locale": "en",
    "localeSet": true,
    "audioOnChat": true,
    "audioOnMessage": true,
    "notifyOnChat": true,
    "notifyOnMessage": true,
    "tabdotNotify": true,
    "tabdotMessage": true,
    "pushNotify": true,
    "focusOnAccept": true,
    "notifications": [
      "technical",
      "billing",
      "reporting",
      "knowledge",
      "results"
    ],
    "cannedResponses": [
      "What is your name?",
      "Thank you {{ givenName }}"
    ]
  },
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "status": "queued",
  "apiToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXV",
  "lastLogin": "2016-08-05T08:40:51.620Z",
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the user."
    },
    "familyName": {
      "type": "string",
      "description": "Family name or surname. In the U.S. and most of Europe, the last name of an User. This can be used along with givenName instead of the displayName property."
    },
    "givenName": {
      "type": "string",
      "description": "Given name. In the U.S. and most of Europe, the first name of a User. This can be used along with familyName instead of the displayName property."
    },
    "additionalName": {
      "type": "string",
      "description": "An additional name for a User, can be used for a middle name."
    },
    "displayName": {
      "type": "string",
      "description": "Name of the User as it will be displayed in user interfaces. If not provided, this will be composed by concatenating givenName, additionalName and familyName."
    },
    "email": {
      "type": "string",
      "description": "Email address of the User, used to log in."
    },
    "phone": {
      "type": "string",
      "description": "User telephone number."
    },
    "password": {
      "type": "string",
      "description": "Login password for the User."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar URL for the User."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization the user belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "role": {
      "type": "string",
      "enum": [
        "agent",
        "admin",
        "owner"
      ],
      "default": "agent",
      "description": "The role of the agent within the organization."
    },
    "settings": {
      "type": "object",
      "properties": {
        "timezone": {
          "type": "string",
          "description": "Timezone preference for displaying relative dates/times, specified as one of the Zones in the IANA Time Zone Database (https://www.iana.org/time-zones). If not specified, this will be auto-set the first time the user logs in."
        },
        "timezoneSet": {
          "type": "boolean",
          "description": "Boolean indicating that the timezone has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "locale": {
          "type": "string",
          "enum": [
            "en",
            "nl",
            "de",
            "fr"
          ],
          "default": "en",
          "description": "ISO 639-1 language code. If not specified, this setting will be inferred by the system based on user-agent settings and/or user IP location."
        },
        "localeSet": {
          "type": "boolean",
          "description": "Boolean indicating that the locale has been manually set by the user (as opposed to inferred by the system).",
          "default": false
        },
        "audioOnChat": {
          "type": "boolean",
          "description": "Boolean to bleep on queue increments.",
          "default": true
        },
        "audioOnMessage": {
          "type": "boolean",
          "description": "Boolean to bleep on new messages.",
          "default": false
        },
        "notifyOnChat": {
          "type": "boolean",
          "description": "Boolean to show desktop notifications on queue increments.",
          "default": false
        },
        "notifyOnMessage": {
          "type": "boolean",
          "description": "Boolean to show a desktop notification on each incoming message.",
          "default": false
        },
        "tabdotNotify": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on queued conversations.",
          "default": true
        },
        "tabdotMessage": {
          "type": "boolean",
          "description": "Boolean to show a browser tab notification on unread messages.",
          "default": true
        },
        "pushNotify": {
          "type": "boolean",
          "description": "Boolean to enable mobile push inbox notifications.",
          "default": false
        },
        "focusOnAccept": {
          "type": "boolean",
          "description": "Boolean to activate conversations after accepting. Defaults to true for level2+ agents, false for top-level agents.",
          "default": false
        },
        "notifications": {
          "type": "array",
          "description": "List of notification roles for the user."
        },
        "cannedResponses": {
          "type": "array",
          "description": "List of canned responses."
        }
      },
      "description": "User preferences."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "invited",
        "active",
        "archived"
      ],
      "default": "queued",
      "description": "The status of the user for given organization."
    },
    "apiToken": {
      "type": "string",
      "description": "API key for role 'bot' users."
    },
    "lastLogin": {
      "type": "string",
      "description": "ISO8601 date and time of when the user last logged in."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the user was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the user was last modified."
    }
  },
  "required": [
    "email"
  ]
}

Delete the User Avatar
DELETE/users/{user_id}/avatar

Delete the avatar image from cloud storage and set the User’s avatar property to null.

Example URI

DELETE https://api.web1on1.chat/v2/users/user_id/avatar
URI Parameters
HideShow
user_id
string (required) 

ID of the User.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Organizations

The Organization resource represents a company on behalf of which chats are performed.

Organizations are the primary resource in the Web1on1 system. Other resources are tied to exactly one organization.

An Organization record has the following attributes:

Property Type Description Example
id string The unique ID of the Organization. 56467a06d9b082b0059151dc
name string* The name of the Organization. Acme Inc.
displayName string Representative name of the Organization, to be used in external communications like chat widgets. Defaults to Organization name. Acme Inc.
status enum Organization status. One of queued, active, pendingArchive, archived. Defaults to active. queued
email string An email address for users to contact support in case of any issues with the organization. support@example.com
url string The URL of the Organization’s corporate website. https://example.com
logo string The URL of the Organization’s logo image. https://example.com/logo.png
country string The two-letter ISO 3166 country code of the Organization’s headquarters. NL
locale enum ISO 639-1 two-letter language code. One of en, nl, de, fr. Defaults to en. en
timezone string Timezone of the Organizational HQ, as specified in the IANA time zone (Olson) database. Default: Europe/Amsterdam. Europe/Amsterdam
industry string The industry the Organization is in. automotive
settings OrganizationSettings Configuration settings for the organization. {OrganizationSettings}
aliases array User avatars and aliases to use instead of real names. [{Alias}]
categories array List of categories and form mappings, used in the agent UI. [{Category Full}]
profileFields ProfileFields An object mirroring the contact profile, representing profile field labels for various locales. {ProfileFields}
stopwords array List of words that should not be used in any communication on behalf of the Organization. [foo]
commands array List of custom (bot) commands that should be made available to the agent. [intakebot]
tags array List of keywords/tags for the organization. [automotive]
domainPrefix string The white label subdomain part for the organization. skynet
domain string The white label domain for the organization. chat.report
partners array Partner organizations to allow access to conversations. [{Partner}]
whitelist array List of emails and domains for which agent self-registration is allowed. [john@example.org]
defaultRole enum Self-registering agent role. One of guest, agent. Defaults to guest. guest
dataRetention DataRetention An object specifying record expiration and purge time. {DataRetention}
billingInfo BillingInfo* An object specifying the organization billing settings. {BillingInfo}
emailAs string An email ‘from’ sender address for results notifications. results@example.com
meta MetaParams Free-form object of key-values, that will be passed on to external systems, eg in webhook data. {MetaParams}
createdAt string ISO8601 date and time of when the Organization was created. 2016-01-07T14:03:43Z
updatedAt string ISO8601 date and time of when the Organization was last modified. 2016-01-07T14:03:43Z

Settings

The settings attribute is an object specifying configuration settings for the organization.

Settings have the following properties:

Property Type Description Example
routeOnReply enum Determines how recurring visitors to same-agent are dispatched. One of accept, assign, route. Defaults to accept. accept
enableMail boolean Flag signifying if email notifications are sent to organization admins. Defaults to true. true

Categories

The categories attribute specifies which categories, and for each category which forms are used in the agent console. Each organization may have up to 10 categories, and each category occupies one of 10 ‘slots’ in the category list. Each slot is represented by a color in the UI. A category may be null, meaning the slot is not occupied.

Categories may be managed by the categories organization sub-resource. To change the category order, however, or to replace null-value slots with actual categories, the Organization resource itself needs to be updated (using PATCH /organizations/:id).

Each category has the following properties:

Property Type Description Example
id string The unique ID of the Category. 5877a5ecb6b1bc76263e0a85
name string* The name of the Category. Used Car
forms array A list of Form IDs that may be used for this category. [55dcf8aa048ee2227d4aa1a4]
tags array List of keywords/tags for the category. [automotive]

Profile Fields

The profileFields attribute specifies which contact profile fields are used by the organization. This object mirrors the data structure of the contact profile.

Property Type Description Example
name ProfileFieldLabel Label for full name of the contact. {ProfileFieldLabel}
initials ProfileFieldLabel Label for contact initials. {ProfileFieldLabel}
givenName ProfileFieldLabel Label for contact given name or first name. {ProfileFieldLabel}
familyName ProfileFieldLabel Label for contact family name or surname. {ProfileFieldLabel}
additionalName ProfileFieldLabel Label for contact middle name, if applicable. {ProfileFieldLabel}
honorificPrefix ProfileFieldLabel Label for name prefix. {ProfileFieldLabel}
honorificSuffix ProfileFieldLabel Label for name suffix. {ProfileFieldLabel}
gender ProfileFieldLabelEnum Label for contact biological sex. {ProfileFieldLabelEnum}
address ProfileFieldsAddress Address labels object. {ProfileFieldsAddress}
telephone ProfileFieldLabel Label for contact telephone number. {ProfileFieldLabel}
email ProfileFieldLabel Label for contact email address. {ProfileFieldLabel}
worksFor ProfileFieldLabel Label for organization that the contact represents. {ProfileFieldLabel}

The address object has the following properties:

Property Type Description Example
streetAddress ProfileFieldLabel Label for address street name. {ProfileFieldLabel}
streetNumber ProfileFieldLabel Label for address street number. {ProfileFieldLabel}
addressLocality ProfileFieldLabel Label for city or town. {ProfileFieldLabel}
addressRegion ProfileFieldLabel Label for region. {ProfileFieldLabel}
postalCode ProfileFieldLabel Label for address location zip/postal code. {ProfileFieldLabel}
addressCountry ProfileFieldLabel Label for country. {ProfileFieldLabel}

Each field is an object with the following properties:

Property Type Description Example
label string* A label for the profile field. Field Label
options array An array of option labels, only applicable to the gender profile field. [male]
enabled boolean Flag signifying if this localized label is enabled. Defaults to true. true

BillingInfo

The billingInfo attribute specifies the billing settings for the organization.

Property Type Description Example
billReceiver string* Organzation paying for the invoice. {string}
billSender string* Organzation who is ending the invoice. {string}
trialEndsOn string ISO8601 date and time of when the Organization trial has ended. 2016-01-07T14:03:43Z
stripeCustomerId string* Customer id in Stripe. cus_KlieDvHuODgU3u
liveMode boolean Used enviroment in Stripe (development or live). Defaults to true. true
moveToLive boolean Flag if organization must be moved to live enviroment in Stripe. Defaults to false. false
w1on1ResultId string Alternative product id in Stripe for agent results. {string}
daysUntilDue number Due days for invoicing (default 14). 14
meta MetaParams Free-form object of key-values. {MetaParams}
enableMecs boolean Option to disable Mecs in Stripe. Defaults to false. false
enableAmp boolean Option to disable AMP licence in Stripe. Defaults to false. false
enableSepaDebitCosts boolean Option to disable Sepa Debit costs in Stripe. Defaults to false. false
version number Billing version for that organization (can be 1 or 2) 1
currentPlan string* Current plan used for version 2 (can be base, grow or scale). scale

List All Organizations
GET/organizations

Return a list of all organizations.

Example URI

GET https://api.web1on1.chat/v2/organizations
Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "56467a06d9b082b0059151dc",
    "name": "Acme Inc.",
    "displayName": "Acme Inc.",
    "status": "queued",
    "email": "support@example.com",
    "url": "https://example.com",
    "logo": "https://example.com/logo.png",
    "country": "NL",
    "locale": "en",
    "timezone": "Europe/Amsterdam",
    "industry": "automotive",
    "settings": {
      "routeOnReply": "accept",
      "enableMail": true
    },
    "aliases": [
      {
        "name": "Alexandra",
        "avatar": "https://cdn.web1on1.chat/avatars/female/smiling"
      }
    ],
    "categories": [
      {
        "id": "5877a5ecb6b1bc76263e0a85",
        "name": "Used Car",
        "forms": [
          "55dcf8aa048ee2227d4aa1a4",
          "55dcf8aa048ee2227d4aa1b6"
        ],
        "tags": [
          "automotive",
          "insurance"
        ]
      }
    ],
    "profileFields": {
      "name": {
        "label": "Field Label",
        "enabled": true
      },
      "initials": {
        "label": "Field Label",
        "enabled": true
      },
      "givenName": {
        "label": "Field Label",
        "enabled": true
      },
      "familyName": {
        "label": "Field Label",
        "enabled": true
      },
      "additionalName": {
        "label": "Field Label",
        "enabled": true
      },
      "honorificPrefix": {
        "label": "Field Label",
        "enabled": true
      },
      "honorificSuffix": {
        "label": "Field Label",
        "enabled": true
      },
      "gender": {
        "label": "Field Label",
        "options": [
          "male",
          "female"
        ],
        "enabled": true
      },
      "address": {
        "streetAddress": {
          "label": "Field Label",
          "enabled": true
        },
        "streetNumber": {
          "label": "Field Label",
          "enabled": true
        },
        "addressLocality": {
          "label": "Field Label",
          "enabled": true
        },
        "addressRegion": {
          "label": "Field Label",
          "enabled": true
        },
        "postalCode": {
          "label": "Field Label",
          "enabled": true
        },
        "addressCountry": {
          "label": "Field Label",
          "enabled": true
        }
      },
      "telephone": {
        "label": "Field Label",
        "enabled": true
      },
      "email": {
        "label": "Field Label",
        "enabled": true
      },
      "worksFor": {
        "label": "Field Label",
        "enabled": true
      }
    },
    "stopwords": [
      "foo",
      "bar"
    ],
    "commands": [
      "intakebot",
      "surveybot"
    ],
    "tags": [
      "automotive",
      "insurance"
    ],
    "domainPrefix": "skynet",
    "domain": "chat.report",
    "partners": [
      {
        "organization": "5b2bf9dd27fe8b715d64ee30",
        "permission": "guest"
      }
    ],
    "whitelist": [
      "john@example.org",
      "example.com"
    ],
    "defaultRole": "guest",
    "dataRetention": {
      "length": 18,
      "unit": "month"
    },
    "billingInfo": {
      "billReceiver": "Hello, world!",
      "billSender": "Hello, world!",
      "trialEndsOn": "2016-01-07T14:03:43Z",
      "stripeCustomerId": "cus_KlieDvHuODgU3u",
      "liveMode": true,
      "moveToLive": true,
      "w1on1ResultId": "Hello, world!",
      "daysUntilDue": 14,
      "meta": {
        "someKey": "Some value",
        "anotherKey": "Some other value"
      },
      "enableMecs": true,
      "enableAmp": true,
      "enableSepaDebitCosts": true,
      "version": 1,
      "currentPlan": "scale"
    },
    "emailAs": "results@example.com",
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "createdAt": "2016-01-07T14:03:43Z",
    "updatedAt": "2016-01-07T14:03:43Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create a New Organization
POST/organizations

You may create a organization using this action.

Example URI

POST https://api.web1on1.chat/v2/organizations
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "name": "Acme Inc.",
  "displayName": "Acme Inc.",
  "status": "queued",
  "email": "support@example.com",
  "url": "https://example.com",
  "logo": "https://example.com/logo.png",
  "country": "NL",
  "locale": "en",
  "timezone": "Europe/Amsterdam",
  "industry": "automotive",
  "settings": {
    "routeOnReply": "accept",
    "enableMail": true
  },
  "aliases": [
    {
      "name": "Alexandra",
      "avatar": "https://cdn.web1on1.chat/avatars/female/smiling"
    }
  ],
  "categories": [
    {
      "id": "5877a5ecb6b1bc76263e0a85",
      "name": "Used Car",
      "forms": [
        "55dcf8aa048ee2227d4aa1a4",
        "55dcf8aa048ee2227d4aa1b6"
      ],
      "tags": [
        "automotive",
        "insurance"
      ]
    }
  ],
  "profileFields": {
    "name": {
      "label": "Field Label",
      "enabled": true
    },
    "initials": {
      "label": "Field Label",
      "enabled": true
    },
    "givenName": {
      "label": "Field Label",
      "enabled": true
    },
    "familyName": {
      "label": "Field Label",
      "enabled": true
    },
    "additionalName": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificPrefix": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificSuffix": {
      "label": "Field Label",
      "enabled": true
    },
    "gender": {
      "label": "Field Label",
      "options": [
        "male",
        "female"
      ],
      "enabled": true
    },
    "address": {
      "streetAddress": {
        "label": "Field Label",
        "enabled": true
      },
      "streetNumber": {
        "label": "Field Label",
        "enabled": true
      },
      "addressLocality": {
        "label": "Field Label",
        "enabled": true
      },
      "addressRegion": {
        "label": "Field Label",
        "enabled": true
      },
      "postalCode": {
        "label": "Field Label",
        "enabled": true
      },
      "addressCountry": {
        "label": "Field Label",
        "enabled": true
      }
    },
    "telephone": {
      "label": "Field Label",
      "enabled": true
    },
    "email": {
      "label": "Field Label",
      "enabled": true
    },
    "worksFor": {
      "label": "Field Label",
      "enabled": true
    }
  },
  "stopwords": [
    "foo",
    "bar"
  ],
  "commands": [
    "intakebot",
    "surveybot"
  ],
  "tags": [
    "automotive",
    "insurance"
  ],
  "domainPrefix": "skynet",
  "domain": "chat.report",
  "partners": [
    {
      "organization": "5b2bf9dd27fe8b715d64ee30",
      "permission": "guest"
    }
  ],
  "whitelist": [
    "john@example.org",
    "example.com"
  ],
  "defaultRole": "guest",
  "dataRetention": {
    "length": 18,
    "unit": "month"
  },
  "billingInfo": {
    "billReceiver": "Hello, world!",
    "billSender": "Hello, world!",
    "trialEndsOn": "2016-01-07T14:03:43Z",
    "stripeCustomerId": "cus_KlieDvHuODgU3u",
    "liveMode": true,
    "moveToLive": true,
    "w1on1ResultId": "Hello, world!",
    "daysUntilDue": 14,
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "enableMecs": true,
    "enableAmp": true,
    "enableSepaDebitCosts": true,
    "version": 1,
    "currentPlan": "scale"
  },
  "emailAs": "results@example.com",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the Organization."
    },
    "displayName": {
      "type": "string",
      "description": "Representative name of the Organization, to be used in external communications like chat widgets. Defaults to Organization name."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "pendingArchive",
        "archived"
      ],
      "default": "active",
      "description": "Organization status."
    },
    "email": {
      "type": "string",
      "description": "An email address for users to contact support in case of any issues with the organization."
    },
    "url": {
      "type": "string",
      "description": "The URL of the Organization's corporate website."
    },
    "logo": {
      "type": "string",
      "description": "The URL of the Organization's logo image."
    },
    "country": {
      "type": "string",
      "description": "The two-letter ISO 3166 country code of the Organization's headquarters."
    },
    "locale": {
      "type": "string",
      "enum": [
        "en",
        "nl",
        "de",
        "fr"
      ],
      "default": "en",
      "description": "ISO 639-1 two-letter language code."
    },
    "timezone": {
      "type": "string",
      "description": "Timezone of the Organizational HQ, as specified in the IANA time zone (Olson) database. Default: Europe/Amsterdam."
    },
    "industry": {
      "type": "string",
      "description": "The industry the Organization is in."
    },
    "settings": {
      "type": "object",
      "properties": {
        "routeOnReply": {
          "type": "string",
          "enum": [
            "accept",
            "assign",
            "route"
          ],
          "default": "accept",
          "description": "Determines how recurring visitors to same-agent are dispatched."
        },
        "enableMail": {
          "type": "boolean",
          "description": "Flag signifying if email notifications are sent to organization admins.",
          "default": true
        }
      },
      "description": "Configuration settings for the organization."
    },
    "aliases": {
      "type": "array",
      "description": "User avatars and aliases to use instead of real names."
    },
    "categories": {
      "type": "array",
      "description": "List of categories and form mappings, used in the agent UI."
    },
    "profileFields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for full name of the contact."
        },
        "initials": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact initials."
        },
        "givenName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact given name or first name."
        },
        "familyName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact family name or surname."
        },
        "additionalName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact middle name, if applicable."
        },
        "honorificPrefix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name prefix."
        },
        "honorificSuffix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name suffix."
        },
        "gender": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "options": {
              "type": "array",
              "description": "An array of option labels, only applicable to the `gender` profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact biological sex."
        },
        "address": {
          "type": "object",
          "properties": {
            "streetAddress": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street name."
            },
            "streetNumber": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street number."
            },
            "addressLocality": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for city or town."
            },
            "addressRegion": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for region."
            },
            "postalCode": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address location zip/postal code."
            },
            "addressCountry": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for country."
            }
          },
          "description": "Address labels object."
        },
        "telephone": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact telephone number."
        },
        "email": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact email address."
        },
        "worksFor": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for organization that the contact represents."
        }
      },
      "description": "An object mirroring the contact profile, representing profile field labels for various locales."
    },
    "stopwords": {
      "type": "array",
      "description": "List of words that should not be used in any communication on behalf of the Organization."
    },
    "commands": {
      "type": "array",
      "description": "List of custom (bot) commands that should be made available to the agent."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the organization."
    },
    "domainPrefix": {
      "type": "string",
      "description": "The white label subdomain part for the organization."
    },
    "domain": {
      "type": "string",
      "description": "The white label domain for the organization."
    },
    "partners": {
      "type": "array",
      "description": "Partner organizations to allow access to conversations."
    },
    "whitelist": {
      "type": "array",
      "description": "List of emails and domains for which agent self-registration is allowed."
    },
    "defaultRole": {
      "type": "string",
      "enum": [
        "guest",
        "agent"
      ],
      "default": "guest",
      "description": "Self-registering agent role."
    },
    "dataRetention": {
      "type": "object",
      "properties": {
        "length": {
          "type": "number",
          "description": "The number of units for the time interval."
        },
        "unit": {
          "type": "string",
          "enum": [
            "month",
            "year"
          ],
          "default": "month",
          "description": "The unit of time measured."
        }
      },
      "description": "An object specifying record expiration and purge time."
    },
    "billingInfo": {
      "type": "object",
      "properties": {
        "billReceiver": {
          "type": "string",
          "description": "Organzation paying for the invoice."
        },
        "billSender": {
          "type": "string",
          "description": "Organzation who is ending the invoice."
        },
        "trialEndsOn": {
          "type": "string",
          "description": "ISO8601 date and time of when the Organization trial has ended."
        },
        "stripeCustomerId": {
          "type": "string",
          "description": "Customer id in Stripe."
        },
        "liveMode": {
          "type": "boolean",
          "description": "Used enviroment in Stripe (development or live).",
          "default": true
        },
        "moveToLive": {
          "type": "boolean",
          "description": "Flag if organization must be moved to live enviroment in Stripe.",
          "default": false
        },
        "w1on1ResultId": {
          "type": "string",
          "description": "Alternative product id in Stripe for agent results."
        },
        "daysUntilDue": {
          "type": "number",
          "description": "Due days for invoicing (default 14)."
        },
        "meta": {
          "type": "object",
          "properties": {
            "someKey": {
              "type": "string",
              "description": "An example of a free-form key/value pair."
            },
            "anotherKey": {
              "type": "string",
              "description": "Another example of a free-form key/value pair."
            }
          },
          "description": "Free-form object of key-values."
        },
        "enableMecs": {
          "type": "boolean",
          "description": "Option to disable Mecs in Stripe.",
          "default": false
        },
        "enableAmp": {
          "type": "boolean",
          "description": "Option to disable AMP licence in Stripe.",
          "default": false
        },
        "enableSepaDebitCosts": {
          "type": "boolean",
          "description": "Option to disable Sepa Debit costs in Stripe.",
          "default": false
        },
        "version": {
          "type": "number",
          "description": "Billing version for that organization (can be 1 or 2)"
        },
        "currentPlan": {
          "type": "string",
          "description": "Current plan used for version 2 (can be base, grow or scale)."
        }
      },
      "required": [
        "billReceiver",
        "billSender",
        "stripeCustomerId",
        "currentPlan"
      ],
      "description": "An object specifying the organization billing settings."
    },
    "emailAs": {
      "type": "string",
      "description": "An email 'from' sender address for results notifications."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    }
  },
  "required": [
    "name",
    "billingInfo"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /organizations/56467a06d9b082b0059151dc
Body
{
  "id": "56467a06d9b082b0059151dc",
  "name": "Acme Inc.",
  "displayName": "Acme Inc.",
  "status": "queued",
  "email": "support@example.com",
  "url": "https://example.com",
  "logo": "https://example.com/logo.png",
  "country": "NL",
  "locale": "en",
  "timezone": "Europe/Amsterdam",
  "industry": "automotive",
  "settings": {
    "routeOnReply": "accept",
    "enableMail": true
  },
  "aliases": [
    {
      "name": "Alexandra",
      "avatar": "https://cdn.web1on1.chat/avatars/female/smiling"
    }
  ],
  "categories": [
    {
      "id": "5877a5ecb6b1bc76263e0a85",
      "name": "Used Car",
      "forms": [
        "55dcf8aa048ee2227d4aa1a4",
        "55dcf8aa048ee2227d4aa1b6"
      ],
      "tags": [
        "automotive",
        "insurance"
      ]
    }
  ],
  "profileFields": {
    "name": {
      "label": "Field Label",
      "enabled": true
    },
    "initials": {
      "label": "Field Label",
      "enabled": true
    },
    "givenName": {
      "label": "Field Label",
      "enabled": true
    },
    "familyName": {
      "label": "Field Label",
      "enabled": true
    },
    "additionalName": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificPrefix": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificSuffix": {
      "label": "Field Label",
      "enabled": true
    },
    "gender": {
      "label": "Field Label",
      "options": [
        "male",
        "female"
      ],
      "enabled": true
    },
    "address": {
      "streetAddress": {
        "label": "Field Label",
        "enabled": true
      },
      "streetNumber": {
        "label": "Field Label",
        "enabled": true
      },
      "addressLocality": {
        "label": "Field Label",
        "enabled": true
      },
      "addressRegion": {
        "label": "Field Label",
        "enabled": true
      },
      "postalCode": {
        "label": "Field Label",
        "enabled": true
      },
      "addressCountry": {
        "label": "Field Label",
        "enabled": true
      }
    },
    "telephone": {
      "label": "Field Label",
      "enabled": true
    },
    "email": {
      "label": "Field Label",
      "enabled": true
    },
    "worksFor": {
      "label": "Field Label",
      "enabled": true
    }
  },
  "stopwords": [
    "foo",
    "bar"
  ],
  "commands": [
    "intakebot",
    "surveybot"
  ],
  "tags": [
    "automotive",
    "insurance"
  ],
  "domainPrefix": "skynet",
  "domain": "chat.report",
  "partners": [
    {
      "organization": "5b2bf9dd27fe8b715d64ee30",
      "permission": "guest"
    }
  ],
  "whitelist": [
    "john@example.org",
    "example.com"
  ],
  "defaultRole": "guest",
  "dataRetention": {
    "length": 18,
    "unit": "month"
  },
  "billingInfo": {
    "billReceiver": "Hello, world!",
    "billSender": "Hello, world!",
    "trialEndsOn": "2016-01-07T14:03:43Z",
    "stripeCustomerId": "cus_KlieDvHuODgU3u",
    "liveMode": true,
    "moveToLive": true,
    "w1on1ResultId": "Hello, world!",
    "daysUntilDue": 14,
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "enableMecs": true,
    "enableAmp": true,
    "enableSepaDebitCosts": true,
    "version": 1,
    "currentPlan": "scale"
  },
  "emailAs": "results@example.com",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Organization."
    },
    "name": {
      "type": "string",
      "description": "The name of the Organization."
    },
    "displayName": {
      "type": "string",
      "description": "Representative name of the Organization, to be used in external communications like chat widgets. Defaults to Organization name."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "pendingArchive",
        "archived"
      ],
      "default": "active",
      "description": "Organization status."
    },
    "email": {
      "type": "string",
      "description": "An email address for users to contact support in case of any issues with the organization."
    },
    "url": {
      "type": "string",
      "description": "The URL of the Organization's corporate website."
    },
    "logo": {
      "type": "string",
      "description": "The URL of the Organization's logo image."
    },
    "country": {
      "type": "string",
      "description": "The two-letter ISO 3166 country code of the Organization's headquarters."
    },
    "locale": {
      "type": "string",
      "enum": [
        "en",
        "nl",
        "de",
        "fr"
      ],
      "default": "en",
      "description": "ISO 639-1 two-letter language code."
    },
    "timezone": {
      "type": "string",
      "description": "Timezone of the Organizational HQ, as specified in the IANA time zone (Olson) database. Default: Europe/Amsterdam."
    },
    "industry": {
      "type": "string",
      "description": "The industry the Organization is in."
    },
    "settings": {
      "type": "object",
      "properties": {
        "routeOnReply": {
          "type": "string",
          "enum": [
            "accept",
            "assign",
            "route"
          ],
          "default": "accept",
          "description": "Determines how recurring visitors to same-agent are dispatched."
        },
        "enableMail": {
          "type": "boolean",
          "description": "Flag signifying if email notifications are sent to organization admins.",
          "default": true
        }
      },
      "description": "Configuration settings for the organization."
    },
    "aliases": {
      "type": "array",
      "description": "User avatars and aliases to use instead of real names."
    },
    "categories": {
      "type": "array",
      "description": "List of categories and form mappings, used in the agent UI."
    },
    "profileFields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for full name of the contact."
        },
        "initials": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact initials."
        },
        "givenName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact given name or first name."
        },
        "familyName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact family name or surname."
        },
        "additionalName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact middle name, if applicable."
        },
        "honorificPrefix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name prefix."
        },
        "honorificSuffix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name suffix."
        },
        "gender": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "options": {
              "type": "array",
              "description": "An array of option labels, only applicable to the `gender` profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact biological sex."
        },
        "address": {
          "type": "object",
          "properties": {
            "streetAddress": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street name."
            },
            "streetNumber": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street number."
            },
            "addressLocality": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for city or town."
            },
            "addressRegion": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for region."
            },
            "postalCode": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address location zip/postal code."
            },
            "addressCountry": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for country."
            }
          },
          "description": "Address labels object."
        },
        "telephone": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact telephone number."
        },
        "email": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact email address."
        },
        "worksFor": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for organization that the contact represents."
        }
      },
      "description": "An object mirroring the contact profile, representing profile field labels for various locales."
    },
    "stopwords": {
      "type": "array",
      "description": "List of words that should not be used in any communication on behalf of the Organization."
    },
    "commands": {
      "type": "array",
      "description": "List of custom (bot) commands that should be made available to the agent."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the organization."
    },
    "domainPrefix": {
      "type": "string",
      "description": "The white label subdomain part for the organization."
    },
    "domain": {
      "type": "string",
      "description": "The white label domain for the organization."
    },
    "partners": {
      "type": "array",
      "description": "Partner organizations to allow access to conversations."
    },
    "whitelist": {
      "type": "array",
      "description": "List of emails and domains for which agent self-registration is allowed."
    },
    "defaultRole": {
      "type": "string",
      "enum": [
        "guest",
        "agent"
      ],
      "default": "guest",
      "description": "Self-registering agent role."
    },
    "dataRetention": {
      "type": "object",
      "properties": {
        "length": {
          "type": "number",
          "description": "The number of units for the time interval."
        },
        "unit": {
          "type": "string",
          "enum": [
            "month",
            "year"
          ],
          "default": "month",
          "description": "The unit of time measured."
        }
      },
      "description": "An object specifying record expiration and purge time."
    },
    "billingInfo": {
      "type": "object",
      "properties": {
        "billReceiver": {
          "type": "string",
          "description": "Organzation paying for the invoice."
        },
        "billSender": {
          "type": "string",
          "description": "Organzation who is ending the invoice."
        },
        "trialEndsOn": {
          "type": "string",
          "description": "ISO8601 date and time of when the Organization trial has ended."
        },
        "stripeCustomerId": {
          "type": "string",
          "description": "Customer id in Stripe."
        },
        "liveMode": {
          "type": "boolean",
          "description": "Used enviroment in Stripe (development or live).",
          "default": true
        },
        "moveToLive": {
          "type": "boolean",
          "description": "Flag if organization must be moved to live enviroment in Stripe.",
          "default": false
        },
        "w1on1ResultId": {
          "type": "string",
          "description": "Alternative product id in Stripe for agent results."
        },
        "daysUntilDue": {
          "type": "number",
          "description": "Due days for invoicing (default 14)."
        },
        "meta": {
          "type": "object",
          "properties": {
            "someKey": {
              "type": "string",
              "description": "An example of a free-form key/value pair."
            },
            "anotherKey": {
              "type": "string",
              "description": "Another example of a free-form key/value pair."
            }
          },
          "description": "Free-form object of key-values."
        },
        "enableMecs": {
          "type": "boolean",
          "description": "Option to disable Mecs in Stripe.",
          "default": false
        },
        "enableAmp": {
          "type": "boolean",
          "description": "Option to disable AMP licence in Stripe.",
          "default": false
        },
        "enableSepaDebitCosts": {
          "type": "boolean",
          "description": "Option to disable Sepa Debit costs in Stripe.",
          "default": false
        },
        "version": {
          "type": "number",
          "description": "Billing version for that organization (can be 1 or 2)"
        },
        "currentPlan": {
          "type": "string",
          "description": "Current plan used for version 2 (can be base, grow or scale)."
        }
      },
      "required": [
        "billReceiver",
        "billSender",
        "stripeCustomerId",
        "currentPlan"
      ],
      "description": "An object specifying the organization billing settings."
    },
    "emailAs": {
      "type": "string",
      "description": "An email 'from' sender address for results notifications."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization was last modified."
    }
  },
  "required": [
    "name",
    "billingInfo"
  ]
}

Organization

Retrieve an Organization
GET/organizations/{organization_id}

Returns a specific Organization.

Example URI

GET https://api.web1on1.chat/v2/organizations/organization_id
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "56467a06d9b082b0059151dc",
  "name": "Acme Inc.",
  "displayName": "Acme Inc.",
  "status": "queued",
  "email": "support@example.com",
  "url": "https://example.com",
  "logo": "https://example.com/logo.png",
  "country": "NL",
  "locale": "en",
  "timezone": "Europe/Amsterdam",
  "industry": "automotive",
  "settings": {
    "routeOnReply": "accept",
    "enableMail": true
  },
  "aliases": [
    {
      "name": "Alexandra",
      "avatar": "https://cdn.web1on1.chat/avatars/female/smiling"
    }
  ],
  "categories": [
    {
      "id": "5877a5ecb6b1bc76263e0a85",
      "name": "Used Car",
      "forms": [
        "55dcf8aa048ee2227d4aa1a4",
        "55dcf8aa048ee2227d4aa1b6"
      ],
      "tags": [
        "automotive",
        "insurance"
      ]
    }
  ],
  "profileFields": {
    "name": {
      "label": "Field Label",
      "enabled": true
    },
    "initials": {
      "label": "Field Label",
      "enabled": true
    },
    "givenName": {
      "label": "Field Label",
      "enabled": true
    },
    "familyName": {
      "label": "Field Label",
      "enabled": true
    },
    "additionalName": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificPrefix": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificSuffix": {
      "label": "Field Label",
      "enabled": true
    },
    "gender": {
      "label": "Field Label",
      "options": [
        "male",
        "female"
      ],
      "enabled": true
    },
    "address": {
      "streetAddress": {
        "label": "Field Label",
        "enabled": true
      },
      "streetNumber": {
        "label": "Field Label",
        "enabled": true
      },
      "addressLocality": {
        "label": "Field Label",
        "enabled": true
      },
      "addressRegion": {
        "label": "Field Label",
        "enabled": true
      },
      "postalCode": {
        "label": "Field Label",
        "enabled": true
      },
      "addressCountry": {
        "label": "Field Label",
        "enabled": true
      }
    },
    "telephone": {
      "label": "Field Label",
      "enabled": true
    },
    "email": {
      "label": "Field Label",
      "enabled": true
    },
    "worksFor": {
      "label": "Field Label",
      "enabled": true
    }
  },
  "stopwords": [
    "foo",
    "bar"
  ],
  "commands": [
    "intakebot",
    "surveybot"
  ],
  "tags": [
    "automotive",
    "insurance"
  ],
  "domainPrefix": "skynet",
  "domain": "chat.report",
  "partners": [
    {
      "organization": "5b2bf9dd27fe8b715d64ee30",
      "permission": "guest"
    }
  ],
  "whitelist": [
    "john@example.org",
    "example.com"
  ],
  "defaultRole": "guest",
  "dataRetention": {
    "length": 18,
    "unit": "month"
  },
  "billingInfo": {
    "billReceiver": "Hello, world!",
    "billSender": "Hello, world!",
    "trialEndsOn": "2016-01-07T14:03:43Z",
    "stripeCustomerId": "cus_KlieDvHuODgU3u",
    "liveMode": true,
    "moveToLive": true,
    "w1on1ResultId": "Hello, world!",
    "daysUntilDue": 14,
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "enableMecs": true,
    "enableAmp": true,
    "enableSepaDebitCosts": true,
    "version": 1,
    "currentPlan": "scale"
  },
  "emailAs": "results@example.com",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Organization."
    },
    "name": {
      "type": "string",
      "description": "The name of the Organization."
    },
    "displayName": {
      "type": "string",
      "description": "Representative name of the Organization, to be used in external communications like chat widgets. Defaults to Organization name."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "pendingArchive",
        "archived"
      ],
      "default": "active",
      "description": "Organization status."
    },
    "email": {
      "type": "string",
      "description": "An email address for users to contact support in case of any issues with the organization."
    },
    "url": {
      "type": "string",
      "description": "The URL of the Organization's corporate website."
    },
    "logo": {
      "type": "string",
      "description": "The URL of the Organization's logo image."
    },
    "country": {
      "type": "string",
      "description": "The two-letter ISO 3166 country code of the Organization's headquarters."
    },
    "locale": {
      "type": "string",
      "enum": [
        "en",
        "nl",
        "de",
        "fr"
      ],
      "default": "en",
      "description": "ISO 639-1 two-letter language code."
    },
    "timezone": {
      "type": "string",
      "description": "Timezone of the Organizational HQ, as specified in the IANA time zone (Olson) database. Default: Europe/Amsterdam."
    },
    "industry": {
      "type": "string",
      "description": "The industry the Organization is in."
    },
    "settings": {
      "type": "object",
      "properties": {
        "routeOnReply": {
          "type": "string",
          "enum": [
            "accept",
            "assign",
            "route"
          ],
          "default": "accept",
          "description": "Determines how recurring visitors to same-agent are dispatched."
        },
        "enableMail": {
          "type": "boolean",
          "description": "Flag signifying if email notifications are sent to organization admins.",
          "default": true
        }
      },
      "description": "Configuration settings for the organization."
    },
    "aliases": {
      "type": "array",
      "description": "User avatars and aliases to use instead of real names."
    },
    "categories": {
      "type": "array",
      "description": "List of categories and form mappings, used in the agent UI."
    },
    "profileFields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for full name of the contact."
        },
        "initials": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact initials."
        },
        "givenName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact given name or first name."
        },
        "familyName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact family name or surname."
        },
        "additionalName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact middle name, if applicable."
        },
        "honorificPrefix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name prefix."
        },
        "honorificSuffix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name suffix."
        },
        "gender": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "options": {
              "type": "array",
              "description": "An array of option labels, only applicable to the `gender` profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact biological sex."
        },
        "address": {
          "type": "object",
          "properties": {
            "streetAddress": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street name."
            },
            "streetNumber": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street number."
            },
            "addressLocality": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for city or town."
            },
            "addressRegion": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for region."
            },
            "postalCode": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address location zip/postal code."
            },
            "addressCountry": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for country."
            }
          },
          "description": "Address labels object."
        },
        "telephone": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact telephone number."
        },
        "email": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact email address."
        },
        "worksFor": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for organization that the contact represents."
        }
      },
      "description": "An object mirroring the contact profile, representing profile field labels for various locales."
    },
    "stopwords": {
      "type": "array",
      "description": "List of words that should not be used in any communication on behalf of the Organization."
    },
    "commands": {
      "type": "array",
      "description": "List of custom (bot) commands that should be made available to the agent."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the organization."
    },
    "domainPrefix": {
      "type": "string",
      "description": "The white label subdomain part for the organization."
    },
    "domain": {
      "type": "string",
      "description": "The white label domain for the organization."
    },
    "partners": {
      "type": "array",
      "description": "Partner organizations to allow access to conversations."
    },
    "whitelist": {
      "type": "array",
      "description": "List of emails and domains for which agent self-registration is allowed."
    },
    "defaultRole": {
      "type": "string",
      "enum": [
        "guest",
        "agent"
      ],
      "default": "guest",
      "description": "Self-registering agent role."
    },
    "dataRetention": {
      "type": "object",
      "properties": {
        "length": {
          "type": "number",
          "description": "The number of units for the time interval."
        },
        "unit": {
          "type": "string",
          "enum": [
            "month",
            "year"
          ],
          "default": "month",
          "description": "The unit of time measured."
        }
      },
      "description": "An object specifying record expiration and purge time."
    },
    "billingInfo": {
      "type": "object",
      "properties": {
        "billReceiver": {
          "type": "string",
          "description": "Organzation paying for the invoice."
        },
        "billSender": {
          "type": "string",
          "description": "Organzation who is ending the invoice."
        },
        "trialEndsOn": {
          "type": "string",
          "description": "ISO8601 date and time of when the Organization trial has ended."
        },
        "stripeCustomerId": {
          "type": "string",
          "description": "Customer id in Stripe."
        },
        "liveMode": {
          "type": "boolean",
          "description": "Used enviroment in Stripe (development or live).",
          "default": true
        },
        "moveToLive": {
          "type": "boolean",
          "description": "Flag if organization must be moved to live enviroment in Stripe.",
          "default": false
        },
        "w1on1ResultId": {
          "type": "string",
          "description": "Alternative product id in Stripe for agent results."
        },
        "daysUntilDue": {
          "type": "number",
          "description": "Due days for invoicing (default 14)."
        },
        "meta": {
          "type": "object",
          "properties": {
            "someKey": {
              "type": "string",
              "description": "An example of a free-form key/value pair."
            },
            "anotherKey": {
              "type": "string",
              "description": "Another example of a free-form key/value pair."
            }
          },
          "description": "Free-form object of key-values."
        },
        "enableMecs": {
          "type": "boolean",
          "description": "Option to disable Mecs in Stripe.",
          "default": false
        },
        "enableAmp": {
          "type": "boolean",
          "description": "Option to disable AMP licence in Stripe.",
          "default": false
        },
        "enableSepaDebitCosts": {
          "type": "boolean",
          "description": "Option to disable Sepa Debit costs in Stripe.",
          "default": false
        },
        "version": {
          "type": "number",
          "description": "Billing version for that organization (can be 1 or 2)"
        },
        "currentPlan": {
          "type": "string",
          "description": "Current plan used for version 2 (can be base, grow or scale)."
        }
      },
      "required": [
        "billReceiver",
        "billSender",
        "stripeCustomerId",
        "currentPlan"
      ],
      "description": "An object specifying the organization billing settings."
    },
    "emailAs": {
      "type": "string",
      "description": "An email 'from' sender address for results notifications."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization was last modified."
    }
  },
  "required": [
    "name",
    "billingInfo"
  ]
}

Update an Organization
PATCH/organizations/{organization_id}

Update a specific Organization.

Example URI

PATCH https://api.web1on1.chat/v2/organizations/organization_id
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "name": "Acme Inc.",
  "displayName": "Acme Inc.",
  "status": "queued",
  "email": "support@example.com",
  "url": "https://example.com",
  "logo": "https://example.com/logo.png",
  "country": "NL",
  "locale": "en",
  "timezone": "Europe/Amsterdam",
  "industry": "automotive",
  "settings": {
    "routeOnReply": "accept",
    "enableMail": true
  },
  "aliases": [
    {
      "name": "Alexandra",
      "avatar": "https://cdn.web1on1.chat/avatars/female/smiling"
    }
  ],
  "categories": [
    {
      "id": "5877a5ecb6b1bc76263e0a85",
      "name": "Used Car",
      "forms": [
        "55dcf8aa048ee2227d4aa1a4",
        "55dcf8aa048ee2227d4aa1b6"
      ],
      "tags": [
        "automotive",
        "insurance"
      ]
    }
  ],
  "profileFields": {
    "name": {
      "label": "Field Label",
      "enabled": true
    },
    "initials": {
      "label": "Field Label",
      "enabled": true
    },
    "givenName": {
      "label": "Field Label",
      "enabled": true
    },
    "familyName": {
      "label": "Field Label",
      "enabled": true
    },
    "additionalName": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificPrefix": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificSuffix": {
      "label": "Field Label",
      "enabled": true
    },
    "gender": {
      "label": "Field Label",
      "options": [
        "male",
        "female"
      ],
      "enabled": true
    },
    "address": {
      "streetAddress": {
        "label": "Field Label",
        "enabled": true
      },
      "streetNumber": {
        "label": "Field Label",
        "enabled": true
      },
      "addressLocality": {
        "label": "Field Label",
        "enabled": true
      },
      "addressRegion": {
        "label": "Field Label",
        "enabled": true
      },
      "postalCode": {
        "label": "Field Label",
        "enabled": true
      },
      "addressCountry": {
        "label": "Field Label",
        "enabled": true
      }
    },
    "telephone": {
      "label": "Field Label",
      "enabled": true
    },
    "email": {
      "label": "Field Label",
      "enabled": true
    },
    "worksFor": {
      "label": "Field Label",
      "enabled": true
    }
  },
  "stopwords": [
    "foo",
    "bar"
  ],
  "commands": [
    "intakebot",
    "surveybot"
  ],
  "tags": [
    "automotive",
    "insurance"
  ],
  "domainPrefix": "skynet",
  "domain": "chat.report",
  "partners": [
    {
      "organization": "5b2bf9dd27fe8b715d64ee30",
      "permission": "guest"
    }
  ],
  "whitelist": [
    "john@example.org",
    "example.com"
  ],
  "defaultRole": "guest",
  "dataRetention": {
    "length": 18,
    "unit": "month"
  },
  "billingInfo": {
    "billReceiver": "Hello, world!",
    "billSender": "Hello, world!",
    "trialEndsOn": "2016-01-07T14:03:43Z",
    "stripeCustomerId": "cus_KlieDvHuODgU3u",
    "liveMode": true,
    "moveToLive": true,
    "w1on1ResultId": "Hello, world!",
    "daysUntilDue": 14,
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "enableMecs": true,
    "enableAmp": true,
    "enableSepaDebitCosts": true,
    "version": 1,
    "currentPlan": "scale"
  },
  "emailAs": "results@example.com",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the Organization."
    },
    "displayName": {
      "type": "string",
      "description": "Representative name of the Organization, to be used in external communications like chat widgets. Defaults to Organization name."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "pendingArchive",
        "archived"
      ],
      "default": "active",
      "description": "Organization status."
    },
    "email": {
      "type": "string",
      "description": "An email address for users to contact support in case of any issues with the organization."
    },
    "url": {
      "type": "string",
      "description": "The URL of the Organization's corporate website."
    },
    "logo": {
      "type": "string",
      "description": "The URL of the Organization's logo image."
    },
    "country": {
      "type": "string",
      "description": "The two-letter ISO 3166 country code of the Organization's headquarters."
    },
    "locale": {
      "type": "string",
      "enum": [
        "en",
        "nl",
        "de",
        "fr"
      ],
      "default": "en",
      "description": "ISO 639-1 two-letter language code."
    },
    "timezone": {
      "type": "string",
      "description": "Timezone of the Organizational HQ, as specified in the IANA time zone (Olson) database. Default: Europe/Amsterdam."
    },
    "industry": {
      "type": "string",
      "description": "The industry the Organization is in."
    },
    "settings": {
      "type": "object",
      "properties": {
        "routeOnReply": {
          "type": "string",
          "enum": [
            "accept",
            "assign",
            "route"
          ],
          "default": "accept",
          "description": "Determines how recurring visitors to same-agent are dispatched."
        },
        "enableMail": {
          "type": "boolean",
          "description": "Flag signifying if email notifications are sent to organization admins.",
          "default": true
        }
      },
      "description": "Configuration settings for the organization."
    },
    "aliases": {
      "type": "array",
      "description": "User avatars and aliases to use instead of real names."
    },
    "categories": {
      "type": "array",
      "description": "List of categories and form mappings, used in the agent UI."
    },
    "profileFields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for full name of the contact."
        },
        "initials": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact initials."
        },
        "givenName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact given name or first name."
        },
        "familyName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact family name or surname."
        },
        "additionalName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact middle name, if applicable."
        },
        "honorificPrefix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name prefix."
        },
        "honorificSuffix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name suffix."
        },
        "gender": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "options": {
              "type": "array",
              "description": "An array of option labels, only applicable to the `gender` profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact biological sex."
        },
        "address": {
          "type": "object",
          "properties": {
            "streetAddress": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street name."
            },
            "streetNumber": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street number."
            },
            "addressLocality": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for city or town."
            },
            "addressRegion": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for region."
            },
            "postalCode": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address location zip/postal code."
            },
            "addressCountry": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for country."
            }
          },
          "description": "Address labels object."
        },
        "telephone": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact telephone number."
        },
        "email": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact email address."
        },
        "worksFor": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for organization that the contact represents."
        }
      },
      "description": "An object mirroring the contact profile, representing profile field labels for various locales."
    },
    "stopwords": {
      "type": "array",
      "description": "List of words that should not be used in any communication on behalf of the Organization."
    },
    "commands": {
      "type": "array",
      "description": "List of custom (bot) commands that should be made available to the agent."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the organization."
    },
    "domainPrefix": {
      "type": "string",
      "description": "The white label subdomain part for the organization."
    },
    "domain": {
      "type": "string",
      "description": "The white label domain for the organization."
    },
    "partners": {
      "type": "array",
      "description": "Partner organizations to allow access to conversations."
    },
    "whitelist": {
      "type": "array",
      "description": "List of emails and domains for which agent self-registration is allowed."
    },
    "defaultRole": {
      "type": "string",
      "enum": [
        "guest",
        "agent"
      ],
      "default": "guest",
      "description": "Self-registering agent role."
    },
    "dataRetention": {
      "type": "object",
      "properties": {
        "length": {
          "type": "number",
          "description": "The number of units for the time interval."
        },
        "unit": {
          "type": "string",
          "enum": [
            "month",
            "year"
          ],
          "default": "month",
          "description": "The unit of time measured."
        }
      },
      "description": "An object specifying record expiration and purge time."
    },
    "billingInfo": {
      "type": "object",
      "properties": {
        "billReceiver": {
          "type": "string",
          "description": "Organzation paying for the invoice."
        },
        "billSender": {
          "type": "string",
          "description": "Organzation who is ending the invoice."
        },
        "trialEndsOn": {
          "type": "string",
          "description": "ISO8601 date and time of when the Organization trial has ended."
        },
        "stripeCustomerId": {
          "type": "string",
          "description": "Customer id in Stripe."
        },
        "liveMode": {
          "type": "boolean",
          "description": "Used enviroment in Stripe (development or live).",
          "default": true
        },
        "moveToLive": {
          "type": "boolean",
          "description": "Flag if organization must be moved to live enviroment in Stripe.",
          "default": false
        },
        "w1on1ResultId": {
          "type": "string",
          "description": "Alternative product id in Stripe for agent results."
        },
        "daysUntilDue": {
          "type": "number",
          "description": "Due days for invoicing (default 14)."
        },
        "meta": {
          "type": "object",
          "properties": {
            "someKey": {
              "type": "string",
              "description": "An example of a free-form key/value pair."
            },
            "anotherKey": {
              "type": "string",
              "description": "Another example of a free-form key/value pair."
            }
          },
          "description": "Free-form object of key-values."
        },
        "enableMecs": {
          "type": "boolean",
          "description": "Option to disable Mecs in Stripe.",
          "default": false
        },
        "enableAmp": {
          "type": "boolean",
          "description": "Option to disable AMP licence in Stripe.",
          "default": false
        },
        "enableSepaDebitCosts": {
          "type": "boolean",
          "description": "Option to disable Sepa Debit costs in Stripe.",
          "default": false
        },
        "version": {
          "type": "number",
          "description": "Billing version for that organization (can be 1 or 2)"
        },
        "currentPlan": {
          "type": "string",
          "description": "Current plan used for version 2 (can be base, grow or scale)."
        }
      },
      "required": [
        "billReceiver",
        "billSender",
        "stripeCustomerId",
        "currentPlan"
      ],
      "description": "An object specifying the organization billing settings."
    },
    "emailAs": {
      "type": "string",
      "description": "An email 'from' sender address for results notifications."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    }
  },
  "required": [
    "name",
    "billingInfo"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "56467a06d9b082b0059151dc",
  "name": "Acme Inc.",
  "displayName": "Acme Inc.",
  "status": "queued",
  "email": "support@example.com",
  "url": "https://example.com",
  "logo": "https://example.com/logo.png",
  "country": "NL",
  "locale": "en",
  "timezone": "Europe/Amsterdam",
  "industry": "automotive",
  "settings": {
    "routeOnReply": "accept",
    "enableMail": true
  },
  "aliases": [
    {
      "name": "Alexandra",
      "avatar": "https://cdn.web1on1.chat/avatars/female/smiling"
    }
  ],
  "categories": [
    {
      "id": "5877a5ecb6b1bc76263e0a85",
      "name": "Used Car",
      "forms": [
        "55dcf8aa048ee2227d4aa1a4",
        "55dcf8aa048ee2227d4aa1b6"
      ],
      "tags": [
        "automotive",
        "insurance"
      ]
    }
  ],
  "profileFields": {
    "name": {
      "label": "Field Label",
      "enabled": true
    },
    "initials": {
      "label": "Field Label",
      "enabled": true
    },
    "givenName": {
      "label": "Field Label",
      "enabled": true
    },
    "familyName": {
      "label": "Field Label",
      "enabled": true
    },
    "additionalName": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificPrefix": {
      "label": "Field Label",
      "enabled": true
    },
    "honorificSuffix": {
      "label": "Field Label",
      "enabled": true
    },
    "gender": {
      "label": "Field Label",
      "options": [
        "male",
        "female"
      ],
      "enabled": true
    },
    "address": {
      "streetAddress": {
        "label": "Field Label",
        "enabled": true
      },
      "streetNumber": {
        "label": "Field Label",
        "enabled": true
      },
      "addressLocality": {
        "label": "Field Label",
        "enabled": true
      },
      "addressRegion": {
        "label": "Field Label",
        "enabled": true
      },
      "postalCode": {
        "label": "Field Label",
        "enabled": true
      },
      "addressCountry": {
        "label": "Field Label",
        "enabled": true
      }
    },
    "telephone": {
      "label": "Field Label",
      "enabled": true
    },
    "email": {
      "label": "Field Label",
      "enabled": true
    },
    "worksFor": {
      "label": "Field Label",
      "enabled": true
    }
  },
  "stopwords": [
    "foo",
    "bar"
  ],
  "commands": [
    "intakebot",
    "surveybot"
  ],
  "tags": [
    "automotive",
    "insurance"
  ],
  "domainPrefix": "skynet",
  "domain": "chat.report",
  "partners": [
    {
      "organization": "5b2bf9dd27fe8b715d64ee30",
      "permission": "guest"
    }
  ],
  "whitelist": [
    "john@example.org",
    "example.com"
  ],
  "defaultRole": "guest",
  "dataRetention": {
    "length": 18,
    "unit": "month"
  },
  "billingInfo": {
    "billReceiver": "Hello, world!",
    "billSender": "Hello, world!",
    "trialEndsOn": "2016-01-07T14:03:43Z",
    "stripeCustomerId": "cus_KlieDvHuODgU3u",
    "liveMode": true,
    "moveToLive": true,
    "w1on1ResultId": "Hello, world!",
    "daysUntilDue": 14,
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "enableMecs": true,
    "enableAmp": true,
    "enableSepaDebitCosts": true,
    "version": 1,
    "currentPlan": "scale"
  },
  "emailAs": "results@example.com",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Organization."
    },
    "name": {
      "type": "string",
      "description": "The name of the Organization."
    },
    "displayName": {
      "type": "string",
      "description": "Representative name of the Organization, to be used in external communications like chat widgets. Defaults to Organization name."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "pendingArchive",
        "archived"
      ],
      "default": "active",
      "description": "Organization status."
    },
    "email": {
      "type": "string",
      "description": "An email address for users to contact support in case of any issues with the organization."
    },
    "url": {
      "type": "string",
      "description": "The URL of the Organization's corporate website."
    },
    "logo": {
      "type": "string",
      "description": "The URL of the Organization's logo image."
    },
    "country": {
      "type": "string",
      "description": "The two-letter ISO 3166 country code of the Organization's headquarters."
    },
    "locale": {
      "type": "string",
      "enum": [
        "en",
        "nl",
        "de",
        "fr"
      ],
      "default": "en",
      "description": "ISO 639-1 two-letter language code."
    },
    "timezone": {
      "type": "string",
      "description": "Timezone of the Organizational HQ, as specified in the IANA time zone (Olson) database. Default: Europe/Amsterdam."
    },
    "industry": {
      "type": "string",
      "description": "The industry the Organization is in."
    },
    "settings": {
      "type": "object",
      "properties": {
        "routeOnReply": {
          "type": "string",
          "enum": [
            "accept",
            "assign",
            "route"
          ],
          "default": "accept",
          "description": "Determines how recurring visitors to same-agent are dispatched."
        },
        "enableMail": {
          "type": "boolean",
          "description": "Flag signifying if email notifications are sent to organization admins.",
          "default": true
        }
      },
      "description": "Configuration settings for the organization."
    },
    "aliases": {
      "type": "array",
      "description": "User avatars and aliases to use instead of real names."
    },
    "categories": {
      "type": "array",
      "description": "List of categories and form mappings, used in the agent UI."
    },
    "profileFields": {
      "type": "object",
      "properties": {
        "name": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for full name of the contact."
        },
        "initials": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact initials."
        },
        "givenName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact given name or first name."
        },
        "familyName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact family name or surname."
        },
        "additionalName": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact middle name, if applicable."
        },
        "honorificPrefix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name prefix."
        },
        "honorificSuffix": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for name suffix."
        },
        "gender": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "options": {
              "type": "array",
              "description": "An array of option labels, only applicable to the `gender` profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact biological sex."
        },
        "address": {
          "type": "object",
          "properties": {
            "streetAddress": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street name."
            },
            "streetNumber": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address street number."
            },
            "addressLocality": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for city or town."
            },
            "addressRegion": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for region."
            },
            "postalCode": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for address location zip/postal code."
            },
            "addressCountry": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "description": "A label for the profile field."
                },
                "enabled": {
                  "type": "boolean",
                  "description": "Flag signifying if this localized label is enabled.",
                  "default": true
                }
              },
              "required": [
                "label"
              ],
              "description": "Label for country."
            }
          },
          "description": "Address labels object."
        },
        "telephone": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact telephone number."
        },
        "email": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for contact email address."
        },
        "worksFor": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "A label for the profile field."
            },
            "enabled": {
              "type": "boolean",
              "description": "Flag signifying if this localized label is enabled.",
              "default": true
            }
          },
          "required": [
            "label"
          ],
          "description": "Label for organization that the contact represents."
        }
      },
      "description": "An object mirroring the contact profile, representing profile field labels for various locales."
    },
    "stopwords": {
      "type": "array",
      "description": "List of words that should not be used in any communication on behalf of the Organization."
    },
    "commands": {
      "type": "array",
      "description": "List of custom (bot) commands that should be made available to the agent."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the organization."
    },
    "domainPrefix": {
      "type": "string",
      "description": "The white label subdomain part for the organization."
    },
    "domain": {
      "type": "string",
      "description": "The white label domain for the organization."
    },
    "partners": {
      "type": "array",
      "description": "Partner organizations to allow access to conversations."
    },
    "whitelist": {
      "type": "array",
      "description": "List of emails and domains for which agent self-registration is allowed."
    },
    "defaultRole": {
      "type": "string",
      "enum": [
        "guest",
        "agent"
      ],
      "default": "guest",
      "description": "Self-registering agent role."
    },
    "dataRetention": {
      "type": "object",
      "properties": {
        "length": {
          "type": "number",
          "description": "The number of units for the time interval."
        },
        "unit": {
          "type": "string",
          "enum": [
            "month",
            "year"
          ],
          "default": "month",
          "description": "The unit of time measured."
        }
      },
      "description": "An object specifying record expiration and purge time."
    },
    "billingInfo": {
      "type": "object",
      "properties": {
        "billReceiver": {
          "type": "string",
          "description": "Organzation paying for the invoice."
        },
        "billSender": {
          "type": "string",
          "description": "Organzation who is ending the invoice."
        },
        "trialEndsOn": {
          "type": "string",
          "description": "ISO8601 date and time of when the Organization trial has ended."
        },
        "stripeCustomerId": {
          "type": "string",
          "description": "Customer id in Stripe."
        },
        "liveMode": {
          "type": "boolean",
          "description": "Used enviroment in Stripe (development or live).",
          "default": true
        },
        "moveToLive": {
          "type": "boolean",
          "description": "Flag if organization must be moved to live enviroment in Stripe.",
          "default": false
        },
        "w1on1ResultId": {
          "type": "string",
          "description": "Alternative product id in Stripe for agent results."
        },
        "daysUntilDue": {
          "type": "number",
          "description": "Due days for invoicing (default 14)."
        },
        "meta": {
          "type": "object",
          "properties": {
            "someKey": {
              "type": "string",
              "description": "An example of a free-form key/value pair."
            },
            "anotherKey": {
              "type": "string",
              "description": "Another example of a free-form key/value pair."
            }
          },
          "description": "Free-form object of key-values."
        },
        "enableMecs": {
          "type": "boolean",
          "description": "Option to disable Mecs in Stripe.",
          "default": false
        },
        "enableAmp": {
          "type": "boolean",
          "description": "Option to disable AMP licence in Stripe.",
          "default": false
        },
        "enableSepaDebitCosts": {
          "type": "boolean",
          "description": "Option to disable Sepa Debit costs in Stripe.",
          "default": false
        },
        "version": {
          "type": "number",
          "description": "Billing version for that organization (can be 1 or 2)"
        },
        "currentPlan": {
          "type": "string",
          "description": "Current plan used for version 2 (can be base, grow or scale)."
        }
      },
      "required": [
        "billReceiver",
        "billSender",
        "stripeCustomerId",
        "currentPlan"
      ],
      "description": "An object specifying the organization billing settings."
    },
    "emailAs": {
      "type": "string",
      "description": "An email 'from' sender address for results notifications."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems, eg in webhook data."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization was last modified."
    }
  },
  "required": [
    "name",
    "billingInfo"
  ]
}

Delete an Organization
DELETE/organizations/{organization_id}

Delete an Organization. This method can only be called by a master Organization holder. It returns the deleted Organization on success.

Example URI

DELETE https://api.web1on1.chat/v2/organizations/organization_id
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Organization Categories

Retrieve all Organization Categories
GET/organizations/{organization_id}/categories

Returns all category objects of a specific Organization.

Example URI

GET https://api.web1on1.chat/v2/organizations/organization_id/categories
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "5877a5ecb6b1bc76263e0a85",
    "name": "Used Car",
    "forms": [
      "55dcf8aa048ee2227d4aa1a4",
      "55dcf8aa048ee2227d4aa1b6"
    ],
    "tags": [
      "automotive",
      "insurance"
    ]
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Add a Category to an Organization
POST/organizations/{organization_id}/categories

You may add a category to an Organization using this action. An organization may have up to 10 categories; if no slot is available an error will be thrown.

Example URI

POST https://api.web1on1.chat/v2/organizations/organization_id/categories
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "name": "Used Car",
  "forms": [
    "55dcf8aa048ee2227d4aa1a4",
    "55dcf8aa048ee2227d4aa1b6"
  ],
  "tags": [
    "automotive",
    "insurance"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the Category."
    },
    "forms": {
      "type": "array",
      "description": "A list of Form IDs that may be used for this category."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the category."
    }
  },
  "required": [
    "name"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /organizations/56467a06d9b082b0059151dc/categories/5877a5ecb6b1bc76263e0a85
Body
{
  "id": "5877a5ecb6b1bc76263e0a85",
  "name": "Used Car",
  "forms": [
    "55dcf8aa048ee2227d4aa1a4",
    "55dcf8aa048ee2227d4aa1b6"
  ],
  "tags": [
    "automotive",
    "insurance"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Category."
    },
    "name": {
      "type": "string",
      "description": "The name of the Category."
    },
    "forms": {
      "type": "array",
      "description": "A list of Form IDs that may be used for this category."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the category."
    }
  },
  "required": [
    "name"
  ]
}

Retrieve a specific Organization Category
GET/organizations/{organization_id}/categories/{category_id}

Returns a specific category object of a Organization.

Example URI

GET https://api.web1on1.chat/v2/organizations/organization_id/categories/category_id
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

category_id
string (required) 

ID of the category.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5877a5ecb6b1bc76263e0a85",
  "name": "Used Car",
  "forms": [
    "55dcf8aa048ee2227d4aa1a4",
    "55dcf8aa048ee2227d4aa1b6"
  ],
  "tags": [
    "automotive",
    "insurance"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Category."
    },
    "name": {
      "type": "string",
      "description": "The name of the Category."
    },
    "forms": {
      "type": "array",
      "description": "A list of Form IDs that may be used for this category."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the category."
    }
  },
  "required": [
    "name"
  ]
}

Update an Organization Category
PATCH/organizations/{organization_id}/categories/{category_id}

Update a specific Organization category.

Example URI

PATCH https://api.web1on1.chat/v2/organizations/organization_id/categories/category_id
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

category_id
string (required) 

ID of the category.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "id": "5877a5ecb6b1bc76263e0a85",
  "name": "Used Car",
  "forms": [
    "55dcf8aa048ee2227d4aa1a4",
    "55dcf8aa048ee2227d4aa1b6"
  ],
  "tags": [
    "automotive",
    "insurance"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Category."
    },
    "name": {
      "type": "string",
      "description": "The name of the Category."
    },
    "forms": {
      "type": "array",
      "description": "A list of Form IDs that may be used for this category."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the category."
    }
  },
  "required": [
    "name"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5877a5ecb6b1bc76263e0a85",
  "name": "Used Car",
  "forms": [
    "55dcf8aa048ee2227d4aa1a4",
    "55dcf8aa048ee2227d4aa1b6"
  ],
  "tags": [
    "automotive",
    "insurance"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Category."
    },
    "name": {
      "type": "string",
      "description": "The name of the Category."
    },
    "forms": {
      "type": "array",
      "description": "A list of Form IDs that may be used for this category."
    },
    "tags": {
      "type": "array",
      "description": "List of keywords/tags for the category."
    }
  },
  "required": [
    "name"
  ]
}

Remove a Category from an Organization
DELETE/organizations/{organization_id}/categories/{category_id}

Remove a category from a Organization, by replacing the category in the list with a null value. This way the order of category slots is not affected.

Example URI

DELETE https://api.web1on1.chat/v2/organizations/organization_id/categories/category_id
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

category_id
string (required) 

ID of the Organization category.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Organization Workflows

Retrieve all Organization Workflows
GET/organizations/{organization_id}/workflows

Returns all workflow objects that are triggered for an Organization. This method returns the workflows that run for an organization across the entire organization tree, and is useful for rule testing.

Example URI

GET https://api.web1on1.chat/v2/organizations/organization_id/workflows
URI Parameters
HideShow
organization_id
string (required) 

ID of the Organization.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "56467a06d9b082b0059151dc",
    "organization": "58bcbafb8547f04f68c14bdb",
    "name": "Automotive - Generic",
    "enabled": true,
    "rules": [
      {
        "id": "58bc9aecd906223dcec36493",
        "conditions": {
          "any": [
            {
              "fact": "conversation.category",
              "operator": "match",
              "value": "Used Car",
              "path": ".meta"
            }
          ],
          "all": [
            {
              "fact": "conversation.category",
              "operator": "match",
              "value": "Used Car",
              "path": ".meta"
            }
          ]
        },
        "event": {
          "type": "enqueue",
          "params": {
            "name": "Sales",
            "channel": "58bc9aecd906223dcec36493",
            "delay": 20
          }
        },
        "priority": 1
      }
    ],
    "organizations": [
      "58bc9aecd906223dcec36495",
      "58bc9aecd906223dcec36493"
    ],
    "organizationTags": [
      "56467a06d9b082b0059151dc"
    ],
    "createdAt": "2017-01-07T14:03:43Z",
    "updatedAt": "2017-01-07T14:03:43Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Organization Groups

Organizations may be grouped into Organization Groups. They work like tags - each organization can be a member of multiple groups.

An Organization Group has the following attributes:

Property Type Description Example
id string The unique ID of the Organization Group. 5877a5ecb6b1bc76263e0a85
name string* The name of the Organization Group. Realtors
organization string The ID of the organization that owns the Group belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations. 55dcf8aa048ee2227d4aa1a4
members array List of Organization IDs that are a member of this group. [5877a4a9b6b1bc76263e0a83]
createdAt string ISO8601 date and time of when the Organization Group was created. 2016-01-07T14:03:43Z
updatedAt string ISO8601 date and time of when the Organization Group was last modified. 2016-01-07T14:03:43Z

List All Organization Groups
GET/orggroups

Return a list of all Organization Groups.

Example URI

GET https://api.web1on1.chat/v2/orggroups
Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "5877a5ecb6b1bc76263e0a85",
    "name": "Realtors",
    "organization": "55dcf8aa048ee2227d4aa1a4",
    "members": [
      "5877a4a9b6b1bc76263e0a83",
      "5877a4cbb6b1bc76263e0a84"
    ],
    "createdAt": "2016-01-07T14:03:43Z",
    "updatedAt": "2016-01-07T14:03:43Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create a New Organization Group
POST/orggroups

You may create a organization group using this action.

Example URI

POST https://api.web1on1.chat/v2/orggroups
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "name": "Realtors",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "members": [
    "5877a4a9b6b1bc76263e0a83",
    "5877a4cbb6b1bc76263e0a84"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the Organization Group."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Group belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "members": {
      "type": "array",
      "description": "List of Organization IDs that are a member of this group."
    }
  },
  "required": [
    "name"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /orggroups/5877a5ecb6b1bc76263e0a85
Body
{
  "id": "5877a5ecb6b1bc76263e0a85",
  "name": "Realtors",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "members": [
    "5877a4a9b6b1bc76263e0a83",
    "5877a4cbb6b1bc76263e0a84"
  ],
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Organization Group."
    },
    "name": {
      "type": "string",
      "description": "The name of the Organization Group."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Group belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "members": {
      "type": "array",
      "description": "List of Organization IDs that are a member of this group."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization Group was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization Group was last modified."
    }
  },
  "required": [
    "name"
  ]
}

Organization Group

Retrieve an Organization Group
GET/orggroups/{group_id}

Returns a specific Organization Group.

Example URI

GET https://api.web1on1.chat/v2/orggroups/group_id
URI Parameters
HideShow
group_id
string (required) 

ID of the Organization Group.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5877a5ecb6b1bc76263e0a85",
  "name": "Realtors",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "members": [
    "5877a4a9b6b1bc76263e0a83",
    "5877a4cbb6b1bc76263e0a84"
  ],
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Organization Group."
    },
    "name": {
      "type": "string",
      "description": "The name of the Organization Group."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Group belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "members": {
      "type": "array",
      "description": "List of Organization IDs that are a member of this group."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization Group was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization Group was last modified."
    }
  },
  "required": [
    "name"
  ]
}

Update an Organization Group
PATCH/orggroups/{group_id}

Update a specific Organization Group.

Example URI

PATCH https://api.web1on1.chat/v2/orggroups/group_id
URI Parameters
HideShow
group_id
string (required) 

ID of the Organization Group.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "name": "Realtors",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "members": [
    "5877a4a9b6b1bc76263e0a83",
    "5877a4cbb6b1bc76263e0a84"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the Organization Group."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Group belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "members": {
      "type": "array",
      "description": "List of Organization IDs that are a member of this group."
    }
  },
  "required": [
    "name"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5877a5ecb6b1bc76263e0a85",
  "name": "Realtors",
  "organization": "55dcf8aa048ee2227d4aa1a4",
  "members": [
    "5877a4a9b6b1bc76263e0a83",
    "5877a4cbb6b1bc76263e0a84"
  ],
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Organization Group."
    },
    "name": {
      "type": "string",
      "description": "The name of the Organization Group."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Group belongs to. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "members": {
      "type": "array",
      "description": "List of Organization IDs that are a member of this group."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization Group was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Organization Group was last modified."
    }
  },
  "required": [
    "name"
  ]
}

Delete an Organization Group
DELETE/orggroups/{group_id}

Delete an Organization Group.

Example URI

DELETE https://api.web1on1.chat/v2/orggroups/group_id
URI Parameters
HideShow
group_id
string (required) 

ID of the Organization Group.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Retrieve all Organization Group members
GET/orggroups/{group_id}/members

Returns all organization IDs that are a member of a specific Organization Group.

Example URI

GET https://api.web1on1.chat/v2/orggroups/group_id/members
URI Parameters
HideShow
group_id
string (required) 

ID of the Organization Group.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  "5877a4a9b6b1bc76263e0a83",
  "5877a4cbb6b1bc76263e0a84"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Add organizations to a Group
POST/orggroups/{group_id}/members

You may add one or more member organizations to an Organization Group using this action.

Example URI

POST https://api.web1on1.chat/v2/orggroups/group_id/members
URI Parameters
HideShow
group_id
string (required) 

ID of the Organization Group.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
[
  "5877a4a9b6b1bc76263e0a83",
  "5877a4cbb6b1bc76263e0a84"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /orggroups/5877a5ecb6b1bc76263e0a85
Body
[
  "5877a4a9b6b1bc76263e0a83",
  "5877a4cbb6b1bc76263e0a84"
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Remove an organization from a Group
DELETE/orggroups/{group_id}/members/{member_id}

Remove a member organization from an Organization Group.

Example URI

DELETE https://api.web1on1.chat/v2/orggroups/group_id/members/member_id
URI Parameters
HideShow
group_id
string (required) 

ID of the Organization Group.

member_id
string (required) 

ID of the Organization.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Bots

Bot objects have the following attributes:

Property Type Description Example
id string The unique ID of the Bot. 5876bc219b9d2b54a0c464ca
organization string The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations. 5876bc219b9d2b54a0c464c9
name string* Name of the Bot. BusyBot
description string Description of the bot. This is the test bot
status enum Bot status One of inactive, active, archived. Defaults to active. inactive
roles array* Bot roles Defaults to bot. [bot]
audience enum The organization(s) this bot is shared with. One of global, owner, group. Defaults to owner. global
tags array Sharing tags [automotive]
avatar string Bot avatar url (45x45 px) https://yoursite.com/bot.png
commands array Bot commands made available in the UI. [start]
meta MetaParams Free-form object of key-values.

status. | {MetaParams} | | secret | string | Authentication secret for the User. | z3krUt || Property | Type | Description | Example | |—|---|—|---| | createdBy | string | The ID of the user created this bot | 5876bc219b9d2b54a0c464c9 | | updatedBy | string | The ID of the user last updated this bot | 5876bc219b9d2b54a0c464c9 | | createdAt | string | ISO8601 date and time of when the Bot was created. | 2020-01-07T14:03:43Z | | updatedAt | string | ISO8601 date and time of when the Bot was last modified. | 2020-01-07T14:03:43Z |

List All Bots
GET/bots

Return a list of all bots.

Example URI

GET https://api.web1on1.chat/v2/bots
Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "5876bc219b9d2b54a0c464ca",
    "organization": "5876bc219b9d2b54a0c464c9",
    "name": "BusyBot",
    "description": "This is the test bot",
    "status": "inactive",
    "roles": [
      "bot",
      "agent",
      "admin",
      "contact"
    ],
    "audience": "global",
    "tags": [
      "automotive",
      "realestate"
    ],
    "avatar": "https://yoursite.com/bot.png",
    "commands": [
      "start",
      "stop",
      "help"
    ],
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "secret": "z3krUt",
    "createdBy": "5876bc219b9d2b54a0c464c9",
    "updatedBy": "5876bc219b9d2b54a0c464c9",
    "createdAt": "2020-01-07T14:03:43Z",
    "updatedAt": "2020-01-07T14:03:43Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create a New Bot
POST/bots

You can create a Bot using this action.

Example URI

POST https://api.web1on1.chat/v2/bots
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "BusyBot",
  "description": "This is the test bot",
  "status": "inactive",
  "roles": [
    "bot",
    "agent",
    "admin",
    "contact"
  ],
  "audience": "global",
  "tags": [
    "automotive",
    "realestate"
  ],
  "avatar": "https://yoursite.com/bot.png",
  "commands": [
    "start",
    "stop",
    "help"
  ],
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the Bot."
    },
    "description": {
      "type": "string",
      "description": "Description of the bot."
    },
    "status": {
      "type": "string",
      "enum": [
        "inactive",
        "active",
        "archived"
      ],
      "default": "active",
      "description": "Bot status"
    },
    "roles": {
      "type": "array",
      "default": [
        "bot"
      ],
      "description": "Bot roles"
    },
    "audience": {
      "type": "string",
      "enum": [
        "global",
        "owner",
        "group"
      ],
      "default": "owner",
      "description": "The organization(s) this bot is shared with."
    },
    "tags": {
      "type": "array",
      "description": "Sharing tags"
    },
    "avatar": {
      "type": "string",
      "description": "Bot avatar url (45x45 px)"
    },
    "commands": {
      "type": "array",
      "description": "Bot commands made available in the UI."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values.\n\nstatus."
    }
  },
  "required": [
    "name",
    "roles"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /bots/5876bc219b9d2b54a0c464ca
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "BusyBot",
  "description": "This is the test bot",
  "status": "inactive",
  "roles": [
    "bot",
    "agent",
    "admin",
    "contact"
  ],
  "audience": "global",
  "tags": [
    "automotive",
    "realestate"
  ],
  "avatar": "https://yoursite.com/bot.png",
  "commands": [
    "start",
    "stop",
    "help"
  ],
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "secret": "z3krUt",
  "createdBy": "5876bc219b9d2b54a0c464c9",
  "updatedBy": "5876bc219b9d2b54a0c464c9",
  "createdAt": "2020-01-07T14:03:43Z",
  "updatedAt": "2020-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Bot."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the Bot."
    },
    "description": {
      "type": "string",
      "description": "Description of the bot."
    },
    "status": {
      "type": "string",
      "enum": [
        "inactive",
        "active",
        "archived"
      ],
      "default": "active",
      "description": "Bot status"
    },
    "roles": {
      "type": "array",
      "default": [
        "bot"
      ],
      "description": "Bot roles"
    },
    "audience": {
      "type": "string",
      "enum": [
        "global",
        "owner",
        "group"
      ],
      "default": "owner",
      "description": "The organization(s) this bot is shared with."
    },
    "tags": {
      "type": "array",
      "description": "Sharing tags"
    },
    "avatar": {
      "type": "string",
      "description": "Bot avatar url (45x45 px)"
    },
    "commands": {
      "type": "array",
      "description": "Bot commands made available in the UI."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values.\n\nstatus."
    },
    "secret": {
      "type": "string",
      "description": "Authentication secret for the User."
    },
    "createdBy": {
      "type": "string",
      "description": "The ID of the user created this bot"
    },
    "updatedBy": {
      "type": "string",
      "description": "The ID of the user last updated this bot"
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Bot was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Bot was last modified."
    }
  },
  "required": [
    "name",
    "roles"
  ]
}

Bot

Retrieve a Bot
GET/bots/{bot_id}

Returns a specific Bot.

Example URI

GET https://api.web1on1.chat/v2/bots/bot_id
URI Parameters
HideShow
bot_id
string (required) 

ID of the Bot.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "BusyBot",
  "description": "This is the test bot",
  "status": "inactive",
  "roles": [
    "bot",
    "agent",
    "admin",
    "contact"
  ],
  "audience": "global",
  "tags": [
    "automotive",
    "realestate"
  ],
  "avatar": "https://yoursite.com/bot.png",
  "commands": [
    "start",
    "stop",
    "help"
  ],
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "secret": "z3krUt",
  "createdBy": "5876bc219b9d2b54a0c464c9",
  "updatedBy": "5876bc219b9d2b54a0c464c9",
  "createdAt": "2020-01-07T14:03:43Z",
  "updatedAt": "2020-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Bot."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the Bot."
    },
    "description": {
      "type": "string",
      "description": "Description of the bot."
    },
    "status": {
      "type": "string",
      "enum": [
        "inactive",
        "active",
        "archived"
      ],
      "default": "active",
      "description": "Bot status"
    },
    "roles": {
      "type": "array",
      "default": [
        "bot"
      ],
      "description": "Bot roles"
    },
    "audience": {
      "type": "string",
      "enum": [
        "global",
        "owner",
        "group"
      ],
      "default": "owner",
      "description": "The organization(s) this bot is shared with."
    },
    "tags": {
      "type": "array",
      "description": "Sharing tags"
    },
    "avatar": {
      "type": "string",
      "description": "Bot avatar url (45x45 px)"
    },
    "commands": {
      "type": "array",
      "description": "Bot commands made available in the UI."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values.\n\nstatus."
    },
    "secret": {
      "type": "string",
      "description": "Authentication secret for the User."
    },
    "createdBy": {
      "type": "string",
      "description": "The ID of the user created this bot"
    },
    "updatedBy": {
      "type": "string",
      "description": "The ID of the user last updated this bot"
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Bot was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Bot was last modified."
    }
  },
  "required": [
    "name",
    "roles"
  ]
}

Update a Bot
PATCH/bots/{bot_id}

Update a Bot using this call.

Example URI

PATCH https://api.web1on1.chat/v2/bots/bot_id
URI Parameters
HideShow
bot_id
string (required) 

ID of the Bot.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "BusyBot",
  "description": "This is the test bot",
  "status": "inactive",
  "roles": [
    "bot",
    "agent",
    "admin",
    "contact"
  ],
  "audience": "global",
  "tags": [
    "automotive",
    "realestate"
  ],
  "avatar": "https://yoursite.com/bot.png",
  "commands": [
    "start",
    "stop",
    "help"
  ],
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "secret": "z3krUt"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the Bot."
    },
    "description": {
      "type": "string",
      "description": "Description of the bot."
    },
    "status": {
      "type": "string",
      "enum": [
        "inactive",
        "active",
        "archived"
      ],
      "default": "active",
      "description": "Bot status"
    },
    "roles": {
      "type": "array",
      "default": [
        "bot"
      ],
      "description": "Bot roles"
    },
    "audience": {
      "type": "string",
      "enum": [
        "global",
        "owner",
        "group"
      ],
      "default": "owner",
      "description": "The organization(s) this bot is shared with."
    },
    "tags": {
      "type": "array",
      "description": "Sharing tags"
    },
    "avatar": {
      "type": "string",
      "description": "Bot avatar url (45x45 px)"
    },
    "commands": {
      "type": "array",
      "description": "Bot commands made available in the UI."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values.\n\nstatus."
    },
    "secret": {
      "type": "string",
      "description": "Authentication secret for the User."
    }
  },
  "required": [
    "name",
    "roles"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "BusyBot",
  "description": "This is the test bot",
  "status": "inactive",
  "roles": [
    "bot",
    "agent",
    "admin",
    "contact"
  ],
  "audience": "global",
  "tags": [
    "automotive",
    "realestate"
  ],
  "avatar": "https://yoursite.com/bot.png",
  "commands": [
    "start",
    "stop",
    "help"
  ],
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "secret": "z3krUt",
  "createdBy": "5876bc219b9d2b54a0c464c9",
  "updatedBy": "5876bc219b9d2b54a0c464c9",
  "createdAt": "2020-01-07T14:03:43Z",
  "updatedAt": "2020-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Bot."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the Bot."
    },
    "description": {
      "type": "string",
      "description": "Description of the bot."
    },
    "status": {
      "type": "string",
      "enum": [
        "inactive",
        "active",
        "archived"
      ],
      "default": "active",
      "description": "Bot status"
    },
    "roles": {
      "type": "array",
      "default": [
        "bot"
      ],
      "description": "Bot roles"
    },
    "audience": {
      "type": "string",
      "enum": [
        "global",
        "owner",
        "group"
      ],
      "default": "owner",
      "description": "The organization(s) this bot is shared with."
    },
    "tags": {
      "type": "array",
      "description": "Sharing tags"
    },
    "avatar": {
      "type": "string",
      "description": "Bot avatar url (45x45 px)"
    },
    "commands": {
      "type": "array",
      "description": "Bot commands made available in the UI."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values.\n\nstatus."
    },
    "secret": {
      "type": "string",
      "description": "Authentication secret for the User."
    },
    "createdBy": {
      "type": "string",
      "description": "The ID of the user created this bot"
    },
    "updatedBy": {
      "type": "string",
      "description": "The ID of the user last updated this bot"
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Bot was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Bot was last modified."
    }
  },
  "required": [
    "name",
    "roles"
  ]
}

Delete a Bot
DELETE/bots/{bot_id}

Delete a Bot integration.

Example URI

DELETE https://api.web1on1.chat/v2/bots/bot_id
URI Parameters
HideShow
bot_id
string (required) 

ID of the Bot.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

BotInstance

A Bot Instance represents an enablement and activation of a Bot Definition for a single organization. When a bot definition is created using the UI, the first bot instance is created and enabled alongside it for the owning organization.

An instance record can be enabled or disabled. Bot instance meta variables specify organization-specific bot settings. The bot definition’s root instance’s meta variables serve as the default configuration that can be customized.

A Bot Instance has the following properties:

Property Type Description Example
id string The unique ID of the BotInstance. 5876bc219b9d2b54a0c464ca
organization string The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations. 5876bc219b9d2b54a0c464c9
bot string* The ID of the bot that is associated to the bot instance 5876bc219b9d2b54a0c464c9
name string* Bot name override for the botInstance. BestBot
description string Bot description override for the botInstance. Best bot ever
avatar string Avatar url, default from bot. https://yoursite.com/avatar.png
enabled boolean Enable/disable this bot instance Defaults to true. true
meta MetaParams Free-form object of key-values. {MetaParams}
createdBy string The ID of the user created this bot instance 5876bc219b9d2b54a0c464c9
updatedBy string The ID of the user last updated this bot instance 5876bc219b9d2b54a0c464c9
createdAt string ISO8601 date and time of when the BotInstance was created. 2020-01-07T14:03:43Z
updatedAt string ISO8601 date and time of when the BotInstance was last modified. 2020-01-07T14:03:43Z

List All BotInstances
GET/botinstances

Return a list of all botInstances.

Example URI

GET https://api.web1on1.chat/v2/botinstances
Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "5876bc219b9d2b54a0c464ca",
    "organization": "5876bc219b9d2b54a0c464c9",
    "bot": "5876bc219b9d2b54a0c464c9",
    "name": "BestBot",
    "description": "Best bot ever",
    "avatar": "https://yoursite.com/avatar.png",
    "enabled": true,
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "createdBy": "5876bc219b9d2b54a0c464c9",
    "updatedBy": "5876bc219b9d2b54a0c464c9",
    "createdAt": "2020-01-07T14:03:43Z",
    "updatedAt": "2020-01-07T14:03:43Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create a New BotInstance
POST/botinstances

You can create a BotInstance using this action.

Example URI

POST https://api.web1on1.chat/v2/botinstances
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "organization": "5876bc219b9d2b54a0c464c9",
  "bot": "5876bc219b9d2b54a0c464c9",
  "name": "BestBot",
  "description": "Best bot ever",
  "avatar": "https://yoursite.com/avatar.png",
  "enabled": true,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "bot": {
      "type": "string",
      "description": "The ID of the bot that is associated to the bot instance"
    },
    "name": {
      "type": "string",
      "description": "Bot name override for the botInstance."
    },
    "description": {
      "type": "string",
      "description": "Bot description override for the botInstance."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar url, default from bot."
    },
    "enabled": {
      "type": "boolean",
      "description": "Enable/disable this bot instance",
      "default": true
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values."
    }
  },
  "required": [
    "bot",
    "name"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /botinstances/5876bc219b9d2b54a0c464ca
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "bot": "5876bc219b9d2b54a0c464c9",
  "name": "BestBot",
  "description": "Best bot ever",
  "avatar": "https://yoursite.com/avatar.png",
  "enabled": true,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdBy": "5876bc219b9d2b54a0c464c9",
  "updatedBy": "5876bc219b9d2b54a0c464c9",
  "createdAt": "2020-01-07T14:03:43Z",
  "updatedAt": "2020-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the BotInstance."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "bot": {
      "type": "string",
      "description": "The ID of the bot that is associated to the bot instance"
    },
    "name": {
      "type": "string",
      "description": "Bot name override for the botInstance."
    },
    "description": {
      "type": "string",
      "description": "Bot description override for the botInstance."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar url, default from bot."
    },
    "enabled": {
      "type": "boolean",
      "description": "Enable/disable this bot instance",
      "default": true
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values."
    },
    "createdBy": {
      "type": "string",
      "description": "The ID of the user created this bot instance"
    },
    "updatedBy": {
      "type": "string",
      "description": "The ID of the user last updated this bot instance"
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the BotInstance was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the BotInstance was last modified."
    }
  },
  "required": [
    "bot",
    "name"
  ]
}

BotInstance

Retrieve a BotInstance
GET/botinstances/{botInstance_id}

Returns a specific BotInstance.

Example URI

GET https://api.web1on1.chat/v2/botinstances/botInstance_id
URI Parameters
HideShow
botInstance_id
string (required) 

ID of the BotInstance.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "bot": "5876bc219b9d2b54a0c464c9",
  "name": "BestBot",
  "description": "Best bot ever",
  "avatar": "https://yoursite.com/avatar.png",
  "enabled": true,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdBy": "5876bc219b9d2b54a0c464c9",
  "updatedBy": "5876bc219b9d2b54a0c464c9",
  "createdAt": "2020-01-07T14:03:43Z",
  "updatedAt": "2020-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the BotInstance."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "bot": {
      "type": "string",
      "description": "The ID of the bot that is associated to the bot instance"
    },
    "name": {
      "type": "string",
      "description": "Bot name override for the botInstance."
    },
    "description": {
      "type": "string",
      "description": "Bot description override for the botInstance."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar url, default from bot."
    },
    "enabled": {
      "type": "boolean",
      "description": "Enable/disable this bot instance",
      "default": true
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values."
    },
    "createdBy": {
      "type": "string",
      "description": "The ID of the user created this bot instance"
    },
    "updatedBy": {
      "type": "string",
      "description": "The ID of the user last updated this bot instance"
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the BotInstance was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the BotInstance was last modified."
    }
  },
  "required": [
    "bot",
    "name"
  ]
}

Update a BotInstance
PATCH/botinstances/{botInstance_id}

Update a BotInstance using this call.

Example URI

PATCH https://api.web1on1.chat/v2/botinstances/botInstance_id
URI Parameters
HideShow
botInstance_id
string (required) 

ID of the BotInstance.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "organization": "5876bc219b9d2b54a0c464c9",
  "bot": "5876bc219b9d2b54a0c464c9",
  "name": "BestBot",
  "description": "Best bot ever",
  "avatar": "https://yoursite.com/avatar.png",
  "enabled": true,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "bot": {
      "type": "string",
      "description": "The ID of the bot that is associated to the bot instance"
    },
    "name": {
      "type": "string",
      "description": "Bot name override for the botInstance."
    },
    "description": {
      "type": "string",
      "description": "Bot description override for the botInstance."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar url, default from bot."
    },
    "enabled": {
      "type": "boolean",
      "description": "Enable/disable this bot instance",
      "default": true
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values."
    }
  },
  "required": [
    "bot",
    "name"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "bot": "5876bc219b9d2b54a0c464c9",
  "name": "BestBot",
  "description": "Best bot ever",
  "avatar": "https://yoursite.com/avatar.png",
  "enabled": true,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdBy": "5876bc219b9d2b54a0c464c9",
  "updatedBy": "5876bc219b9d2b54a0c464c9",
  "createdAt": "2020-01-07T14:03:43Z",
  "updatedAt": "2020-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the BotInstance."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Bot. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "bot": {
      "type": "string",
      "description": "The ID of the bot that is associated to the bot instance"
    },
    "name": {
      "type": "string",
      "description": "Bot name override for the botInstance."
    },
    "description": {
      "type": "string",
      "description": "Bot description override for the botInstance."
    },
    "avatar": {
      "type": "string",
      "description": "Avatar url, default from bot."
    },
    "enabled": {
      "type": "boolean",
      "description": "Enable/disable this bot instance",
      "default": true
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values."
    },
    "createdBy": {
      "type": "string",
      "description": "The ID of the user created this bot instance"
    },
    "updatedBy": {
      "type": "string",
      "description": "The ID of the user last updated this bot instance"
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the BotInstance was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the BotInstance was last modified."
    }
  },
  "required": [
    "bot",
    "name"
  ]
}

Delete a BotInstance
DELETE/botinstances/{botInstance_id}

Delete a BotInstance

Example URI

DELETE https://api.web1on1.chat/v2/botinstances/botInstance_id
URI Parameters
HideShow
botInstance_id
string (required) 

ID of the BotInstance.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Services

A Service can represent any kind of connector, touchpoint, webservice or other integration that allows browsers and remote systems to enter Web1on1’s world.

Examples are XMPP connections, website widgets, remote API calls or other communication channels. Services that are used as notification- or event channels (such as emails or webhooks) may be triggered by events, services that are used as connectors may have connection parameters specified; Web1on1 will do the right thing based on the service type.

Account managers may enable services from the organization Integrations page, where you might find sections for adding XMPP accounts and third-party service providers. Multiple services may be attached/removed to or from a conversation during its lifecycle.

A Service object has the following attributes:

Property Type Description Example
id string The unique ID of the Service. 5876bc219b9d2b54a0c464ca
organization string The ID of the organization that owns the Service integration. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations. 5876bc219b9d2b54a0c464c9
name string* Name of the service. SmartSupp Widget
description string Description of the service. Test widget at http://domain/test-widget
type enum Supported type; service provider. One of smartsupp, intercom, smooch, twilio, mailgun, messenger, api, webhook, gbm. Defaults to webhook. smartsupp
status enum Service status. One of queued, active, disabled, pendingArchive, archived. Defaults to queued. queued
touchpoints array Consumer touchpoints supported by this service integration. [web]
params ServiceParams* Service connection parameters. {ServiceParams}
smoochId string Smooch service ID, if relevant. 58caef23feee32390091168a
smoochAppId string Smooch App ID, if relevant. app_58caef23feee32390091168a
startDate string ISO8601 date and time when the system should enable the integration by flipping the status from disabled to active. 2017-01-11T23:13:35.000Z
endDate string ISO8601 date and time when the system should disable the integration by flipping the status from disabled to active. 2017-01-11T23:13:35.000Z
meta MetaParams Free-form object of key-value pairs. {MetaParams}
createdAt string ISO8601 date and time of when the Service was created. 2016-01-07T14:03:43Z
updatedAt string ISO8601 date and time of when the Service was last modified. 2016-01-07T14:03:43Z

The content of the params object (connection parameters) depends on the service provider. These are:

SmartSupp

The SmartSupp integration type requires XMPP connection parameters.

  • jid: uid3710@s1.smartsupp.com (string, required) - JID of the XMPP connection.

  • password: z3kRuD (string, required) - Password for the XMPP connection.

  • host: s1.smartsupp.com (string, required) - XMPP host to connect to.

  • port: 5222 (string, optional) - XMPP port to connect to. Default: 5222.

Intercom

The Intercom service integration type requires an application ID and access token, and the ID of an Intercom user. All chats will be made on behalf of this Intercom user.

  • app_id: a3sdd8g4 (string, required) - Intercom AppID

  • access_token: b2PrAP02QFIwhjQ4hbFBmKJfNDZjMV9hZTM0XzMII4FAAdABSjgxOToxOjA= (string, required) - Intercom Application Access Token

  • assignee_id: 846956 (string, required) - Intercom UserID

Smooch

Required Smooch connection parameter credentials:

  • appId: 5876bc219b9d2b54a086647fd5 (string, required) - Smooch AppID

  • keyId: app_5876bc219b9d2b5400d34558 (string) - Smooch application key

  • secret: 0BPGhSWvROXtb37fkp8Q4iJO (string) - Smooch application secret

*Google Bussiness Messaging (GBM)

The required GBM setup:

  • location : 5876bc219b9d2b54a0c464c9 (string, required) GBM, Id to a location created on the knowledge base

  • welcomeMessage : Welcome (string, required) A welcome message for you integration widget

Optional GBM parameters:

  • privacy : https://web1on1.chat/privacy (string, optional) GBM An url to the brandPrivacy policy

  • starter: Hello (string, required) Conversation starter for your integration

  • startTime : 00:00 (string, optional) “HH:MM” format string where the agent is available

  • endTime : 23:59 (string, optional) “HH:MM” format string where the agent availability ends

  • startDay : MONDAY (string, optional) “MONDAY - SUNDAY” starting day of the week the chat is avail

  • endDay : SUNDAY (string, optional) “MONDAY - SUNDAY” ending day of the week the chat is avail

GBM setup flow control:

  • step : verifyAgent, verifyLocation, launchAgent, launchLocation (enum, optional) Request the next step of the GBM process, only is checked when a service update is requested

Optionally Smooch services can provide and advanced settings parameter:

  • advanced : (object) - The format documentation can be found here

*Google Bussiness Messaging (GBM)

The required GBM setup:

  • location : 5876bc219b9d2b54a0c464c9 (string, required) GBM, Id to a location created on the knowledge base

  • welcomeMessage : Welcome (string, required) A welcome message for you integration widget

Optional GBM parameters:

  • privacy : https://web1on1.chat/privacy (string, optional) GBM An url to the brandPrivacy policy

  • starter: Hello (string, required) Conversation starter for your integration

  • startTime : 00:00 (string, optional) “HH:MM” format string where the agent is available

  • endTime : 23:59 (string, optional) “HH:MM” format string where the agent availability ends

  • startDay : MONDAY (string, optional) “MONDAY - SUNDAY” starting day of the week the chat is avail

  • endDay : SUNDAY (string, optional) “MONDAY - SUNDAY” ending day of the week the chat is avail

GBM setup flow control:

  • step : verifyAgent, verifyLocation, launchAgent, launchLocation (enum, optional) Request the next step of the GBM process, only is checked when a service update is requested

Others

In addition, there are two internal service types that can be configured; the webhook type needs an URL as parameter, the api service type may receive a list of scopes.

List All Services
GET/services

Return a list of all services.

Example URI

GET https://api.web1on1.chat/v2/services
Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "type": "smartsupp",
    "params": {
      "jid": "uid45669@s1.smartsupp.com",
      "password": "z3kr3d"
    }
  },
  {
    "type": "smooch",
    "params": {
      "mailto": "werkplaats@dealer.nl"
    }
  },
  {
    "type": "intercom",
    "params": {
      "headerColor": "yellow",
      "inviteText": "Stel uw vraag..."
    }
  }
]

Create a New Service
POST/services

You can create a Service integration using this action.

Example URI

POST https://api.web1on1.chat/v2/services
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "SmartSupp Widget",
  "description": "Test widget at http://domain/test-widget",
  "type": "smartsupp",
  "status": "queued",
  "touchpoints": [
    "web",
    "email",
    "sms",
    "facebook",
    "whatsapp"
  ],
  "params": {
    "jid": "uid3710@s1.smartsupp.com",
    "password": "z3kRuD",
    "host": "s1.smartsupp.com",
    "port": "5222",
    "location": "5876bc219b9d2b54a0c464c9",
    "privacy": "https://web1on1.chat/privacy",
    "welcomeMessage": "Welcome",
    "starter": "Hello",
    "startTime": "00:00",
    "endTime": "23:59",
    "startDay": "MONDAY",
    "endDay": "SUNDAY",
    "step": "verifyAgent"
  },
  "smoochId": "58caef23feee32390091168a",
  "smoochAppId": "app_58caef23feee32390091168a",
  "startDate": "2017-01-11T23:13:35.000Z",
  "endDate": "2017-01-11T23:13:35.000Z",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Service integration. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the service."
    },
    "description": {
      "type": "string",
      "description": "Description of the service."
    },
    "type": {
      "type": "string",
      "enum": [
        "smartsupp",
        "intercom",
        "smooch",
        "twilio",
        "mailgun",
        "messenger",
        "api",
        "webhook",
        "gbm"
      ],
      "default": "webhook",
      "description": "Supported type; service provider."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "disabled",
        "pendingArchive",
        "archived"
      ],
      "default": "queued",
      "description": "Service status."
    },
    "touchpoints": {
      "type": "array",
      "description": "Consumer touchpoints supported by this service integration."
    },
    "params": {
      "type": "object",
      "properties": {
        "jid": {
          "type": "string",
          "description": "JID of the XMPP connection."
        },
        "password": {
          "type": "string",
          "description": "Password for the XMPP connection."
        },
        "host": {
          "type": "string",
          "description": "XMPP host to connect to."
        },
        "port": {
          "type": "string",
          "description": "XMPP port to connect to."
        },
        "location": {
          "type": "string"
        },
        "privacy": {
          "type": "string"
        },
        "welcomeMessage": {
          "type": "string"
        },
        "starter": {
          "type": "string"
        },
        "startTime": {
          "type": "string"
        },
        "endTime": {
          "type": "string"
        },
        "startDay": {
          "type": "string"
        },
        "endDay": {
          "type": "string"
        },
        "step": {
          "type": "string",
          "enum": [
            "verifyAgent",
            "verifyLocation",
            "launchAgent",
            "launchLocation"
          ]
        }
      },
      "required": [
        "jid",
        "password",
        "host",
        "location",
        "welcomeMessage",
        "starter"
      ],
      "description": "Service connection parameters."
    },
    "smoochId": {
      "type": "string",
      "description": "Smooch service ID, if relevant."
    },
    "smoochAppId": {
      "type": "string",
      "description": "Smooch App ID, if relevant."
    },
    "startDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should enable the integration by flipping the status from `disabled` to `active`."
    },
    "endDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should disable the integration by flipping the status from `disabled` to `active`."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-value pairs."
    }
  },
  "required": [
    "name",
    "params"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /services/5876bc219b9d2b54a0c464ca
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "SmartSupp Widget",
  "description": "Test widget at http://domain/test-widget",
  "type": "smartsupp",
  "status": "queued",
  "touchpoints": [
    "web",
    "email",
    "sms",
    "facebook",
    "whatsapp"
  ],
  "params": {
    "jid": "uid3710@s1.smartsupp.com",
    "password": "z3kRuD",
    "host": "s1.smartsupp.com",
    "port": "5222",
    "location": "5876bc219b9d2b54a0c464c9",
    "privacy": "https://web1on1.chat/privacy",
    "welcomeMessage": "Welcome",
    "starter": "Hello",
    "startTime": "00:00",
    "endTime": "23:59",
    "startDay": "MONDAY",
    "endDay": "SUNDAY",
    "step": "verifyAgent"
  },
  "smoochId": "58caef23feee32390091168a",
  "smoochAppId": "app_58caef23feee32390091168a",
  "startDate": "2017-01-11T23:13:35.000Z",
  "endDate": "2017-01-11T23:13:35.000Z",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Service."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Service integration. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the service."
    },
    "description": {
      "type": "string",
      "description": "Description of the service."
    },
    "type": {
      "type": "string",
      "enum": [
        "smartsupp",
        "intercom",
        "smooch",
        "twilio",
        "mailgun",
        "messenger",
        "api",
        "webhook",
        "gbm"
      ],
      "default": "webhook",
      "description": "Supported type; service provider."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "disabled",
        "pendingArchive",
        "archived"
      ],
      "default": "queued",
      "description": "Service status."
    },
    "touchpoints": {
      "type": "array",
      "description": "Consumer touchpoints supported by this service integration."
    },
    "params": {
      "type": "object",
      "properties": {
        "jid": {
          "type": "string",
          "description": "JID of the XMPP connection."
        },
        "password": {
          "type": "string",
          "description": "Password for the XMPP connection."
        },
        "host": {
          "type": "string",
          "description": "XMPP host to connect to."
        },
        "port": {
          "type": "string",
          "description": "XMPP port to connect to."
        },
        "location": {
          "type": "string"
        },
        "privacy": {
          "type": "string"
        },
        "welcomeMessage": {
          "type": "string"
        },
        "starter": {
          "type": "string"
        },
        "startTime": {
          "type": "string"
        },
        "endTime": {
          "type": "string"
        },
        "startDay": {
          "type": "string"
        },
        "endDay": {
          "type": "string"
        },
        "step": {
          "type": "string",
          "enum": [
            "verifyAgent",
            "verifyLocation",
            "launchAgent",
            "launchLocation"
          ]
        }
      },
      "required": [
        "jid",
        "password",
        "host",
        "location",
        "welcomeMessage",
        "starter"
      ],
      "description": "Service connection parameters."
    },
    "smoochId": {
      "type": "string",
      "description": "Smooch service ID, if relevant."
    },
    "smoochAppId": {
      "type": "string",
      "description": "Smooch App ID, if relevant."
    },
    "startDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should enable the integration by flipping the status from `disabled` to `active`."
    },
    "endDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should disable the integration by flipping the status from `disabled` to `active`."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-value pairs."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Service was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Service was last modified."
    }
  },
  "required": [
    "name",
    "params"
  ]
}

Service

Retrieve a Service
GET/services/{service_id}

Returns a specific Service integration.

Example URI

GET https://api.web1on1.chat/v2/services/service_id
URI Parameters
HideShow
service_id
string (required) 

ID of the Service.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "SmartSupp Widget",
  "description": "Test widget at http://domain/test-widget",
  "type": "smartsupp",
  "status": "queued",
  "touchpoints": [
    "web",
    "email",
    "sms",
    "facebook",
    "whatsapp"
  ],
  "params": {
    "jid": "uid3710@s1.smartsupp.com",
    "password": "z3kRuD",
    "host": "s1.smartsupp.com",
    "port": "5222",
    "location": "5876bc219b9d2b54a0c464c9",
    "privacy": "https://web1on1.chat/privacy",
    "welcomeMessage": "Welcome",
    "starter": "Hello",
    "startTime": "00:00",
    "endTime": "23:59",
    "startDay": "MONDAY",
    "endDay": "SUNDAY",
    "step": "verifyAgent"
  },
  "smoochId": "58caef23feee32390091168a",
  "smoochAppId": "app_58caef23feee32390091168a",
  "startDate": "2017-01-11T23:13:35.000Z",
  "endDate": "2017-01-11T23:13:35.000Z",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Service."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Service integration. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the service."
    },
    "description": {
      "type": "string",
      "description": "Description of the service."
    },
    "type": {
      "type": "string",
      "enum": [
        "smartsupp",
        "intercom",
        "smooch",
        "twilio",
        "mailgun",
        "messenger",
        "api",
        "webhook",
        "gbm"
      ],
      "default": "webhook",
      "description": "Supported type; service provider."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "disabled",
        "pendingArchive",
        "archived"
      ],
      "default": "queued",
      "description": "Service status."
    },
    "touchpoints": {
      "type": "array",
      "description": "Consumer touchpoints supported by this service integration."
    },
    "params": {
      "type": "object",
      "properties": {
        "jid": {
          "type": "string",
          "description": "JID of the XMPP connection."
        },
        "password": {
          "type": "string",
          "description": "Password for the XMPP connection."
        },
        "host": {
          "type": "string",
          "description": "XMPP host to connect to."
        },
        "port": {
          "type": "string",
          "description": "XMPP port to connect to."
        },
        "location": {
          "type": "string"
        },
        "privacy": {
          "type": "string"
        },
        "welcomeMessage": {
          "type": "string"
        },
        "starter": {
          "type": "string"
        },
        "startTime": {
          "type": "string"
        },
        "endTime": {
          "type": "string"
        },
        "startDay": {
          "type": "string"
        },
        "endDay": {
          "type": "string"
        },
        "step": {
          "type": "string",
          "enum": [
            "verifyAgent",
            "verifyLocation",
            "launchAgent",
            "launchLocation"
          ]
        }
      },
      "required": [
        "jid",
        "password",
        "host",
        "location",
        "welcomeMessage",
        "starter"
      ],
      "description": "Service connection parameters."
    },
    "smoochId": {
      "type": "string",
      "description": "Smooch service ID, if relevant."
    },
    "smoochAppId": {
      "type": "string",
      "description": "Smooch App ID, if relevant."
    },
    "startDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should enable the integration by flipping the status from `disabled` to `active`."
    },
    "endDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should disable the integration by flipping the status from `disabled` to `active`."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-value pairs."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Service was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Service was last modified."
    }
  },
  "required": [
    "name",
    "params"
  ]
}

Update a Service
PATCH/services/{service_id}

Update a Service integration using this call.

Example URI

PATCH https://api.web1on1.chat/v2/services/service_id
URI Parameters
HideShow
service_id
string (required) 

ID of the Service.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "SmartSupp Widget",
  "description": "Test widget at http://domain/test-widget",
  "type": "smartsupp",
  "status": "queued",
  "touchpoints": [
    "web",
    "email",
    "sms",
    "facebook",
    "whatsapp"
  ],
  "params": {
    "jid": "uid3710@s1.smartsupp.com",
    "password": "z3kRuD",
    "host": "s1.smartsupp.com",
    "port": "5222",
    "location": "5876bc219b9d2b54a0c464c9",
    "privacy": "https://web1on1.chat/privacy",
    "welcomeMessage": "Welcome",
    "starter": "Hello",
    "startTime": "00:00",
    "endTime": "23:59",
    "startDay": "MONDAY",
    "endDay": "SUNDAY",
    "step": "verifyAgent"
  },
  "smoochId": "58caef23feee32390091168a",
  "smoochAppId": "app_58caef23feee32390091168a",
  "startDate": "2017-01-11T23:13:35.000Z",
  "endDate": "2017-01-11T23:13:35.000Z",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Service integration. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the service."
    },
    "description": {
      "type": "string",
      "description": "Description of the service."
    },
    "type": {
      "type": "string",
      "enum": [
        "smartsupp",
        "intercom",
        "smooch",
        "twilio",
        "mailgun",
        "messenger",
        "api",
        "webhook",
        "gbm"
      ],
      "default": "webhook",
      "description": "Supported type; service provider."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "disabled",
        "pendingArchive",
        "archived"
      ],
      "default": "queued",
      "description": "Service status."
    },
    "touchpoints": {
      "type": "array",
      "description": "Consumer touchpoints supported by this service integration."
    },
    "params": {
      "type": "object",
      "properties": {
        "jid": {
          "type": "string",
          "description": "JID of the XMPP connection."
        },
        "password": {
          "type": "string",
          "description": "Password for the XMPP connection."
        },
        "host": {
          "type": "string",
          "description": "XMPP host to connect to."
        },
        "port": {
          "type": "string",
          "description": "XMPP port to connect to."
        },
        "location": {
          "type": "string"
        },
        "privacy": {
          "type": "string"
        },
        "welcomeMessage": {
          "type": "string"
        },
        "starter": {
          "type": "string"
        },
        "startTime": {
          "type": "string"
        },
        "endTime": {
          "type": "string"
        },
        "startDay": {
          "type": "string"
        },
        "endDay": {
          "type": "string"
        },
        "step": {
          "type": "string",
          "enum": [
            "verifyAgent",
            "verifyLocation",
            "launchAgent",
            "launchLocation"
          ]
        }
      },
      "required": [
        "jid",
        "password",
        "host",
        "location",
        "welcomeMessage",
        "starter"
      ],
      "description": "Service connection parameters."
    },
    "smoochId": {
      "type": "string",
      "description": "Smooch service ID, if relevant."
    },
    "smoochAppId": {
      "type": "string",
      "description": "Smooch App ID, if relevant."
    },
    "startDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should enable the integration by flipping the status from `disabled` to `active`."
    },
    "endDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should disable the integration by flipping the status from `disabled` to `active`."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-value pairs."
    }
  },
  "required": [
    "name",
    "params"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5876bc219b9d2b54a0c464ca",
  "organization": "5876bc219b9d2b54a0c464c9",
  "name": "SmartSupp Widget",
  "description": "Test widget at http://domain/test-widget",
  "type": "smartsupp",
  "status": "queued",
  "touchpoints": [
    "web",
    "email",
    "sms",
    "facebook",
    "whatsapp"
  ],
  "params": {
    "jid": "uid3710@s1.smartsupp.com",
    "password": "z3kRuD",
    "host": "s1.smartsupp.com",
    "port": "5222",
    "location": "5876bc219b9d2b54a0c464c9",
    "privacy": "https://web1on1.chat/privacy",
    "welcomeMessage": "Welcome",
    "starter": "Hello",
    "startTime": "00:00",
    "endTime": "23:59",
    "startDay": "MONDAY",
    "endDay": "SUNDAY",
    "step": "verifyAgent"
  },
  "smoochId": "58caef23feee32390091168a",
  "smoochAppId": "app_58caef23feee32390091168a",
  "startDate": "2017-01-11T23:13:35.000Z",
  "endDate": "2017-01-11T23:13:35.000Z",
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique ID of the Service."
    },
    "organization": {
      "type": "string",
      "description": "The ID of the organization that owns the Service integration. Must be the organization that the current API user is an admin for (default) or one of its sub-organizations."
    },
    "name": {
      "type": "string",
      "description": "Name of the service."
    },
    "description": {
      "type": "string",
      "description": "Description of the service."
    },
    "type": {
      "type": "string",
      "enum": [
        "smartsupp",
        "intercom",
        "smooch",
        "twilio",
        "mailgun",
        "messenger",
        "api",
        "webhook",
        "gbm"
      ],
      "default": "webhook",
      "description": "Supported type; service provider."
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "active",
        "disabled",
        "pendingArchive",
        "archived"
      ],
      "default": "queued",
      "description": "Service status."
    },
    "touchpoints": {
      "type": "array",
      "description": "Consumer touchpoints supported by this service integration."
    },
    "params": {
      "type": "object",
      "properties": {
        "jid": {
          "type": "string",
          "description": "JID of the XMPP connection."
        },
        "password": {
          "type": "string",
          "description": "Password for the XMPP connection."
        },
        "host": {
          "type": "string",
          "description": "XMPP host to connect to."
        },
        "port": {
          "type": "string",
          "description": "XMPP port to connect to."
        },
        "location": {
          "type": "string"
        },
        "privacy": {
          "type": "string"
        },
        "welcomeMessage": {
          "type": "string"
        },
        "starter": {
          "type": "string"
        },
        "startTime": {
          "type": "string"
        },
        "endTime": {
          "type": "string"
        },
        "startDay": {
          "type": "string"
        },
        "endDay": {
          "type": "string"
        },
        "step": {
          "type": "string",
          "enum": [
            "verifyAgent",
            "verifyLocation",
            "launchAgent",
            "launchLocation"
          ]
        }
      },
      "required": [
        "jid",
        "password",
        "host",
        "location",
        "welcomeMessage",
        "starter"
      ],
      "description": "Service connection parameters."
    },
    "smoochId": {
      "type": "string",
      "description": "Smooch service ID, if relevant."
    },
    "smoochAppId": {
      "type": "string",
      "description": "Smooch App ID, if relevant."
    },
    "startDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should enable the integration by flipping the status from `disabled` to `active`."
    },
    "endDate": {
      "type": "string",
      "description": "ISO8601 date and time when the system should disable the integration by flipping the status from `disabled` to `active`."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-value pairs."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Service was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the Service was last modified."
    }
  },
  "required": [
    "name",
    "params"
  ]
}

Delete a Service
DELETE/services/{service_id}

Delete a Service integration.

Example URI

DELETE https://api.web1on1.chat/v2/services/service_id
URI Parameters
HideShow
service_id
string (required) 

ID of the Service.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Forms

The Forms API provides methods to manage collections of fields.

A Form has the following properties:

Property Type Description Example
id string Unique identifier for the form 5656f3ca42fc302027eba5c6
organization string Organization ID of the owning organization. Defaults to the API user’s active organization. 58bcbafb8547f04f68c14bdb
name string* Name of the form Brochure
type enum Form type. A static form always stays active, while a topic is picked by the agent. One of topic, static. Defaults to topic. topic
template string Form ID of the form that was used as a template. 5c7574c78ae07962b12e264c
profileFields array List of profile fields for this form [gender]
fields array List of fields for this form [{FormField Create}]
notifyEmails array A list of email addresses where form results get sent to. [support@example.com]
status enum State of the form. Archived forms are not made available in the UI. One of active, archived. Defaults to active. active
tags array List of sharing tags for the form. The form will be made available to child organizations with matching tags. [automotive]
labels array List of labels for the form. Form labels will be passed on in conversation.forms, as well as conversation.results and in Results messages when the form is processed. [isLead]
pointsByAgent number Number of points when an agent submits a result with this form. 60
pointsByBot number Number of points when a bot submits a result with this form. 40
meta MetaParams Free-form object of key-values, that will be passed on to external systems. {MetaParams}
createdAt string ISO8601 date and time of when the form was created. 2016-01-07T14:03:43Z
updatedAt string ISO8601 date and time of when the form was last modified. 2016-01-07T14:03:43Z

The profileFields attribute specifies which contact profile fields are included in form results. The list of profileFields can be one or more of honorificPrefix, initials, honorificSuffix, gender, givenName, familyName, additionalName, streetAddress, streetNumber, postalCode, addressLocality, addressRegion, addressCountry, worksFor, email or telephone.

In addition to profile fields, a form may have one or more form-specific fields. Each field has the following properties:

Property Type Description Example
id string Unique identifier for the field. 5877ff19276f4e04db18e330
name string* Field identifier, short name to identify the field appointmentDate
label string HTML label to add to the field Appointment Date
type enum HTML5 input type, and the elements ‘select’ and ‘textearea’. One of button, checkbox, color, date, datetime-local, email, file, hidden, image, month, number, password, radio, range, reset, search, select, submit, tel, text, textarea, time, url, week. Defaults to text. button
entity string Name of the entity that this field represents. Date
pattern string HTML5 input pattern attribute, a JavaScript regular expression which the input’s value must match. (?:19
options array An array of options for select form field to display. Each option should be an object with a ‘key’ (string) and a ‘value’ (string). [{FormFieldOption}]
required boolean Field is required. Defaults to false. false
createdAt string ISO8601 date and time of when the form field was created. 2016-01-07T14:03:43Z
updatedAt string ISO8601 date and time of when the form field was last modified. 2016-01-07T14:03:43Z

List All Forms
GET/forms

Return a list of all forms for the organization and sub-organizations.

Example URI

GET https://api.web1on1.chat/v2/forms
Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "5656f3ca42fc302027eba5c6",
    "organization": "58bcbafb8547f04f68c14bdb",
    "name": "Brochure",
    "type": "topic",
    "template": "5c7574c78ae07962b12e264c",
    "profileFields": [
      "gender",
      "honorificPrefix",
      "honorificSuffix",
      "initials",
      "givenName",
      "familyName",
      "additionalName",
      "streetAddress",
      "streetNumber",
      "postalCode",
      "addressLocality",
      "addressRegion",
      "addressCountry",
      "worksFor",
      "email",
      "telephone"
    ],
    "fields": [
      {
        "name": "appointmentDate",
        "label": "Appointment Date",
        "type": "button",
        "entity": "Date",
        "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
        "options": [
          {
            "key": "yes",
            "value": "Y"
          }
        ],
        "required": true
      }
    ],
    "notifyEmails": [
      "support@example.com",
      "help@example.com"
    ],
    "status": "active",
    "tags": [
      "automotive",
      "insurance"
    ],
    "labels": [
      "isLead",
      "isBrand"
    ],
    "pointsByAgent": 60,
    "pointsByBot": 40,
    "meta": {
      "someKey": "Some value",
      "anotherKey": "Some other value"
    },
    "createdAt": "2016-01-07T14:03:43Z",
    "updatedAt": "2016-01-07T14:03:43Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create a new Form
POST/forms

You may create a form using this action.

Example URI

POST https://api.web1on1.chat/v2/forms
Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "organization": "58bcbafb8547f04f68c14bdb",
  "name": "Brochure",
  "type": "topic",
  "template": "5c7574c78ae07962b12e264c",
  "profileFields": [
    "gender",
    "honorificPrefix",
    "honorificSuffix",
    "initials",
    "givenName",
    "familyName",
    "additionalName",
    "streetAddress",
    "streetNumber",
    "postalCode",
    "addressLocality",
    "addressRegion",
    "addressCountry",
    "worksFor",
    "email",
    "telephone"
  ],
  "fields": [
    {
      "name": "appointmentDate",
      "label": "Appointment Date",
      "type": "button",
      "entity": "Date",
      "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
      "options": [
        {
          "key": "yes",
          "value": "Y"
        }
      ],
      "required": true
    }
  ],
  "notifyEmails": [
    "support@example.com",
    "help@example.com"
  ],
  "status": "active",
  "tags": [
    "automotive",
    "insurance"
  ],
  "labels": [
    "isLead",
    "isBrand"
  ],
  "pointsByAgent": 60,
  "pointsByBot": 40,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "description": "Organization ID of the owning organization. Defaults to the API user's active organization."
    },
    "name": {
      "type": "string",
      "description": "Name of the form"
    },
    "type": {
      "type": "string",
      "enum": [
        "topic",
        "static"
      ],
      "default": "topic",
      "description": "Form type. A `static` form always stays active, while a `topic` is picked by the agent."
    },
    "template": {
      "type": "string",
      "description": "Form ID of the form that was used as a template."
    },
    "profileFields": {
      "type": "array",
      "description": "List of profile fields for this form"
    },
    "fields": {
      "type": "array",
      "description": "List of fields for this form"
    },
    "notifyEmails": {
      "type": "array",
      "description": "A list of email addresses where form results get sent to."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ],
      "default": "active",
      "description": "State of the form. Archived forms are not made available in the UI."
    },
    "tags": {
      "type": "array",
      "description": "List of sharing tags for the form. The form will be made available to child organizations with matching tags."
    },
    "labels": {
      "type": "array",
      "description": "List of labels for the form. Form labels will be passed on in conversation.forms, as well as conversation.results and in Results messages when the form is processed."
    },
    "pointsByAgent": {
      "type": "number",
      "description": "Number of points when an agent submits a result with this form."
    },
    "pointsByBot": {
      "type": "number",
      "description": "Number of points when a bot submits a result with this form."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems."
    }
  },
  "required": [
    "name"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /forms/5656f3ca42fc302027eba5c6
Body
{
  "id": "5656f3ca42fc302027eba5c6",
  "organization": "58bcbafb8547f04f68c14bdb",
  "name": "Brochure",
  "type": "topic",
  "template": "5c7574c78ae07962b12e264c",
  "profileFields": [
    "gender",
    "honorificPrefix",
    "honorificSuffix",
    "initials",
    "givenName",
    "familyName",
    "additionalName",
    "streetAddress",
    "streetNumber",
    "postalCode",
    "addressLocality",
    "addressRegion",
    "addressCountry",
    "worksFor",
    "email",
    "telephone"
  ],
  "fields": [
    {
      "name": "appointmentDate",
      "label": "Appointment Date",
      "type": "button",
      "entity": "Date",
      "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
      "options": [
        {
          "key": "yes",
          "value": "Y"
        }
      ],
      "required": true
    }
  ],
  "notifyEmails": [
    "support@example.com",
    "help@example.com"
  ],
  "status": "active",
  "tags": [
    "automotive",
    "insurance"
  ],
  "labels": [
    "isLead",
    "isBrand"
  ],
  "pointsByAgent": 60,
  "pointsByBot": 40,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the form"
    },
    "organization": {
      "type": "string",
      "description": "Organization ID of the owning organization. Defaults to the API user's active organization."
    },
    "name": {
      "type": "string",
      "description": "Name of the form"
    },
    "type": {
      "type": "string",
      "enum": [
        "topic",
        "static"
      ],
      "default": "topic",
      "description": "Form type. A `static` form always stays active, while a `topic` is picked by the agent."
    },
    "template": {
      "type": "string",
      "description": "Form ID of the form that was used as a template."
    },
    "profileFields": {
      "type": "array",
      "description": "List of profile fields for this form"
    },
    "fields": {
      "type": "array",
      "description": "List of fields for this form"
    },
    "notifyEmails": {
      "type": "array",
      "description": "A list of email addresses where form results get sent to."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ],
      "default": "active",
      "description": "State of the form. Archived forms are not made available in the UI."
    },
    "tags": {
      "type": "array",
      "description": "List of sharing tags for the form. The form will be made available to child organizations with matching tags."
    },
    "labels": {
      "type": "array",
      "description": "List of labels for the form. Form labels will be passed on in conversation.forms, as well as conversation.results and in Results messages when the form is processed."
    },
    "pointsByAgent": {
      "type": "number",
      "description": "Number of points when an agent submits a result with this form."
    },
    "pointsByBot": {
      "type": "number",
      "description": "Number of points when a bot submits a result with this form."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the form was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the form was last modified."
    }
  },
  "required": [
    "name"
  ]
}

Form

Retrieve a Form
GET/forms/{form_id}

Returns a specific Form.

Example URI

GET https://api.web1on1.chat/v2/forms/form_id
URI Parameters
HideShow
form_id
string (required) 

ID of the Form.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5656f3ca42fc302027eba5c6",
  "organization": "58bcbafb8547f04f68c14bdb",
  "name": "Brochure",
  "type": "topic",
  "template": "5c7574c78ae07962b12e264c",
  "profileFields": [
    "gender",
    "honorificPrefix",
    "honorificSuffix",
    "initials",
    "givenName",
    "familyName",
    "additionalName",
    "streetAddress",
    "streetNumber",
    "postalCode",
    "addressLocality",
    "addressRegion",
    "addressCountry",
    "worksFor",
    "email",
    "telephone"
  ],
  "fields": [
    {
      "name": "appointmentDate",
      "label": "Appointment Date",
      "type": "button",
      "entity": "Date",
      "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
      "options": [
        {
          "key": "yes",
          "value": "Y"
        }
      ],
      "required": true
    }
  ],
  "notifyEmails": [
    "support@example.com",
    "help@example.com"
  ],
  "status": "active",
  "tags": [
    "automotive",
    "insurance"
  ],
  "labels": [
    "isLead",
    "isBrand"
  ],
  "pointsByAgent": 60,
  "pointsByBot": 40,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the form"
    },
    "organization": {
      "type": "string",
      "description": "Organization ID of the owning organization. Defaults to the API user's active organization."
    },
    "name": {
      "type": "string",
      "description": "Name of the form"
    },
    "type": {
      "type": "string",
      "enum": [
        "topic",
        "static"
      ],
      "default": "topic",
      "description": "Form type. A `static` form always stays active, while a `topic` is picked by the agent."
    },
    "template": {
      "type": "string",
      "description": "Form ID of the form that was used as a template."
    },
    "profileFields": {
      "type": "array",
      "description": "List of profile fields for this form"
    },
    "fields": {
      "type": "array",
      "description": "List of fields for this form"
    },
    "notifyEmails": {
      "type": "array",
      "description": "A list of email addresses where form results get sent to."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ],
      "default": "active",
      "description": "State of the form. Archived forms are not made available in the UI."
    },
    "tags": {
      "type": "array",
      "description": "List of sharing tags for the form. The form will be made available to child organizations with matching tags."
    },
    "labels": {
      "type": "array",
      "description": "List of labels for the form. Form labels will be passed on in conversation.forms, as well as conversation.results and in Results messages when the form is processed."
    },
    "pointsByAgent": {
      "type": "number",
      "description": "Number of points when an agent submits a result with this form."
    },
    "pointsByBot": {
      "type": "number",
      "description": "Number of points when a bot submits a result with this form."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the form was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the form was last modified."
    }
  },
  "required": [
    "name"
  ]
}

Update a Form
PATCH/forms/{form_id}

Update a specific Form.

Example URI

PATCH https://api.web1on1.chat/v2/forms/form_id
URI Parameters
HideShow
form_id
string (required) 

ID of the Form.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "organization": "58bcbafb8547f04f68c14bdb",
  "name": "Brochure",
  "type": "topic",
  "template": "5c7574c78ae07962b12e264c",
  "profileFields": [
    "gender",
    "honorificPrefix",
    "honorificSuffix",
    "initials",
    "givenName",
    "familyName",
    "additionalName",
    "streetAddress",
    "streetNumber",
    "postalCode",
    "addressLocality",
    "addressRegion",
    "addressCountry",
    "worksFor",
    "email",
    "telephone"
  ],
  "fields": [
    {
      "name": "appointmentDate",
      "label": "Appointment Date",
      "type": "button",
      "entity": "Date",
      "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
      "options": [
        {
          "key": "yes",
          "value": "Y"
        }
      ],
      "required": true
    }
  ],
  "notifyEmails": [
    "support@example.com",
    "help@example.com"
  ],
  "status": "active",
  "tags": [
    "automotive",
    "insurance"
  ],
  "labels": [
    "isLead",
    "isBrand"
  ],
  "pointsByAgent": 60,
  "pointsByBot": 40,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "organization": {
      "type": "string",
      "description": "Organization ID of the owning organization. Defaults to the API user's active organization."
    },
    "name": {
      "type": "string",
      "description": "Name of the form"
    },
    "type": {
      "type": "string",
      "enum": [
        "topic",
        "static"
      ],
      "default": "topic",
      "description": "Form type. A `static` form always stays active, while a `topic` is picked by the agent."
    },
    "template": {
      "type": "string",
      "description": "Form ID of the form that was used as a template."
    },
    "profileFields": {
      "type": "array",
      "description": "List of profile fields for this form"
    },
    "fields": {
      "type": "array",
      "description": "List of fields for this form"
    },
    "notifyEmails": {
      "type": "array",
      "description": "A list of email addresses where form results get sent to."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ],
      "default": "active",
      "description": "State of the form. Archived forms are not made available in the UI."
    },
    "tags": {
      "type": "array",
      "description": "List of sharing tags for the form. The form will be made available to child organizations with matching tags."
    },
    "labels": {
      "type": "array",
      "description": "List of labels for the form. Form labels will be passed on in conversation.forms, as well as conversation.results and in Results messages when the form is processed."
    },
    "pointsByAgent": {
      "type": "number",
      "description": "Number of points when an agent submits a result with this form."
    },
    "pointsByBot": {
      "type": "number",
      "description": "Number of points when a bot submits a result with this form."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems."
    }
  },
  "required": [
    "name"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5656f3ca42fc302027eba5c6",
  "organization": "58bcbafb8547f04f68c14bdb",
  "name": "Brochure",
  "type": "topic",
  "template": "5c7574c78ae07962b12e264c",
  "profileFields": [
    "gender",
    "honorificPrefix",
    "honorificSuffix",
    "initials",
    "givenName",
    "familyName",
    "additionalName",
    "streetAddress",
    "streetNumber",
    "postalCode",
    "addressLocality",
    "addressRegion",
    "addressCountry",
    "worksFor",
    "email",
    "telephone"
  ],
  "fields": [
    {
      "name": "appointmentDate",
      "label": "Appointment Date",
      "type": "button",
      "entity": "Date",
      "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
      "options": [
        {
          "key": "yes",
          "value": "Y"
        }
      ],
      "required": true
    }
  ],
  "notifyEmails": [
    "support@example.com",
    "help@example.com"
  ],
  "status": "active",
  "tags": [
    "automotive",
    "insurance"
  ],
  "labels": [
    "isLead",
    "isBrand"
  ],
  "pointsByAgent": 60,
  "pointsByBot": 40,
  "meta": {
    "someKey": "Some value",
    "anotherKey": "Some other value"
  },
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the form"
    },
    "organization": {
      "type": "string",
      "description": "Organization ID of the owning organization. Defaults to the API user's active organization."
    },
    "name": {
      "type": "string",
      "description": "Name of the form"
    },
    "type": {
      "type": "string",
      "enum": [
        "topic",
        "static"
      ],
      "default": "topic",
      "description": "Form type. A `static` form always stays active, while a `topic` is picked by the agent."
    },
    "template": {
      "type": "string",
      "description": "Form ID of the form that was used as a template."
    },
    "profileFields": {
      "type": "array",
      "description": "List of profile fields for this form"
    },
    "fields": {
      "type": "array",
      "description": "List of fields for this form"
    },
    "notifyEmails": {
      "type": "array",
      "description": "A list of email addresses where form results get sent to."
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ],
      "default": "active",
      "description": "State of the form. Archived forms are not made available in the UI."
    },
    "tags": {
      "type": "array",
      "description": "List of sharing tags for the form. The form will be made available to child organizations with matching tags."
    },
    "labels": {
      "type": "array",
      "description": "List of labels for the form. Form labels will be passed on in conversation.forms, as well as conversation.results and in Results messages when the form is processed."
    },
    "pointsByAgent": {
      "type": "number",
      "description": "Number of points when an agent submits a result with this form."
    },
    "pointsByBot": {
      "type": "number",
      "description": "Number of points when a bot submits a result with this form."
    },
    "meta": {
      "type": "object",
      "properties": {
        "someKey": {
          "type": "string",
          "description": "An example of a free-form key/value pair."
        },
        "anotherKey": {
          "type": "string",
          "description": "Another example of a free-form key/value pair."
        }
      },
      "description": "Free-form object of key-values, that will be passed on to external systems."
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the form was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the form was last modified."
    }
  },
  "required": [
    "name"
  ]
}

Delete a Form
DELETE/forms/{form_id}

Delete a Form, including all its sub-resources.

Example URI

DELETE https://api.web1on1.chat/v2/forms/form_id
URI Parameters
HideShow
form_id
string (required) 

ID of the Form.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  204

Form Fields

List all Form Fields for a Form
GET/forms/{form_id}/fields

Return a list of all form fields for a Form.

Example URI

GET https://api.web1on1.chat/v2/forms/form_id/fields
URI Parameters
HideShow
form_id
string (required) 

ID of the Form.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id": "5877ff19276f4e04db18e330",
    "name": "appointmentDate",
    "label": "Appointment Date",
    "type": "button",
    "entity": "Date",
    "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
    "options": [
      {
        "key": "yes",
        "value": "Y"
      }
    ],
    "required": true,
    "createdAt": "2016-01-07T14:03:43Z",
    "updatedAt": "2016-01-07T14:03:43Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Create a new Form Field
POST/forms/{form_id}/fields

You may add a form field to a form using this action.

Example URI

POST https://api.web1on1.chat/v2/forms/form_id/fields
URI Parameters
HideShow
form_id
string (required) 

ID of the Form.

Request
HideShow
Headers
Content-Type: application/json
Authorization: Bearer <token>
Body
{
  "name": "appointmentDate",
  "label": "Appointment Date",
  "type": "button",
  "entity": "Date",
  "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
  "options": [
    {
      "key": "yes",
      "value": "Y"
    }
  ],
  "required": true
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Field identifier, short name to identify the field"
    },
    "label": {
      "type": "string",
      "description": "HTML label to add to the field"
    },
    "type": {
      "type": "string",
      "enum": [
        "button",
        "checkbox",
        "color",
        "date",
        "datetime-local",
        "email",
        "file",
        "hidden",
        "image",
        "month",
        "number",
        "password",
        "radio",
        "range",
        "reset",
        "search",
        "select",
        "submit",
        "tel",
        "text",
        "textarea",
        "time",
        "url",
        "week"
      ],
      "default": "text",
      "description": "HTML5 input type, and the elements 'select' and 'textearea'."
    },
    "entity": {
      "type": "string",
      "description": "Name of the entity that this field represents."
    },
    "pattern": {
      "type": "string",
      "description": "HTML5 input pattern attribute, a JavaScript regular expression which the input's value must match."
    },
    "options": {
      "type": "array",
      "description": "An array of options for select form field to display. Each option should be an object with a 'key' (string) and a 'value' (string)."
    },
    "required": {
      "type": "boolean",
      "description": "Field is required.",
      "default": false
    }
  },
  "required": [
    "name"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json
Location: /forms/5656f3ca42fc302027eba5c6/fields/5877a5ecb6b1bc76263e0a85
Body
{
  "id": "5877ff19276f4e04db18e330",
  "name": "appointmentDate",
  "label": "Appointment Date",
  "type": "button",
  "entity": "Date",
  "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
  "options": [
    {
      "key": "yes",
      "value": "Y"
    }
  ],
  "required": true,
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the field."
    },
    "name": {
      "type": "string",
      "description": "Field identifier, short name to identify the field"
    },
    "label": {
      "type": "string",
      "description": "HTML label to add to the field"
    },
    "type": {
      "type": "string",
      "enum": [
        "button",
        "checkbox",
        "color",
        "date",
        "datetime-local",
        "email",
        "file",
        "hidden",
        "image",
        "month",
        "number",
        "password",
        "radio",
        "range",
        "reset",
        "search",
        "select",
        "submit",
        "tel",
        "text",
        "textarea",
        "time",
        "url",
        "week"
      ],
      "default": "text",
      "description": "HTML5 input type, and the elements 'select' and 'textearea'."
    },
    "entity": {
      "type": "string",
      "description": "Name of the entity that this field represents."
    },
    "pattern": {
      "type": "string",
      "description": "HTML5 input pattern attribute, a JavaScript regular expression which the input's value must match."
    },
    "options": {
      "type": "array",
      "description": "An array of options for select form field to display. Each option should be an object with a 'key' (string) and a 'value' (string)."
    },
    "required": {
      "type": "boolean",
      "description": "Field is required.",
      "default": false
    },
    "createdAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the form field was created."
    },
    "updatedAt": {
      "type": "string",
      "description": "ISO8601 date and time of when the form field was last modified."
    }
  },
  "required": [
    "name"
  ]
}

Retrieve a Form Field
GET/forms/{form_id}/fields/{field_id}

Returns a specific Form Field for a Form.

Example URI

GET https://api.web1on1.chat/v2/forms/form_id/fields/field_id
URI Parameters
HideShow
form_id
string (required) 

ID of the Form.

field_id
string (required) 

ID of the Form Field.

Request
HideShow
Headers
Authorization: Bearer <token>
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "5877ff19276f4e04db18e330",
  "name": "appointmentDate",
  "label": "Appointment Date",
  "type": "button",
  "entity": "Date",
  "pattern": "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))",
  "options": [
    {
      "key": "yes",
      "value": "Y"
    }
  ],
  "required": true,
  "createdAt": "2016-01-07T14:03:43Z",
  "updatedAt": "2016-01-07T14:03:43Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the field."
    },
    "name": {
      "type": "string",
      "description": "Field identifier, short name to identify the field"
    },
    "label": {
      "type": "string",
      "description": "HTML label to add to the field"
    },
    "type": {
      "type": "string",
      "enum": [
        "button",
        "checkbox",
        "color",
        "date",
        "datetime-local",
        "email",
        "file",
        "hidden",
        "image",
        "month",
        "number",
        "password",
        "radio",
        "range",
        "reset",
        "search",
        "select",
        "submit",
        "tel",
        "text",
        "textarea",
        "time",
        "url",
        "week"
      ],
      "default": "text",
      "description": "HTML5 input type, and the elements 'select' and 'textearea'."
    },
    "entity": {
      "type": "string",
      "description": "Name of the entity that this field represents."
    },
    "pattern": {
      "type": "string",
      "description": "HTML5 input pattern attribute, a JavaScript regular expression which the input's value must match."
    },
    "options": {
      "type": "array",
      "description": "An array of options for select form field to display. Each option should be an object with a 'key' (string) and a 'value' (string)."
    },
    "required": {
      "type": "boolean",
      "description": "Field is required.",
      "default": false
    },
    "