openapi: 3.0.0
info:
title: 'WeSeeDo Direct - WeSeeDo'
version: 1.0.0
description: >-
WeSeeDo Direct API allows you to set up a video communication channel between people by sending an SMS with a link to the meeting.
---
## [Source view](https://app.swaggerhub.com/apis/kpn/weseedo-direct-weseedo/)
[Documentation view](https://app.swaggerhub.com/apis-docs/kpn/weseedo-direct-weseedo/)
---
## [KPN API Store](https://developer.kpn.com/)
[Getting Started](https://developer.kpn.com/getting-started)
---
contact:
name: API Support
email: api_developer@kpn.com
url: 'https://developer.kpn.com/support'
termsOfService: 'https://developer.kpn.com/legal'
servers:
- description: SwaggerHub API URL
url: https://api-prd.kpn.com/communication/weseedo/weseedodirect
components:
securitySchemes:
oauth2:
type: oauth2
flows:
clientCredentials:
tokenUrl: https://api-prd.kpn.com/oauth/client_credential/accesstoken?grant_type=client_credentials
responses:
bad_gateway:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Bad gateway
bad_request:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Bad request
forbidden:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Forbidden
method_not_allowed:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Method not allowed
not_found:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Not found
precondition_failed:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Precondition failed
server_error:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Server error
service_unavailable:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Service unavailable
too_many:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Too many requests
unauthorized:
content:
application/json:
schema:
$ref: '#/components/schemas/error'
description: Unauthorized
schemas:
Users_GetResponse:
properties:
success:
type: boolean
example: true
result:
type: array
items:
type: object
properties:
id:
type: string
name:
type: string
email:
type: string
locale:
type: string
role:
type: string
company:
$ref: '#/components/schemas/Company'
type: object
example:
- id: 58..eb
name: Agent 1
email: agent1@weseedo.nl
locale: nl
role: agent
company:
id: 58..60
name: WeSeeDo B.V.
- id: 58..ec
name: Assistent 1
email: assistent1@weseedo.nl
locale: nl
role: assistent
company:
id: 58..60
name: WeSeeDo B.V.
Users_GetUserByIdResponse:
properties:
success:
type: boolean
example: true
result:
$ref: '#/components/schemas/Users_GetResponse'
type: object
Company:
properties:
id:
type: string
example: 58..82
name:
type: string
example: WeSeeDo B.V.
type: object
Users_POSTPUTResponse:
properties:
success:
type: boolean
result:
type: array
items:
$ref: '#/components/schemas/User'
type: object
User:
properties:
id:
type: string
example: 58..82
first_name:
type: string
example: Testfirstname
last_name:
type: string
example: Testlastname
name:
type: string
example: Testfirstname Testlastname
email:
type: string
example: agent1@weseedo.nl
locale:
type: string
example: nl
role:
type: string
example: agent
created_at:
type: string
example: '2017-11-17T12:07:56.308Z'
company:
$ref: '#/components/schemas/Company'
type: object
MeetingResponse:
properties:
success:
type: boolean
result:
type: array
items:
type: object
properties:
id:
type: string
example: 5c...78
description: The generated ID for this meeting
room_id:
type: string
example: DA..At
description: The `room_id` that is being used for this meeting,
you generally do not need to use this information.
room_password:
type: string
example: Mp..Op
description: The `room_password` that is being used for this
meeting, you generally do not need to use this information.
duration:
type: integer
example: 0
description: Duration of the meeting in seconds
room_available_from:
type: integer
example: 1551971073
description: Timestamp that described from when the room
will be available.
room_available_till:
type: integer
example: 1552575873
description: Timestamp that described until when the room
will be available. If the conversation is still active
at this time, it will NOT be automatically terminated!
participants:
type: array
required:
- id
- name
- username
items:
type: object
properties:
username:
type: string
description: Automatically generated username for
a participant, for an agent this username has a
fixed value that is generated upon agent creation.
name:
type: string
description: Contains the name of the agent when the
participant is an agent, or the phone number of
the participant when it is a participant.
id:
type: string
description: The generated ID of an agent or participant
user:
type: string
description: Only returned for agents
email:
type: string
description: Only returned for agents
hash:
type: string
description: Only returned for participants (not agents).
This value should be sent along in the secure link
that will be sent to the participant, it authenticates
the participants.
example:
- username: agent.58eb.....
name: Agent 1
id: 5c..7a
user: 58..eb"
email: agent1@weseedo.nl
- username: visitor.Cxo9uuYVYFAJDW47
name: "+3112312312"
id: 5d..70
hash: SI..wO (use this value when sending a text message
to the recipient)
error:
properties:
info:
description: Additional information about error.
title: Info
type: string
message:
description: Error message
title: Error message
type: string
name:
description: Error name
title: Error name
type: string
status:
description: Status
title: Status
type: string
transactionId:
description: The `transaction_id` of the the request.
title: Transaction ID
type: string
paths:
"/api/sms":
post:
summary: Sends an SMS to a participant.
description: Sends an SMS to a participant.
tags:
- Meetings
security:
- oauth2: []
parameters:
- in: header
name: user_email
description: Enter the e-mail of the user.
schema:
type: string
required: true
requestBody:
description: The meeting to create.
required: true
content:
application/json:
schema:
type: object
properties:
participant:
type: string
example: a8..48
description: Use the `id` of the participant that was returned when
creating the meeting
body:
type: string
example: Click on the link and click `Allow`. https://login-direct.weseedo.nl/client.html?id=**REPLACE_WITH_PARTICIPANT_HASH**
description: The body of the SMS that is being sent to the participant.
Make sure to include the secure URL, use the `hash` of the participant
that was returned when creating the meeting."
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
result:
type: boolean
400:
$ref: '#/components/responses/bad_request'
401:
$ref: '#/components/responses/unauthorized'
403:
$ref: '#/components/responses/forbidden'
404:
$ref: '#/components/responses/not_found'
405:
$ref: '#/components/responses/method_not_allowed'
412:
$ref: '#/components/responses/precondition_failed'
429:
$ref: '#/components/responses/too_many'
500:
$ref: '#/components/responses/server_error'
502:
$ref: '#/components/responses/bad_gateway'
503:
$ref: '#/components/responses/service_unavailable'
"/api/meeting":
post:
summary: Creates a new meeting.
description: Creates a new meeting.
tags:
- Meetings
security:
- oauth2: []
parameters:
- in: header
name: user_email
description: Enter the e-mail of the agent user to send the SMS.
schema:
type: string
required: true
requestBody:
description: Enter the hone number of the participant. You can use any valid international phone number. For example `+31612312312`. `0612312312` or `12312312` are converted to `+31612312312`.
required: true
content:
application/json:
schema:
type: object
properties:
participant:
type: string
description: Phone number of the participant, either in the form
of +31612312312, 0612312312, 12312312 (is converted to +31612312312),
or any other valid international phone number.
example: "+3112312312"
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/MeetingResponse'
400:
$ref: '#/components/responses/bad_request'
401:
$ref: '#/components/responses/unauthorized'
403:
$ref: '#/components/responses/forbidden'
404:
$ref: '#/components/responses/not_found'
405:
$ref: '#/components/responses/method_not_allowed'
412:
$ref: '#/components/responses/precondition_failed'
429:
$ref: '#/components/responses/too_many'
500:
$ref: '#/components/responses/server_error'
502:
$ref: '#/components/responses/bad_gateway'
503:
$ref: '#/components/responses/service_unavailable'
"/api/users":
get:
summary: Retrieves a list of users.
description: Retrieves a list of users. Only users that you have access to will
be returned.
tags:
- Users
security:
- oauth2: []
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Users_GetResponse'
400:
$ref: '#/components/responses/bad_request'
401:
$ref: '#/components/responses/unauthorized'
403:
$ref: '#/components/responses/forbidden'
404:
$ref: '#/components/responses/not_found'
405:
$ref: '#/components/responses/method_not_allowed'
412:
$ref: '#/components/responses/precondition_failed'
429:
$ref: '#/components/responses/too_many'
500:
$ref: '#/components/responses/server_error'
502:
$ref: '#/components/responses/bad_gateway'
503:
$ref: '#/components/responses/service_unavailable'
post:
summary: Creates a new user.
description: Creates a new user.
tags:
- Users
security:
- oauth2: []
parameters:
- in: header
name: company_email
description: Please use your company's email address. This is the email you were onboarded on apistore.
schema:
type: string
requestBody:
description: The user to create.
required: true
content:
application/json:
schema:
type: object
properties:
first_name:
type: string
last_name:
type: string
password:
type: string
role:
type: string
description: Either `admin` or `agent`.
email:
type: string
locale:
type: string
description: Either `nl` or `en`.
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Users_POSTPUTResponse'
400:
$ref: '#/components/responses/bad_request'
401:
$ref: '#/components/responses/unauthorized'
403:
$ref: '#/components/responses/forbidden'
404:
$ref: '#/components/responses/not_found'
405:
$ref: '#/components/responses/method_not_allowed'
412:
$ref: '#/components/responses/precondition_failed'
429:
$ref: '#/components/responses/too_many'
500:
$ref: '#/components/responses/server_error'
502:
$ref: '#/components/responses/bad_gateway'
503:
$ref: '#/components/responses/service_unavailable'
"/api/users/{id}":
get:
summary: Retrieves a user.
description: |
Retrieves a specific user. Enter the **{id}** of a user without the brackets.
Example: 5fc0c29c70d9e4667019be99
tags:
- Users
security:
- oauth2: []
parameters:
- name: id
in: path
description: |
User ID.
required: true
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Users_GetUserByIdResponse'
400:
$ref: '#/components/responses/bad_request'
401:
$ref: '#/components/responses/unauthorized'
403:
$ref: '#/components/responses/forbidden'
404:
$ref: '#/components/responses/not_found'
405:
$ref: '#/components/responses/method_not_allowed'
412:
$ref: '#/components/responses/precondition_failed'
429:
$ref: '#/components/responses/too_many'
500:
$ref: '#/components/responses/server_error'
502:
$ref: '#/components/responses/bad_gateway'
503:
$ref: '#/components/responses/service_unavailable'
put:
summary: Updates a user.
description: Updated a specific user, replace **{id}** with the **id** attribute
of a user.
tags:
- Users
security:
- oauth2: []
parameters:
- name: id
in: path
description: User ID
required: true
schema:
type: string
requestBody:
description: The user to update.
required: true
content:
application/json:
schema:
type: object
properties:
first_name:
type: string
last_name:
type: string
locale:
type: string
description: Either `nl` or `en`.
responses:
200:
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/Users_POSTPUTResponse'
400:
$ref: '#/components/responses/bad_request'
401:
$ref: '#/components/responses/unauthorized'
403:
$ref: '#/components/responses/forbidden'
404:
$ref: '#/components/responses/not_found'
405:
$ref: '#/components/responses/method_not_allowed'
412:
$ref: '#/components/responses/precondition_failed'
429:
$ref: '#/components/responses/too_many'
500:
$ref: '#/components/responses/server_error'
502:
$ref: '#/components/responses/bad_gateway'
503:
$ref: '#/components/responses/service_unavailable'
delete:
summary: Deletes a user.
description: Deletes a user, replace **{id}** with the **id** attribute of a
user.
tags:
- Users
security:
- oauth2: []
parameters:
- name: id
in: path
description: User ID
required: true
schema:
type: string
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
example: true
result:
type: object
properties:
id:
type: string
example: 5a..82
400:
$ref: '#/components/responses/bad_request'
401:
$ref: '#/components/responses/unauthorized'
403:
$ref: '#/components/responses/forbidden'
404:
$ref: '#/components/responses/not_found'
405:
$ref: '#/components/responses/method_not_allowed'
412:
$ref: '#/components/responses/precondition_failed'
429:
$ref: '#/components/responses/too_many'
500:
$ref: '#/components/responses/server_error'
502:
$ref: '#/components/responses/bad_gateway'
503:
$ref: '#/components/responses/service_unavailable'
'/api/autologin':
get:
summary: Fetches the URL so that agent can login.
description: >-
Fetches the URL so that agent is able to login directly to the portal without entering his username and password.
tags:
- Autologin
security:
- oauth2: []
parameters:
- in: header
name: user_email
description: Enter the email of user who wants to autologin.
schema:
type: string
required: true
responses:
200:
description: OK
content:
application/json:
schema:
type: object
properties:
url:
type: string
example: https://sandbox-direct.weseedo.nl/login/token
400:
$ref: '#/components/responses/bad_request'
401:
$ref: '#/components/responses/unauthorized'
403:
$ref: '#/components/responses/forbidden'
404:
$ref: '#/components/responses/not_found'
405:
$ref: '#/components/responses/method_not_allowed'
412:
$ref: '#/components/responses/precondition_failed'
429:
$ref: '#/components/responses/too_many'
500:
$ref: '#/components/responses/server_error'
502:
$ref: '#/components/responses/bad_gateway'
503:
$ref: '#/components/responses/service_unavailable'