TwoWay Whatsap API – Auth & Teams Service v1.0.0

Share on facebook
Share on twitter
Share on linkedin

Authentication

  • API Key (otp)
    • Parameter Name: Authorization, in: header. The phone number contactenated with the OTP, prefixed with X-OTP

Eg. if the OTP is 123456 and the phone number is 9112345, then ‘Authorization: X-OTP 9112345:123456’

  • oAuth2 authentication.
    • Flow: password
    • Token URL = https://api-teams.twoway.ai/oauth2/token
SCOPE SCOPE DESCRIPTION
TOKENS_READ Read all tokens belonging to your account
TOKENS_DELETE Delete a token belonging to your account
TEAMLINK_CREATE Create a new invite link for the team
TEAM_UPDATE Modify the details of the team
ADMIN_PANEL_ACCESS Access admin level functionality
USERS_PATCH Update your personal info
PARTNER_ADMIN_PANEL_ACCESS Admin access to all users/teams created using a referral code
TEAM_NOTIFY Allow the notifying of Teams

OAuth

tokenPost

 

POST /token

Login to twoway.ai

{
“phoneNumber”: 9122321223,
“password”: “abcd”,
“scopes”: [
“WA_LIVE_EVENTS”
]
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
body body AuthRequest false none
{
“access_token”: “string”,
“refresh_token”: “string”,
“refresh_token_expiry”: “2019-08-24T14:15:22Z”,
“was_forced”: true
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
409 Conflict There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 200

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» access_token string true none none
» refresh_token string false none none

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 409

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

This operation does not require authentication

tokenGet

 

GET /token

Fetch list of tokens

Returns in descending order of most recently used

[
{
“token”: “string”,
“userId”: “string”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”
}
]
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 200

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous [RefreshToken] false none [A refresh token allows you to generate access tokens to access & update things on twoway.ai services.
A refresh token will expire and become invalidated after 14 days of no activity.
]

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai ( Scopes: TOKENS_READ )

tokenDelete

 

DELETE /token

Revoke refresh tokens

If the token is not specified, all tokens of the user are revoked

Parameters
NAME IN TYPE REQUIRED DESCRIPTION
token query string(uuid) false none
{
“statusCode”: 200,
“error”: “string”,
“message”: “string”,
“data”: {}
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
204 No Content Revoked None
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai ( Scopes: TOKENS_DELETE )

tokenPostExternal

 

POST /token/external

Login via an external partner

{
“type”: “boutir”,
“username”: “string”,
“password”: “string”,
“referralCode”: “string”
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
body body ExternalTokenRequest false none
{
“created”: true,
“access_token”: “string”,
“refresh_token”: “string”,
“refresh_token_expiry”: “2019-08-24T14:15:22Z”
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK ExternalTokenPostResponse

This operation does not require authentication

Invite Links

inviteLinksPost

 

POST /invite-links

Create an invite link for the team

To generate an invite link for a specific set of scopes, you must also have the same set of scopes. Eg. you cannot generate a link which gives access to MESSAGE_SEND when you don’t have access to MESSAGE_SEND yourself. This is done for obvious security concerns.

{
“scopes”: [
“WA_STATE”
]
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
body body object false none
» scopes body [Scope] true none
Enumerated Values
PARAMETER VALUE
» scopes WA_STATE
» scopes CONTACTS_READ_ASSIGNED
» scopes CONTACTS_READ_ALL
» scopes CONTACTS_EXPORT_BUTTON
» scopes CONTACTS_CREATE
» scopes CONTACTS_DELETE
» scopes CONTACTS_UPDATE
» scopes CAMPAIGNS_READ
» scopes CAMPAIGNS_CREATE
» scopes CAMPAIGNS_DELETE
» scopes CAMPAIGNS_UPDATE
» scopes KEYWORD_READ
» scopes KEYWORD_CREATE
» scopes KEYWORD_DELETE
» scopes KEYWORD_UPDATE
» scopes TEMPLATES_READ
» scopes TEMPLATES_CREATE
» scopes TEMPLATES_DELETE
» scopes TEMPLATES_UPDATE
» scopes TAGS_READ
» scopes TAGS_CREATE
» scopes TAGS_DELETE
» scopes TOKENS_READ
» scopes TOKENS_DELETE
» scopes USERS_PATCH
» scopes REFERRAL_APPLY_CREDIT
» scopes TEAM_UPDATE
» scopes ACCOUNT_CREATE
» scopes ACCOUNT_READ
» scopes ACCOUNT_DELETE
» scopes ACCOUNT_PATCH
» scopes TEAMLINK_CREATE
» scopes TEAMLINK_READ
» scopes TEAMMEMBERS_UPDATE
» scopes TEAMMEMBERS_READ
» scopes TEAM_NOTIFY
» scopes CHATS_ACCESS_ALL
» scopes CHATS_ACCESS_ASSIGNED
» scopes CHATS_DELETE
» scopes MESSAGES_SEND_TO_ASSIGNED
» scopes MESSAGES_SEND_TO_ALL
» scopes MESSAGES_SCHEDULE
» scopes MESSAGES_DELETE
» scopes GROUPS_CREATE
» scopes GROUPS_UPDATE
» scopes NOTES
» scopes NOTIFICATION_READ
» scopes NOTIFICATION_CREATE
» scopes NOTIFICATION_UPDATE
» scopes NOTIFICATION_DELETE
» scopes INTEGRATIONS_UPDATE
» scopes ADMIN_PANEL_ACCESS
» scopes PAYMENTS_READ
» scopes PAYMENTS_UPDATE
» scopes WA_LIVE_EVENTS
» scopes twoway.ai_HOOK
» scopes PARTNER_ADMIN_PANEL_ACCESS
» scopes PRODUCTS_GET
» scopes PRODUCTS_CREATE
» scopes PRODUCTS_UPDATE
» scopes PRODUCTS_DELETE
» scopes PAYMENT_INTEGRATION_READ
» scopes PAYMENT_INTEGRATION_WRITE
» scopes PAYMENT_RECORDS_READ
» scopes PAYMENT_RECORDS_WRITE
» scopes METRICS_GET
» scopes ACCOUNTS_READ_ASSIGNED
» scopes AUTOCOMPLETE_GET
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“team”: {},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{}
],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
}
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK InviteLink
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai ( Scopes: TEAMLINK_CREATE )

inviteLinksGet

 

GET /invite-links/{id}

Get info about an invite link

Parameters
NAME IN TYPE REQUIRED DESCRIPTION
id path string(uuid) true the invite link ID
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“team”: {},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{}
],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
}
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK InviteLink
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai

Teams

teamsGet

 

GET /teams

Fetch teams you have access to

Parameters
NAME IN TYPE REQUIRED DESCRIPTION
q query string false Search by name, ID, invite code, etc.
partnership query string false Search by partnership
onboardingScoreMin query integer false The minimum onboarding score of the teams to return
onboardingScoreMax query integer false The maximum onboarding score of the teams to return
createdAfter query Timestamp false Teams after a given date-time
completedSteps query array[string] false Teams that have completed the given Steps
id query array[string] false Fetch specific teams by ID
userId query string(uuid) false teams that contain this user ID
count query integer false The numbers of items to return
page query integer false The page number
includeTeamMembers query boolean false Should include the team members. Will only return members for which you have the TEAMMEMBERS_READ scope
includeInviteLinks query boolean false Should include the invite links. Will only return invite links for which you have the TEAMLINKS_READ scope
includeTotal query boolean false include the count of the total teams
includeCreator query boolean false include the creator’s data in the API result
partner query string false string to identify user with a partner
returnOnboardingScore query boolean false return the onboarding score for the team
Enumerated Values
PARAMETER VALUE
completedSteps connectedWa
completedSteps sentMessage
completedSteps usedMobileVersion
completedSteps invitedTeamMember
completedSteps createdNote
completedSteps createdTag
completedSteps createdMessageFlow
completedSteps sentMessageFlowByShortcut
completedSteps assignedChatToTeamMember
completedSteps scheduledAMessage
completedSteps createdMessageFlowWithButtons
completedSteps sentMessageFlowWithButtons
completedSteps autoTagOrAssignWithMessageFlow
completedSteps createdFirstBroadcast
completedSteps scheduledFirstBroadcast
completedSteps toggleOfflineBotOn
completedSteps createdFirstKeywordBot
completedSteps connectFirstIntegration
completedSteps importedContacts
completedSteps adddedACustomFieldToContact
{
“total”: 0,
“teams”: [
{
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: []
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“team”: {},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [],
“webPushSubscriptions”: [],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
}
]
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 200

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» total number false none none
» teams [Team] true none none
»»» webPushSubscriptions [WebPushSubscription] false none none
»» name string true none none
»» isAdmin boolean false none Is an admin team
»» scopes [Scope] true none The max scopes allowed
»» partnerAdmin string¦null false none The team will be the admin team of a twoway.ai partner if this property is not null.
»» onboardingStepsDone [OnboardingStep] false none none
»» onboardingScore number false none The onboarding score of the team.

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai

teamsPatch

 

PATCH /teams

Update the team the access token is for

  • If you want to update/delete members — ensure you have the TEAMMEMBERS_UPDATE scope
  • If you want to delete invite links — ensure you have the TEAMLINKS_UPDATE scope
  • Also you cannot delete/update yourself in the team. If you attempt to do so, a 400 will be returned
{
“name”: “string”,
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“scopes”: [
“WA_STATE”
],
“delete”: true
}
],
“inviteLinks”: [
{
“id”: “string”,
“delete”: true
}
]
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
body body TeamPatchRequest false none
{
“success”: true
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 200

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» success boolean true none none

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai ( Scopes: TEAM_UPDATE )

teamsCompletedOnboardingStepPost

 

POST /teams/completed-onboarding-step/{step}

Mark a team as having completed an onboarding step

Parameters
NAME IN TYPE REQUIRED DESCRIPTION
step path OnboardingStepID true the onboarding step to mark as completed
Enumerated Values
PARAMETER VALUE
step connectedWa
step sentMessage
step usedMobileVersion
step invitedTeamMember
step createdNote
step createdTag
step createdMessageFlow
step sentMessageFlowByShortcut
step assignedChatToTeamMember
step scheduledAMessage
step createdMessageFlowWithButtons
step sentMessageFlowWithButtons
step autoTagOrAssignWithMessageFlow
step createdFirstBroadcast
step scheduledFirstBroadcast
step toggleOfflineBotOn
step createdFirstKeywordBot
step connectFirstIntegration
step importedContacts
step adddedACustomFieldToContact
{
“success”: true
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
Response Schema

Status Code 200

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» success boolean true none none

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai

teamsJoinInvite

 

POST /teams/join

Join a team

Parameters
NAME IN TYPE REQUIRED DESCRIPTION
id query string true inviteLink ID
{
“statusCode”: 200,
“error”: “string”,
“message”: “string”,
“data”: {}
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
204 No Content OK None
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
404 Not Found There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 404

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai

partnerTeamPatch

 

PATCH /teams/partner-team-status/{teamId}

Upgrade the team to ‘partner’ if partner is specified, else, downgrade partner status

{
“partnerAdmin”: “string”
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
teamId path string true the teamId of the team to be upgraded/downgraded
body body object false none
» partnerAdmin body string¦null true none
{
“success”: true
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
Response Schema

Status Code 200

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» success boolean true none none

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai ( Scopes: ADMIN_PANEL_ACCESS )

Users

usersGet

 

GET /users

Fetch users you have access to

Parameters
NAME IN TYPE REQUIRED DESCRIPTION
q query string false Search by name, ID, email, phone etc.
partnership query string false Search by partnership
id query array[string] false Fetch specific users by ID
originalTeamId query array[string] false Fetch specific users by original team ID
count query integer false The numbers of items to return
page query integer false The page number
includeMemberships query boolean false Should include the user’s memberships
includeTotal query boolean false should return total count of accessible users
other query array[string] false other internal query options
{
“total”: 0,
“users”: [
{
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {},
“name”: “string”,
“isAdmin”: true,
“scopes”: [],
“metadata”: {},
“members”: [],
“inviteLinks”: [],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [],
“onboardingScore”: 0
},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
}
]
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 200

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» total number false none none
» users [User] true none none
»»»» partnerAdmin string¦null false none The team will be the admin team of a twoway.ai partner if this property is not null.
»»»» onboardingStepsDone [OnboardingStep] false none none
»»»» onboardingScore number false none The onboarding score of the team.
»» webPushSubscriptions [WebPushSubscription] false none none

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai

usersPost

 

POST /users

Create a new user

{
“fullName”: “Jeff”,
“phoneNumber”: 911234567789,
“password”: “stringstringstringstring”,
“emailAddress”: [email protected],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
body body UserCreate false none
{
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK User
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
409 Conflict There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 409

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: otp, twoway.ai ( Scopes: ADMIN_PANEL_ACCESS PARTNER_ADMIN_PANEL_ACCESS )

usersPatch

 

PATCH /users

Update the user in the access token

{
“fullName”: “Somebody”,
“emailAddress”: [email protected],
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“phoneNumber”: 0,
“otp”: 0,
“password”: “string”,
“signature”: “string”,
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
userId query string(uuid) false Change the password of this user ID
body body UserPatch false none
{
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK User

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai ( Scopes: USERS_PATCH )

usersDelete

 

DELETE /users

Delete a user

Deletes the user specified

Parameters
NAME IN TYPE REQUIRED DESCRIPTION
id query string(uuid) true none
{
“statusCode”: 200,
“error”: “string”,
“message”: “string”,
“data”: {}
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
204 No Content Deleted None
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai ( Scopes: ADMIN_PANEL_ACCESS PARTNER_ADMIN_PANEL_ACCESS )

usersPasswordPatch

 

PATCH /users/password

Reset user password

{
“password”: “string”
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
body body ResetPassword false none
Responses
STATUS MEANING DESCRIPTION SCHEMA
204 No Content OK None

To perform this operation, you must be authenticated by means of one of the following methods: otp

OTP

otpPost

 

POST /otp

Generate an OTP

{
“phoneNumber”: “string”,
“template”: “twoway.ai”,
“captchaToken”: “string”
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
body body object false none
» phoneNumber body string true none
» template body string false Optionally specify the OTP template type
» captchaToken body string false none
{
“phoneNumber”: 0,
“otp”: 100000,
“expiresAt”: “2019-08-24T14:15:22Z”,
“resendsLeft”: 0
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK OTP

This operation does not require authentication

confirmOtp

 

POST /verify-otp

Confirm OTP while checkout products.

{
“success”: true
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
Response Schema

Status Code 200

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» success boolean false none none

To perform this operation, you must be authenticated by means of one of the following methods: otp

Notifications

notify

 

POST /notify

Notify a team member

{
“title”: “string”,
“content”: “string”,
“overrides”: {
“whatsapp”: {
“botId”: “string”
}
},
“parameters”: {
“property1”: null,
“property2”: null
}
}
Parameters
NAME IN TYPE REQUIRED DESCRIPTION
userId query string false The user to notify, leave undefined to send to team owner
teamId query string false none
notifyWhatsApp query boolean false Override notify on WhatsApp
notifyEmail query boolean false Override notify on Email
notifyDesktop query boolean false Override notify on Desktop
body body NotifyRequestWithContent false none
{
“whatsapp”: “string”,
“email”: “string”,
“desktop”: “string”
}
Responses
STATUS MEANING DESCRIPTION SCHEMA
200 OK OK Inline
400 Bad Request There was an error Inline
401 Unauthorized There was an error Inline
403 Forbidden There was an error Inline
404 Not Found There was an error Inline
500 Internal Server Error There was an error Inline
Response Schema

Status Code 400

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 401

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 403

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 404

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

Status Code 500

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
» statusCode number false none none
» error string false none Specific description of the error
» message string false none What the error was
» data object false none Some extra information about the error

To perform this operation, you must be authenticated by means of one of the following methods: twoway.ai ( Scopes: TEAM_NOTIFY )

Schemas

Scope
“WA_STATE”
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous string false none none
Enumerated Values
PROPERTY VALUE
anonymous WA_STATE
anonymous CONTACTS_READ_ASSIGNED
anonymous CONTACTS_READ_ALL
anonymous CONTACTS_EXPORT_BUTTON
anonymous CONTACTS_CREATE
anonymous CONTACTS_DELETE
anonymous CONTACTS_UPDATE
anonymous CAMPAIGNS_READ
anonymous CAMPAIGNS_CREATE
anonymous CAMPAIGNS_DELETE
anonymous CAMPAIGNS_UPDATE
anonymous KEYWORD_READ
anonymous KEYWORD_CREATE
anonymous KEYWORD_DELETE
anonymous KEYWORD_UPDATE
anonymous TEMPLATES_READ
anonymous TEMPLATES_CREATE
anonymous TEMPLATES_DELETE
anonymous TEMPLATES_UPDATE
anonymous TAGS_READ
anonymous TAGS_CREATE
anonymous TAGS_DELETE
anonymous TOKENS_READ
anonymous TOKENS_DELETE
anonymous USERS_PATCH
anonymous REFERRAL_APPLY_CREDIT
anonymous TEAM_UPDATE
anonymous ACCOUNT_CREATE
anonymous ACCOUNT_READ
anonymous ACCOUNT_DELETE
anonymous ACCOUNT_PATCH
anonymous TEAMLINK_CREATE
anonymous TEAMLINK_READ
anonymous TEAMMEMBERS_UPDATE
anonymous TEAMMEMBERS_READ
anonymous TEAM_NOTIFY
anonymous CHATS_ACCESS_ALL
anonymous CHATS_ACCESS_ASSIGNED
anonymous CHATS_DELETE
anonymous MESSAGES_SEND_TO_ASSIGNED
anonymous MESSAGES_SEND_TO_ALL
anonymous MESSAGES_SCHEDULE
anonymous MESSAGES_DELETE
anonymous GROUPS_CREATE
anonymous GROUPS_UPDATE
anonymous NOTES
anonymous NOTIFICATION_READ
anonymous NOTIFICATION_CREATE
anonymous NOTIFICATION_UPDATE
anonymous NOTIFICATION_DELETE
anonymous INTEGRATIONS_UPDATE
anonymous ADMIN_PANEL_ACCESS
anonymous PAYMENTS_READ
anonymous PAYMENTS_UPDATE
anonymous WA_LIVE_EVENTS
anonymous twoway.ai_HOOK
anonymous PARTNER_ADMIN_PANEL_ACCESS
anonymous PRODUCTS_GET
anonymous PRODUCTS_CREATE
anonymous PRODUCTS_UPDATE
anonymous PRODUCTS_DELETE
anonymous PAYMENT_INTEGRATION_READ
anonymous PAYMENT_INTEGRATION_WRITE
anonymous PAYMENT_RECORDS_READ
anonymous PAYMENT_RECORDS_WRITE
anonymous METRICS_GET
anonymous ACCOUNTS_READ_ASSIGNED
anonymous AUTOCOMPLETE_GET
JWT
{
“scope”: “1010101011”,
“exp”: 0,
“iat”: 0,
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“fullName”: “string”,
“phoneNumber”: 0,
“emailAddress”: “string”
}
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
scope string true none Binary representation of the scope array
exp number true none none
iat number true none none
user object true none none
BoutirTokenRequest
{
“type”: “boutir”,
“username”: “string”,
“password”: “string”,
“referralCode”: “string”
}

Login with Boutir

Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
type string true none none
username string true none none
password string true none none
referralCode string false none none
Enumerated Values
PROPERTY VALUE
type boutir
FirebaseTokenRequest
{
“type”: “firebase”,
“idToken”: “string”,
“referralCode”: “string”
}

Login with Firebase

Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
type string true none none
idToken string true none none
referralCode string false none none
Enumerated Values
PROPERTY VALUE
type firebase
ExternalTokenRequest
{
“type”: “boutir”,
“username”: “string”,
“password”: “string”,
“referralCode”: “string”
}
Properties

oneOf

xor

TokenPostResponse
{
“access_token”: “string”,
“refresh_token”: “string”,
“refresh_token_expiry”: “2019-08-24T14:15:22Z”
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
access_token string true none none
refresh_token string false none none
ExternalTokenPostResponse
{
“created”: true,
“access_token”: “string”,
“refresh_token”: “string”,
“refresh_token_expiry”: “2019-08-24T14:15:22Z”
}
Properties

allOf

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous object false none none
» created boolean false none Was the user just created

and

PasswordAuthRequest
{
“phoneNumber”: 0,
“returnRefreshToken”: true,
“password”: “string”,
“passwordEncoding”: “shaBase64”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“scopes”: [
“WA_STATE”
],
“updateLastUsedTeam”: false,
“force”: false
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
phoneNumber number true none none
returnRefreshToken boolean false none none
password string true none Base64 encoded SHA256 of the plaintext password, or the plaintext itself. See “passwordEncoding” below
passwordEncoding string false none describe how the password is encoded
teamId string(uuid) false none The team ID to generate the token for, lastUsedTeam will be used otherwise
scopes [Scope] false none none
Enumerated Values
PROPERTY VALUE
passwordEncoding shaBase64
passwordEncoding plaintext
RefreshTokenLoginRequest
{
“refreshToken”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“scopes”: [
“WA_STATE”
],
“updateLastUsedTeam”: false,
“force”: false
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
refreshToken string true none none
teamId string(uuid) true none The team ID to generate the token for, lastUsedTeam will be used otherwise
scopes [Scope] false none none
AuthRequest
{
“phoneNumber”: 9122321223,
“password”: “abcd”,
“scopes”: [
“WA_LIVE_EVENTS”
]
}
Properties

oneOf

xor

NotifyRequestWithContent
{
“title”: “string”,
“content”: “string”,
“overrides”: {
“whatsapp”: {
“botId”: “string”
}
},
“parameters”: {
“property1”: null,
“property2”: null
}
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
title string true none none
content string true none none
overrides object false none none
» whatsapp object false none none
»» botId string true none none
parameters object false none none
» additionalProperties any false none none
RefreshToken
{
“token”: “string”,
“userId”: “string”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”
}

A refresh token allows you to generate access tokens to access & update things on twoway.ai services. A refresh token will expire and become invalidated after 14 days of no activity.

Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
token string true none none
userId string true none none
NotifyModel
{
“whatsapp”: true,
“email”: true,
“desktop”: true
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
whatsapp boolean false none none
email boolean false none none
desktop boolean false none none
ResetPassword
{
“password”: “string”
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
password string true none none
WebPushSubscription
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
endpoint string true none none
authKey string true none none
p256dhKey string true none none
UserPatch
{
“fullName”: “Somebody”,
“emailAddress”: [email protected],
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“phoneNumber”: 0,
“otp”: 0,
“password”: “string”,
“signature”: “string”,
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
fullName string false none none
emailAddress string(email)¦null false none none
UserCreate
{
“fullName”: “Jeff”,
“phoneNumber”: 911234567789,
“password”: “stringstringstringstring”,
“emailAddress”: [email protected],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
fullName string true none none
phoneNumber number true none Will only contain numbers, no + sign, brackets etc.
password string true none SHA256 of the plaintext password pls
emailAddress string(email)¦null false none none
UserCreateMethod
“admin-panel”
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous string false none none
Enumerated Values
PROPERTY VALUE
anonymous admin-panel
anonymous otp
anonymous boutir
anonymous instant-reg
anonymous firebase
User
{
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
id string(uuid) true none none
TeamMember
{
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“team”: {},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{}
],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{}
],
“inviteLinks”: [
{}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{}
],
“onboardingScore”: 0
},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
Properties

None

TeamMetadata
{
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
companyName string false none none
companyEmailAddress string false none none
companyWebsite string false none none
industry string false none none
InviteLink
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“team”: {},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{}
],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
}
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
id string true none none
Team
{
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{}
],
“inviteLinks”: [
{}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{}
],
“onboardingScore”: 0
},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{}
],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [],
“team”: {}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
},
“user”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{}
],
“webPushSubscriptions”: [
{
“endpoint”: “string”,
“authKey”: “string”,
“p256dhKey”: “string”
}
],
“partnership”: “string”
},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: [
“WA_STATE”
]
}
],
“inviteLinks”: [
{
“id”: “string”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“createdAt”: “2019-08-24T14:15:22Z”,
“expiresAt”: “2019-08-24T14:15:22Z”,
“scopes”: [
“WA_STATE”
],
“team”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“createdBy”: “25a02396-1048-48f9-bf93-102d2fb7895e”,
“creator”: {
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“createdAt”: “2019-08-24T14:15:22Z”,
“updatedAt”: “2019-08-24T14:15:22Z”,
“disabledAt”: “2019-08-24T14:15:22Z”,
“fullName”: “Jeff”,
“lastUsedTeamId”: “0d743bc5-8168-4e66-96b5-7601d32f72fa”,
“phoneNumber”: 911234567789,
“emailAddress”: [email protected],
“createdByMethod”: “admin-panel”,
“notify”: {
“whatsapp”: true,
“email”: true,
“desktop”: true
},
“referralCode”: “string”,
“signature”: “string”,
“memberships”: [
{}
],
“webPushSubscriptions”: [
{}
],
“partnership”: “string”
},
“name”: “string”,
“isAdmin”: true,
“scopes”: [
“WA_STATE”
],
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“team”: {},
“user”: {},
“userId”: “2c4a230c-5085-4924-a3e1-25fb4fc5965b”,
“teamId”: “a4ede8ba-7c0a-4485-8763-cbd9b282fbec”,
“addedAt”: “2019-08-24T14:15:22Z”,
“addedBy”: “string”,
“scopes”: []
}
],
“inviteLinks”: [],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
}
}
],
“partnerAdmin”: “string”,
“onboardingStepsDone”: [
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
],
“onboardingScore”: 0
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
id string(uuid) true none none
OnboardingStep
{
“id”: “connectedWa”,
“doneAt”: “2019-08-24T14:15:22Z”,
“doneBy”: “fe63c5f1-8ae8-4d7a-bd5d-2978381ffc83”
}
Properties

None

OnboardingStepID
“connectedWa”
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous string false none none
Enumerated Values
PROPERTY VALUE
anonymous connectedWa
anonymous sentMessage
anonymous usedMobileVersion
anonymous invitedTeamMember
anonymous createdNote
anonymous createdTag
anonymous createdMessageFlow
anonymous sentMessageFlowByShortcut
anonymous assignedChatToTeamMember
anonymous scheduledAMessage
anonymous createdMessageFlowWithButtons
anonymous sentMessageFlowWithButtons
anonymous autoTagOrAssignWithMessageFlow
anonymous createdFirstBroadcast
anonymous scheduledFirstBroadcast
anonymous toggleOfflineBotOn
anonymous createdFirstKeywordBot
anonymous connectFirstIntegration
anonymous importedContacts
anonymous adddedACustomFieldToContact
TeamPatchRequest
{
“name”: “string”,
“metadata”: {
“companyName”: “string”,
“companyEmailAddress”: “string”,
“companyWebsite”: “string”,
“industry”: “string”
},
“members”: [
{
“id”: “497f6eca-6276-4993-bfeb-53cbbbba6f08”,
“scopes”: [
“WA_STATE”
],
“delete”: true
}
],
“inviteLinks”: [
{
“id”: “string”,
“delete”: true
}
]
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
name string false none none
inviteLinks [object] false none none
» id string true none none
» delete boolean false none If set to true, will delete the invite link
OTP
{
“phoneNumber”: 0,
“otp”: 100000,
“expiresAt”: “2019-08-24T14:15:22Z”,
“resendsLeft”: 0
}
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
phoneNumber number true none none
otp number false none none
TeamID
“497f6eca-6276-4993-bfeb-53cbbbba6f08”

Unique identifier for a team

Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous string(uuid) false none Unique identifier for a team
UserID
“497f6eca-6276-4993-bfeb-53cbbbba6f08”

Unique identifier for a user

Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous string(uuid) false none Unique identifier for a user
Timestamp
“2019-08-24T14:15:22Z”
Properties
NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous string(date-time) false none none
NotificationResult
“string”
Properties

oneOf

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous string false none The error message when sending

xor

NAME TYPE REQUIRED RESTRICTIONS DESCRIPTION
anonymous boolean false none If “false”, this channel was not used.
If “true” — then the channel was successfully sent to
Leave a Replay
Page Navigation
Sign up for our Newsletter

Your privacy is 100% protected