openapi: 3.2.0 info: title: Vonage User API x-refined-note: - x-metaDescription differs across the merged source definitions and was not carried - x-metaTitle differs across the merged source definitions and was not carried version: '1.0' description: 'Operations tagged user across 4 of this provider''s published API definitions: vonage-application-v2-openapi.json, vonage-conversation-openapi.json, vonage-application-v2-openapi.yml, vonage-conversation-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.nexmo.com - url: https://api.nexmo.com/v1 tags: - name: User paths: /v1/users: get: security: - bearerAuth: [] operationId: getUsers tags: - User summary: List users parameters: - $ref: '#/components/parameters/page_size' - $ref: '#/components/parameters/order' - $ref: '#/components/parameters/cursor' - $ref: '#/components/parameters/user_name' responses: '200': description: List of users content: application/json: schema: type: object properties: page_size: $ref: '#/components/schemas/page_size' _embedded: description: A list of user objects. See the [get details of a specific user](#getUser) response fields for a description of the nested objects type: object x-nexmo-developer-collection-description-shown: true properties: users: type: array description: List of users matching the provided filter items: $ref: '#/components/schemas/user_lite' required: - users _links: type: object description: A series of links between resources in this API in the http://stateless.co/hal_specification.html. properties: first: type: object properties: href: type: string example: https://api.nexmo.com/v1/users?order=desc&page_size=10 self: type: object properties: href: type: string example: https://api.nexmo.com/v1/users?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D next: type: object properties: href: type: string example: https://api.nexmo.com/v1/users?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D prev: type: object properties: href: type: string example: https://api.nexmo.com/v1/users?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D required: - first - self required: - cursor - page_size - _embedded - _links '400': $ref: '#/components/responses/General400ValidationFailPageSize' '401': $ref: '#/components/responses/General401InvalidToken' '404': $ref: '#/components/responses/User404' '406': $ref: '#/components/responses/User406ValidationFailContentType' '429': $ref: '#/components/responses/General429TooManyRequests' '500': $ref: '#/components/responses/General500InternalError' post: security: - bearerAuth: [] operationId: createUser tags: - User summary: Create a user description: 'Note: Users must be created with an admin JWT.' responses: '201': description: Create a user response content: application/json: schema: $ref: '#/components/schemas/user' '400': $ref: '#/components/responses/General400ValidationFailName' '401': $ref: '#/components/responses/General401InvalidToken' '406': $ref: '#/components/responses/User406ValidationFailContentType' '429': $ref: '#/components/responses/General429TooManyRequests' '500': $ref: '#/components/responses/General500InternalError' requestBody: content: application/json: schema: type: object description: Create a User properties: name: $ref: '#/components/schemas/user_name' display_name: $ref: '#/components/schemas/user_display_name' image_url: $ref: '#/components/schemas/user_image_url' properties: $ref: '#/components/schemas/user_properties' channels: $ref: '#/components/schemas/user_channels' servers: - url: https://api.nexmo.com /v1/users/{id}: get: security: - bearerAuth: [] parameters: - $ref: '#/components/parameters/user_id_name' operationId: getUser tags: - User summary: Retrieve a user responses: '200': description: Retrieve a user content: application/json: schema: $ref: '#/components/schemas/user' '401': $ref: '#/components/responses/General401InvalidToken' '404': $ref: '#/components/responses/User404' '406': $ref: '#/components/responses/User406ValidationFailContentType' '429': $ref: '#/components/responses/General429TooManyRequests' '500': $ref: '#/components/responses/General500InternalError' patch: security: - bearerAuth: [] parameters: - $ref: '#/components/parameters/user_id' operationId: updateUser tags: - User summary: Update a user responses: '200': description: Update a user content: application/json: schema: $ref: '#/components/schemas/user' '400': $ref: '#/components/responses/General400ValidationFailName' '401': $ref: '#/components/responses/General401InvalidToken' '404': $ref: '#/components/responses/User404' '406': $ref: '#/components/responses/User406ValidationFailContentType' '429': $ref: '#/components/responses/General429TooManyRequests' '500': $ref: '#/components/responses/General500InternalError' requestBody: content: application/json: schema: properties: name: $ref: '#/components/schemas/user_name' display_name: $ref: '#/components/schemas/user_display_name' image_url: $ref: '#/components/schemas/user_image_url' channels: $ref: '#/components/schemas/user_channels' delete: security: - bearerAuth: [] parameters: - $ref: '#/components/parameters/user_id' operationId: deleteUser tags: - User summary: Delete a user description: Deleting a user **cannot be undone**. responses: '204': $ref: '#/components/responses/General204' '400': $ref: '#/components/responses/General400ValidationFailName' '401': $ref: '#/components/responses/General401InvalidToken' '404': $ref: '#/components/responses/User404' '406': $ref: '#/components/responses/User406ValidationFailContentType' '429': $ref: '#/components/responses/General429TooManyRequests' '500': $ref: '#/components/responses/General500InternalError' servers: - url: https://api.nexmo.com /users/{user_id}/conversations: parameters: - $ref: '#/components/parameters/user_id_2' get: operationId: getuserConversations tags: - User summary: List user conversations description: 'Please note that not all data is available in the list endpoint. Once you''ve identified the conversation you need to work with, use the GET /conversations/:id endpoint to fetch all of the conversation details' parameters: - $ref: '#/components/parameters/date_start' - $ref: '#/components/parameters/page_size' - $ref: '#/components/parameters/order' - $ref: '#/components/parameters/cursor' - $ref: '#/components/parameters/member_state' - $ref: '#/components/parameters/order_by' - $ref: '#/components/parameters/include_custom_data' responses: '200': description: OK content: application/json: schema: type: object properties: page_size: $ref: '#/components/schemas/page_size_2' _embedded: description: A list of conversation objects. See the [get details of a specific conversation](#retrieveConversation) response fields for a description of the nested objects type: object x-nexmo-developer-collection-description-shown: true properties: conversations: type: array description: List of conversations matching the provided filter items: $ref: '#/components/schemas/conversation_user' required: - conversations _links: type: object description: A series of links between resources in this API in the http://stateless.co/hal_specification.html. properties: first: type: object properties: href: type: string example: https://api.nexmo.com/v1/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10 self: type: object properties: href: type: string example: https://api.nexmo.com/v1/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D next: type: object properties: href: type: string example: https://api.nexmo.com/v1/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D prev: type: object properties: href: type: string example: https://api.nexmo.com/v1/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec/conversations?order=desc&page_size=10&cursor=7EjDNQrAcipmOnc0HCzpQRkhBULzY44ljGUX4lXKyUIVfiZay5pv9wg%3D required: - self required: - coursor - page_size - _embedded - _links '401': $ref: '#/components/responses/General401InvalidToken_2' '404': $ref: '#/components/responses/User404_2' '500': $ref: '#/components/responses/General500InternalError_2' security: - bearerAuth: [] servers: - url: https://api.nexmo.com/v1 components: responses: General500InternalError: description: Internal Error content: application/json: schema: type: object properties: title: type: string example: Internal Error. type: type: string example: https://developer.vonage.com/api/conversation#system:error:internal-error code: type: string example: system:error:internal-error detail: type: string example: Something went wrong. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee General400ValidationFailPageSize: description: Bad Request content: application/json: schema: type: object properties: title: type: string example: Bad request. type: type: string example: https://developer.vonage.com/api/conversation#http:error:validation-fail code: type: string example: http:error:validation-fail detail: type: string example: Input validation failure. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee invalid_parameters: type: array description: List of invalid parameters items: type: object properties: name: type: string example: page_size reason: type: string example: '"page_size" must be a number' User404: description: Not found content: application/json: schema: type: object properties: title: type: string example: Not found. type: type: string example: https://developer.vonage.com/api/conversation#user:error:not-found code: type: string example: user:error:not-found detail: type: string example: User does not exist, or you do not have access. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee General429TooManyRequests: description: Too Many Requests content: application/json: schema: type: object properties: title: type: string example: Too Many Requests. type: type: string example: https://developer.vonage.com/api/conversation#http:error:too-many-request code: type: string example: http:error:too-many-request detail: type: string example: You have exceeded your request limit. You can try again shortly. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee General204: description: Success response with no content General400ValidationFailName: description: Bad Request content: application/json: schema: type: object properties: title: type: string example: Bad request. type: type: string example: https://developer.vonage.com/api/conversation#http:error:validation-fail code: type: string example: http:error:validation-fail detail: type: string example: Input validation failure. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee invalid_parameters: type: array description: List of invalid parameters items: type: object properties: name: type: string example: name reason: type: string example: '"name" must be a string' General401InvalidToken: description: Unauthorized content: application/json: schema: type: object properties: title: type: string example: Unauthorized. type: type: string example: https://developer.vonage.com/api/conversation#system:error:invalid-token code: type: string example: system:error:invalid-token detail: type: string example: You did not provide a valid token. Please provide a valid token. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee User406ValidationFailContentType: description: Bad Request content: application/json: schema: type: object properties: title: type: string example: Bad request. type: type: string example: https://developer.vonage.com/api/conversation#http:error:validation-fail code: type: string example: http:error:validation-fail detail: type: string example: Invalid Content-Type. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee invalid_parameters: type: array description: List of invalid parameters items: type: object properties: name: type: string example: content-type reason: type: string example: content-type \"application/xml\" is not supported. Supported versions are [application/json] General500InternalError_2: description: Internal Error content: application/json: schema: type: object properties: title: type: string example: Internal Error. type: type: string example: https://developer.nexmo.com/api/conversation#system:error:internal-error code: type: string example: system:error:internal-error detail: type: string example: Something went wrong. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee User404_2: description: Not found content: application/json: schema: type: object properties: title: type: string example: Not found. type: type: string example: https://developer.nexmo.com/api/conversation#user:error:not-found code: type: string example: user:error:not-found detail: type: string example: User does not exist, or you do not have access. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee General401InvalidToken_2: description: Unauthorized content: application/json: schema: type: object properties: title: type: string example: Unauthorized. type: type: string example: https://developer.nexmo.com/api/conversation#system:error:invalid-token code: type: string example: system:error:invalid-token detail: type: string example: You did not provide a valid token. Please provide a valid token. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee General500InternalError_3: description: Internal Error content: application/json: schema: type: object properties: title: type: string example: Internal Error. type: type: string example: https://developer.nexmo.com/api/conversation#system:error:internal-error code: type: string example: system:error:internal-error detail: type: string example: Something went wrong. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee User404_3: description: Not found content: application/json: schema: type: object properties: title: type: string example: Not found. type: type: string example: https://developer.nexmo.com/api/conversation#user:error:not-found code: type: string example: user:error:not-found detail: type: string example: User does not exist, or you do not have access. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee General401InvalidToken_3: description: Unauthorized content: application/json: schema: type: object properties: title: type: string example: Unauthorized. type: type: string example: https://developer.nexmo.com/api/conversation#system:error:invalid-token code: type: string example: system:error:invalid-token detail: type: string example: You did not provide a valid token. Please provide a valid token. instance: type: string example: 00a5916655d650e920ccf0daf40ef4ee schemas: user_name: type: string example: my_user_name description: Unique name for a user user_properties: type: object description: User properties properties: custom_data: type: object description: custom key/value pairs example: custom_key: custom_value ttl: type: integer description: Time to live in seconds example: 3600 maximum: 2147483648 user_links: type: object properties: self: type: object properties: href: type: string example: https://api.nexmo.com/v1/users/USR-82e028d9-5201-4f1e-8188-604b2d3471ec user_lite: type: object properties: id: $ref: '#/components/schemas/user_id' name: $ref: '#/components/schemas/user_name' display_name: $ref: '#/components/schemas/user_display_name' _links: $ref: '#/components/schemas/user_links' user: type: object properties: id: $ref: '#/components/schemas/user_id' name: $ref: '#/components/schemas/user_name' display_name: $ref: '#/components/schemas/user_display_name' image_url: $ref: '#/components/schemas/user_image_url' properties: $ref: '#/components/schemas/user_properties' channels: $ref: '#/components/schemas/user_channels' _links: $ref: '#/components/schemas/user_links' page_size: type: number description: The amount of records returned in this response minimum: 1 maximum: 100 default: 10 example: 10 user_id: type: string example: USR-82e028d9-5201-4f1e-8188-604b2d3471ec description: User ID user_display_name: type: string example: My User Name description: A string to be displayed as user name. It does not need to be unique user_image_url: type: string example: https://example.com/image.png description: An image URL that you associate with the user user_channels: type: object properties: pstn: type: array items: type: object properties: number: type: integer example: 123457 sip: type: array items: type: object properties: uri: type: string example: sip:4442138907@sip.example.com;transport=tls description: Value must match regular expression ^(sip|sips):\\+?([\\w|:.\\-@;,=%&]+) username: type: string example: New SIP password: type: string example: Password vbc: type: array items: type: object properties: extension: type: string example: '403' websocket: type: array items: type: object properties: uri: type: string description: Value must match regular expression ^(ws|wss):\/\/[a-zA-Z0-9~#%@&-_?\\/.,:;)(\]\[]*$ example: wss://example.com/socket content-type: type: string example: audio/l16;rate=16000 enum: - audio/l16;rate=8000 - audio/l16;rate=16000 headers: description: Details of the Websocket to connect to type: object properties: customer_id: type: string example: ABC123 description: This is an example header. You can provide any headers you may need sms: type: array items: type: object properties: number: type: string example: '447700900000' mms: type: array items: type: object properties: number: type: string example: '447700900000' whatsapp: type: array items: type: object properties: number: type: string example: '447700900000' viber: type: array items: type: object properties: number: type: string example: '447700900000' messenger: type: array items: type: object properties: id: type: string example: 12345abcd conversation_members: type: object properties: id: $ref: '#/components/schemas/member_id' state: $ref: '#/components/schemas/member_state' conversation_image_url: type: - string - 'null' example: https://example.com/image.png description: An image URL that you associate with the conversation format: uri maxLength: 2048 conversation_display_name: type: - string - 'null' example: Customer Chat description: The public facing name of the conversation maxLength: 50 conversation_id: type: string example: CON-d66d47de-5bcb-4300-94f0-0c9d4b948e9a description: The unique identifier for this conversation conversation_links: type: object properties: self: type: object properties: href: type: string example: https://api.nexmo.com/v1/conversations/CON-7f977ca5-6e86-46a8-bdc9-67b9d8c8dfa9 page_size_2: type: integer description: The amount of records returned in this response minimum: 1 maximum: 100 default: 10 example: 10 conversation_properties: type: object description: Conversation properties properties: ttl: type: integer example: 60 description: Time to leave. After how many seconds an empty conversation is deleted. minimum: 0 maximum: 2147483648 custom_data: type: object description: Custom Key value pairs to be included with conversation data additionalProperties: type: string member_id: type: string example: MEM-63f61863-4a51-4f6b-86e1-46edebio0391 description: Member ID conversation_sequence_number: type: integer example: 0 description: The last Event ID in this conversation. This ID can be used to [retrieve a specific event](#getEvent). conversation_timestamp: type: object properties: created: type: string example: '2019-09-03T18:40:24.324Z' description: The time that the conversation was created updated: type: - string - 'null' example: '2019-09-03T18:50:24.324Z' description: The time that the conversation was updated destroyed: type: - string - 'null' example: '2019-09-05T18:40:24.324Z' description: The time that the conversation was destroyed conversation_user: type: object properties: id: $ref: '#/components/schemas/conversation_id' name: $ref: '#/components/schemas/conversation_name' display_name: $ref: '#/components/schemas/conversation_display_name' image_url: $ref: '#/components/schemas/conversation_image_url' sequence_number: $ref: '#/components/schemas/conversation_sequence_number' properties: $ref: '#/components/schemas/conversation_properties' timestamp: $ref: '#/components/schemas/conversation_timestamp' _links: $ref: '#/components/schemas/conversation_links' _embedded: $ref: '#/components/schemas/conversation_members' member_state: type: string description: The state that the member is in. Possible values are `INVITED`, `JOINED`, `LEFT`, or `UNKNOWN` example: JOINED enum: - INVITED - JOINED - LEFT - UNKNOWN conversation_name: type: string example: customer_chat description: Your internal conversation name. Must be unique. If not supplied a randomly generated name will be used. maxLength: 100 page_size_3: type: integer description: The amount of records returned in this response minimum: 1 maximum: 100 default: 10 example: 10 parameters: user_id_name: name: id | name in: path required: true description: Unique ID or name for a user schema: $ref: '#/components/schemas/user_id' page_size: name: page_size in: query description: Return this amount of records in the response required: false schema: $ref: '#/components/schemas/page_size' user_id: name: id in: path required: true description: Unique ID for a user schema: $ref: '#/components/schemas/user_id' cursor: name: cursor in: query description: 'The cursor to start returning results from. You are not expected to provide this manually, but to follow the url provided in `_links.next.href` or `_links.prev.href` in the response which contains a `cursor` value. ' schema: type: string required: false order: name: order in: query description: Return the records in ascending or descending order. required: false schema: type: string default: asc enum: - asc - desc - ASC - DESC user_name: name: name in: query required: false description: Unique name for a user schema: $ref: '#/components/schemas/user_name' user_id_2: name: user_id in: path required: true description: User ID schema: type: string include_custom_data: name: include_custom_data in: query schema: type: boolean member_state: name: state in: query schema: type: string enum: - INVITED - JOINED - LEFT date_start: name: date_start in: query required: false description: Return the records that occurred after this point in time. schema: example: '2018-01-01 10:00:00' type: string format: dateTime order_by: name: order_by in: query schema: type: string default: created enum: - created user_id_3: name: user_id in: path required: true description: User ID schema: type: string securitySchemes: basicAuth: type: http scheme: basic bearerAuth: type: http scheme: bearer bearerFormat: JWT x-refined-from: - vonage-application-v2-openapi.json - vonage-conversation-openapi.json - vonage-application-v2-openapi.yml - vonage-conversation-openapi.yml x-errors: validation: description: The provided payload is invalid resolution: 'Modify your request to provide a valid payload. * Minimum 8 characters * Maximum 25 characters * Minimum 1 lower case character * Minimum 1 upper case character * Minimum 1 digit ' link: text: View API reference url: /api/account#createAPISecret delete-last-secret: description: You can not delete your only API secret resolution: Add another API secret before deleting this one