diff --git a/api/signalwire-rest/fabric-api/_spec_.yaml b/api/signalwire-rest/fabric-api/_spec_.yaml index 39b1c93..6d5739b 100644 --- a/api/signalwire-rest/fabric-api/_spec_.yaml +++ b/api/signalwire-rest/fabric-api/_spec_.yaml @@ -110,52 +110,64 @@ components: description: Unique ID of a Subscriber. schema: $ref: '#/components/schemas/uuid' + CxmlApplicationID: + name: id + in: path + required: true + description: Unique ID of a cXML Application. + schema: + $ref: '#/components/schemas/uuid' + CxmlApplicationIDPath: + name: cxml_application_id + in: path + required: true + description: Unique ID of a cXML Application. + schema: + $ref: '#/components/schemas/uuid' schemas: - - AIAgent: + AIAgentResponse: type: object required: - - name + - id + - project_id + - display_name + - type + - created_at + - updated_at + - ai_agent properties: - name: - type: string - example: My AI Agent - description: Name of the AI Agent. - prompt: + id: allOf: - - $ref: '#/components/schemas/AIPrompt' - description: Establishes the initial set of instructions and settings to configure the agent. - post_prompt: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the AIAgent. + project_id: allOf: - - $ref: '#/components/schemas/AIPostPrompt' - description: The final set of instructions and configuration settings to send to the agent. - params: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the AIAgent Fabric Resource + type: + type: string + example: external_laml_handler + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + ai_agent: allOf: - - $ref: '#/components/schemas/AIParams' - description: A JSON object containing parameters as key-value pairs. - pronounce: - type: array - items: - $ref: '#/components/schemas/Pronounce' - description: An array of JSON objects to clarify the AI's pronunciation of words or expressions. - hints: - type: array - items: - type: string - example: - - One Hint - - Two Hint - description: An array of hints (as strings) to provide context to the dialogue. - languages: - type: array - items: - $ref: '#/components/schemas/Languages' - description: An array of JSON objects defining supported languages in the conversation. - SWAIG: - type: array - items: - $ref: '#/components/schemas/SWAIG' - description: An array of JSON objects to create user-defined functions/endpoints that can be executed during the dialogue. + - $ref: '#/components/schemas/AIAgentWithID' + description: AIAgent data. AIAgentAddress: type: object required: @@ -306,7 +318,7 @@ components: data: type: array items: - $ref: '#/components/schemas/AIAgentWithID' + $ref: '#/components/schemas/AIAgentResponse' links: $ref: '#/components/schemas/AIAgentPaginationResponse' AIAgentPaginationResponse: @@ -2131,6 +2143,40 @@ components: allOf: - $ref: '#/components/schemas/Subscriber' description: Subscriber data. + SubscriberListResponse: + type: object + required: + - data + - links + properties: + data: + type: array + items: + $ref: '#/components/schemas/SubscriberResponse' + links: + $ref: '#/components/schemas/SubscriberPaginationResponse' + SubscriberPaginationResponse: + type: object + required: + - self + - first + - next + properties: + self: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=0&page_size=50 + description: Link of the current page + first: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=0&page_size=50 + description: Link to the first page + next: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page Subscriber: type: object required: @@ -2451,6 +2497,49 @@ components: - $ref: '#/components/schemas/UrlMethodType' example: POST description: Status callback method of the External LAML Handler. + ExternalLAMLHandlerResponse: + type: object + required: + - id + - project_id + - display_name + - type + - created_at + - updated_at + - external_laml_handler + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the ExternalLAMLHandler. + project_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the ExternalLAMLHandler Fabric Resource + type: + type: string + example: external_laml_handler + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + cxml_application: + allOf: + - $ref: '#/components/schemas/ExternalLAMLHandler' + description: ExternalLAMLHandler data. ExternalLAMLHandlerListResponse: type: object required: @@ -2460,7 +2549,7 @@ components: data: type: array items: - $ref: '#/components/schemas/ExternalLAMLHandler' + $ref: '#/components/schemas/ExternalLAMLHandlerResponse' links: $ref: '#/components/schemas/ExternalLAMLHandlerPaginationResponse' ExternalLamlHandlerUpdateStatusCode422: @@ -2756,6 +2845,49 @@ components: - $ref: '#/components/schemas/UrlMethodType' example: POST description: Status callback method of the External SWML Handler. + ExternalSWMLHandlerResponse: + type: object + required: + - id + - project_id + - display_name + - type + - created_at + - updated_at + - external_swml_handler + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the External SWML Handler. + project_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the External SWML Handler Fabric Resource + type: + type: string + example: external_swml_handler + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + cxml_application: + allOf: + - $ref: '#/components/schemas/ExternalSWMLHandler' + description: External SWML Handler data. ExternalSWMLHandlerListResponse: type: object required: @@ -2765,7 +2897,7 @@ components: data: type: array items: - $ref: '#/components/schemas/ExternalSWMLHandler' + $ref: '#/components/schemas/ExternalSWMLHandlerResponse' links: $ref: '#/components/schemas/ExternalSWMLHandlerPaginationResponse' ExternalSwmlHandlerUpdateStatusCode422: @@ -3301,75 +3433,369 @@ components: message: Ciphers are invalid attribute: ciphers url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - uuid: + + CxmlApplication: + type: object + required: + - id + - name + - handle_calls_using + - call_handler_url + - call_handler_method + - call_handler_fallback_url + - call_handler_fallback_method + - call_status_callback_url + - call_status_callback_method + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the cXML Application. + name: + type: string + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: + allOf: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: + type: string + example: https://example.com/cxml + description: Call handler URL + call_handler_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler URL method + call_handler_fallback_url: + type: string + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler fallback method. + call_status_callback_url: + type: string + example: https://callback.com + description: Call status callback URL + call_status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: POST + description: Call status callback method. + HandleCallsUsing: type: string - format: uuid - description: Universal Unique Identifier. - responses: - '204': - description: No Content - '400': - description: Bad Request - content: - application/json: - schema: - type: object - properties: - type: - type: string - code: - type: string - message: - type: string - attribute: - type: string - url: - type: string - format: uri - required: - - type - - code - - message - - url - example: - type: validation_error - code: invalid_parameter - message: Name must be present - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - '401': - description: Unauthorized - content: - application/json: - schema: - type: object - properties: - type: - type: string - code: - type: string - message: - type: string - attribute: - type: string - url: - type: string - format: uri - required: - - type - - code - - message - - url - example: - type: validation_error - code: invalid_parameter - message: Name must be present - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - '422': - description: Unprocessable Entity - content: - application/json: + enum: + - script + - external_url + CxmlApplicationAddress: + type: object + required: + - id + - resource_id + - name + - display_name + - type + - cover_url + - preview_url + - channel + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Unique ID of the Fabric Address. + resource_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Fabric resource ID that the Fabric Address belongs to. + name: + type: string + example: justice-league + description: Name of the Fabric Address. + display_name: + type: string + example: Justice League + description: Display name of the Fabric Address. + type: + allOf: + - $ref: '#/components/schemas/DisplayTypes' + example: app + description: Type of the Fabric Address. + cover_url: + type: string + example: https://coverurl.com + description: Cover url of the Fabric Address. + preview_url: + type: string + example: https://previewurl.com + description: Preview url of the Fabric Address. + channel: + allOf: + - $ref: '#/components/schemas/AddressChannel' + description: Channels of the Fabric Address. + CxmlApplicationAddressListResponse: + type: object + required: + - data + - links + properties: + data: + type: array + items: + $ref: '#/components/schemas/CxmlApplicationAddress' + links: + $ref: '#/components/schemas/CxmlApplicationAddressPaginationResponse' + CxmlApplicationAddressPaginationResponse: + type: object + required: + - self + - first + - next + properties: + self: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link of the current page + first: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link to the first page + next: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page + CxmlApplicationCreateRequest: + type: object + required: + - name + properties: + name: + type: string + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: + allOf: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: + type: string + example: https://example.com/cxml + description: Call handler URL + call_handler_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler URL method + default: POST + call_handler_fallback_url: + type: string + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler fallback method. + default: POST + call_status_callback_url: + type: string + example: https://callback.com + description: Call status callback URL + call_status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call status callback method. + default: POST + call_handler_script: + type: string + example: |- + + + https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 + + description: Script to handle to call. + CxmlApplicationCreateStatusCode422: + type: object + required: + - errors + properties: + errors: + type: array + items: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode422Error' + example: + errors: + - type: validation_error + code: missing_required_parameter + message: Name is required + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter + CxmlApplicationListResponse: + type: object + required: + - data + - links + properties: + data: + type: array + items: + $ref: '#/components/schemas/CxmlApplicationResponse' + links: + $ref: '#/components/schemas/CxmlApplicationPaginationResponse' + CxmlApplicationPaginationResponse: + type: object + required: + - self + - first + - next + properties: + self: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50 + description: Link of the current page + first: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50 + description: Link to the first page + next: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page + CxmlApplicationResponse: + type: object + required: + - id + - project_id + - display_name + - type + - created_at + - updated_at + - cxml_application + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the cXML Application. + project_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the cXML Application Fabric Resource + type: + type: string + example: cxml_application + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + cxml_application: + allOf: + - $ref: '#/components/schemas/CxmlApplication' + description: cXML Application data. + CxmlApplicationUpdateRequest: + type: object + properties: + name: + type: string + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: + allOf: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: + type: string + example: https://example.com/cxml + description: Call handler URL + call_handler_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler URL method + default: POST + call_handler_fallback_url: + type: string + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler fallback method. + default: POST + call_status_callback_url: + type: string + example: https://callback.com + description: Call status callback URL + call_status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call status callback method. + default: POST + call_handler_script: + type: string + example: |- + + + https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 + + description: Script to handle to call. + CxmlApplicationUpdateStatusCode422: + type: object + required: + - errors + properties: + errors: + type: array + items: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode422Error' + example: + errors: + - type: validation_error + code: missing_required_parameter + message: Name is required + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter + uuid: + type: string + format: uuid + description: Universal Unique Identifier. + responses: + '204': + description: No Content + '400': + description: Bad Request + content: + application/json: schema: type: object properties: @@ -3395,52 +3821,110 @@ components: message: Name must be present attribute: name url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - '404': - description: The server cannot find the requested resource. + '401': + description: Unauthorized content: application/json: schema: - type: string - enum: - - Not Found - -tags: - - name: AI Agents - - name: Call Flows - - name: cXML Applications - - name: Dialogflow Agents - - name: External LAML Handler - - name: External SWML Handler - - name: Fabric Addresses - - name: FreeSWITCH Connectors - - name: LAML Applications - - name: LAML Bins - - name: Relay Applications - - name: Resources - - name: SIP Endpoints - - name: Subscribers - - name: SWML Applications - - name: SWML Scripts - - name: Video Rooms - - name: Subscriber Guest Token - - name: Subscriber Invite Token -paths: - - /guests/tokens: - post: - operationId: GuestTokens_create - summary: Create Subscriber Guest Token - description: Creates a Subscriber Guest Token - parameters: [ ] - responses: - '201': - description: The request has succeeded and a new resource has been created as a result. - content: - application/json: - schema: - $ref: '#/components/schemas/SubscriberGuestTokenCreateResponse' - '401': - description: Access is unauthorized. + type: object + properties: + type: + type: string + code: + type: string + message: + type: string + attribute: + type: string + url: + type: string + format: uri + required: + - type + - code + - message + - url + example: + type: validation_error + code: invalid_parameter + message: Name must be present + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter + '422': + description: Unprocessable Entity + content: + application/json: + schema: + type: object + properties: + type: + type: string + code: + type: string + message: + type: string + attribute: + type: string + url: + type: string + format: uri + required: + - type + - code + - message + - url + example: + type: validation_error + code: invalid_parameter + message: Name must be present + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + +tags: + - name: AI Agents + - name: Call Flows + - name: cXML Application + - name: Dialogflow Agents + - name: External LAML Handler + - name: External SWML Handler + - name: Fabric Address + - name: FreeSWITCH Connectors + - name: LAML Applications + - name: LAML Bins + - name: Relay Applications + - name: Resources + - name: SIP Endpoints + - name: Subscribers + - name: SWML Applications + - name: SWML Scripts + - name: Video Rooms + - name: Subscriber Guest Token + - name: Subscriber Invite Token +paths: + + /guests/tokens: + post: + operationId: GuestTokens_create + summary: Create Subscriber Guest Token + description: Creates a Subscriber Guest Token + parameters: [ ] + responses: + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/SubscriberGuestTokenCreateResponse' + '401': + description: Access is unauthorized. content: application/json: schema: @@ -3511,7 +3995,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandler' + $ref: '#/components/schemas/ExternalLAMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -3587,7 +4071,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandler' + $ref: '#/components/schemas/ExternalLAMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -3618,7 +4102,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandler' + $ref: '#/components/schemas/ExternalLAMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -3682,7 +4166,7 @@ paths: summary: List Fabric Addresses description: |- A list of Fabric Addresses. This endpoint uses the bearer token authentication method with the SAT (Subscriber Access Token) wich can be - generated using the [Create Subscriber Token endpoint](/rest/signalwire-rest/endpoints/fabric/subscriber-tokens-create). + generated using the [Create Subscriber Token endpoint](/rest/signalwire-rest/endpoints/fabric/subscriber-tokens-create). parameters: [] responses: '200': @@ -3758,9 +4242,23 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Subscriber' + $ref: '#/components/schemas/SubscriberListResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found tags: - Subscribers post: @@ -6737,7 +7235,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalSWMLHandler' + $ref: '#/components/schemas/ExternalSWMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -6813,7 +7311,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalSWMLHandler' + $ref: '#/components/schemas/ExternalSWMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -6844,7 +7342,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalSWMLHandler' + $ref: '#/components/schemas/ExternalSWMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -7252,1412 +7750,66 @@ paths: main: - play: say:Hello from SignalWire! request_count: - type: integer - example: 5 - last_accessed_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - request_url: - type: string - format: uri - example: >- - https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e - - type: object - properties: - request_url: - type: string - format: uri - example: >- - https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e - display_name: - type: string - example: My Laml Bin - put: - tags: - - LAML Bins - summary: Update LAML Bin - description: | - Updates a LAML Bin by ID. - operationId: updateLamlBin - parameters: - - name: id - in: path - required: true - description: The ID of the LAML Bin - schema: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - requestBody: - required: true - content: - application/json: - schema: - allOf: - - type: object - properties: - name: - type: string - example: My Laml Bin - - type: object - properties: - contents: - type: string - example: - version: 1.0.0 - sections: - main: - - play: say:Hello from SignalWire! - responses: - '200': - description: A LAML Bin - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - project_id: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - display_name: - type: string - example: Reception - type: - type: string - example: laml_bin - created_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - updated_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - laml_bin: - allOf: - - type: object - properties: - id: - type: string - format: uuid - description: A unique identifier for the LAML Bin - - type: object - properties: - contents: - type: string - example: - version: 1.0.0 - sections: - main: - - play: say:Hello from SignalWire! - request_count: - type: integer - example: 5 - last_accessed_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - request_url: - type: string - format: uri - example: >- - https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e - - type: object - properties: - request_url: - type: string - format: uri - example: >- - https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e - display_name: - type: string - example: My Laml Bin - '422': - description: Unprocessable Entity - content: - application/json: - schema: - type: object - properties: - type: - type: string - code: - type: string - message: - type: string - attribute: - type: string - url: - type: string - format: uri - required: - - type - - code - - message - - url - example: - type: validation_error - code: invalid_parameter - message: Name must be present - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - delete: - tags: - - LAML Bins - summary: Delete LAML Bin - description: | - Deletes a LAML Bin by ID. - operationId: deleteLamlBin - parameters: - - name: id - in: path - required: true - description: The ID of the LAML Bin - schema: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - responses: - '204': - description: No content - /resources/laml_applications/{id}/addresses: - get: - tags: - - LAML Applications - summary: List LAML Application Addresses - description: | - Returns a list of LAML Application addresses. - operationId: listLamlApplicationAddresses - parameters: - - name: id - in: path - required: true - description: The ID of the LAML Application - schema: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - responses: - '200': - description: A list of LAML Application addresses - content: - application/json: - schema: - type: object - properties: - links: - type: object - properties: - self: - type: string - format: uri - example: >- - https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_size=50 - first: - type: string - format: uri - example: >- - https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_size=50 - next: - type: string - format: uri - example: >- - https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_number=1&page_size=50&page_token=PA6581c1fa-d985-4c8f-b53e-2fee11b579ad - prev: - type: string - format: uri - example: >- - https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_number=0&page_size=50&page_token=PA6581c1fa-d985-4c8f-b53e-2fee11b579ad - data: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - resource_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - name: - type: string - example: reception - display_name: - type: string - example: Reception - type: - type: string - example: room - cover_url: - type: string - format: uri - example: https://example.com/cover.jpg - preview_url: - type: string - format: uri - example: https://example.com/preview.jpg - channels: - type: object - properties: - video: - type: string - format: uri - example: /public/reception?channel=video - audio: - type: string - format: uri - example: /public/reception?channel=audio - messaging: - type: string - format: uri - example: /public/reception?channel=messaging - /resources/laml_applications: - get: - tags: - - LAML Applications - summary: List LAML Applications - operationId: listLamlApplications - responses: - '200': - description: A list of LAML Applications - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - project_id: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - display_name: - type: string - example: Reception - type: - type: string - example: laml_application - created_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - updated_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - laml_application: - allOf: - - type: object - properties: - id: - type: string - format: uuid - description: A unique identifier for the LAML Application - account_sid: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - - type: object - properties: - voice_url: - type: string - format: uri - example: https://example.com/call_request_url - voice_method: - type: string - example: POST - enum: - - GET - - POST - voice_fallback_url: - type: string - format: uri - example: https://example.com/call_fallback_url - voice_fallback_method: - type: string - example: POST - enum: - - GET - - POST - status_callback: - type: string - format: uri - example: https://example.com/call_status_url - status_callback_method: - type: string - example: POST - enum: - - GET - - POST - voice_caller_id_lookup: - example: null - sms_url: - type: string - format: uri - example: https://example.com/message_request_url - sms_method: - type: string - example: POST - enum: - - GET - - POST - sms_fallback_url: - type: string - format: uri - example: https://example.com/message_url - sms_fallback_method: - type: string - example: POST - enum: - - GET - - POST - sms_status_callback: - type: string - format: uri - example: https://example.com/message_status_url - sms_status_callback_method: - type: string - example: POST - enum: - - GET - - POST - message_status_callback: - type: string - format: uri - example: https://example.com/message_status_url - api_version: - type: string - example: '2010-04-01' - uri: - type: string - example: https://example.com - - type: object - properties: - request_url: - type: string - format: uri - example: >- - https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e - display_name: - type: string - example: My Laml Application - /resources/laml_applications/{id}: - get: - tags: - - LAML Applications - summary: Get LAML Application - description: | - Returns a LAML Application by ID. - operationId: getLamlApplication - parameters: - - name: id - in: path - required: true - description: The ID of the LAML Application - schema: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - responses: - '200': - description: A LAML Application - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - project_id: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - display_name: - type: string - example: Reception - type: - type: string - example: laml_application - created_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - updated_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - laml_application: - allOf: - - type: object - properties: - id: - type: string - format: uuid - description: A unique identifier for the LAML Application - account_sid: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - - type: object - properties: - voice_url: - type: string - format: uri - example: https://example.com/call_request_url - voice_method: - type: string - example: POST - enum: - - GET - - POST - voice_fallback_url: - type: string - format: uri - example: https://example.com/call_fallback_url - voice_fallback_method: - type: string - example: POST - enum: - - GET - - POST - status_callback: - type: string - format: uri - example: https://example.com/call_status_url - status_callback_method: - type: string - example: POST - enum: - - GET - - POST - voice_caller_id_lookup: - example: null - sms_url: - type: string - format: uri - example: https://example.com/message_request_url - sms_method: - type: string - example: POST - enum: - - GET - - POST - sms_fallback_url: - type: string - format: uri - example: https://example.com/message_url - sms_fallback_method: - type: string - example: POST - enum: - - GET - - POST - sms_status_callback: - type: string - format: uri - example: https://example.com/message_status_url - sms_status_callback_method: - type: string - example: POST - enum: - - GET - - POST - message_status_callback: - type: string - format: uri - example: https://example.com/message_status_url - api_version: - type: string - example: '2010-04-01' - uri: - type: string - example: https://example.com - - type: object - properties: - request_url: - type: string - format: uri - example: >- - https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e - display_name: - type: string - example: My Laml Application - put: - tags: - - LAML Applications - summary: Update LAML Application - description: | - Updates a LAML Application by ID. - operationId: updateLamlApplication - parameters: - - name: id - in: path - required: true - description: The ID of the LAML Application - schema: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - requestBody: - required: true - content: - application/json: - schema: - allOf: - - type: object - properties: - name: - type: string - example: My Laml Application - - type: object - properties: - name: - type: string - example: My Laml Application - call_request_url: - type: string - format: uri - example: https://example.com/call_request_url - call_request_method: - type: string - example: POST - enum: - - GET - - POST - call_fallback_url: - type: string - format: uri - example: https://example.com/call_fallback_url - call_fallback_method: - type: string - example: POST - enum: - - GET - - POST - call_status_url: - type: string - format: uri - example: https://example.com/call_status_url - call_status_method: - type: string - example: POST - enum: - - GET - - POST - message_request_url: - type: string - format: uri - example: https://example.com/message_request_url - message_request_method: - type: string - example: POST - enum: - - GET - - POST - message_fallback_url: - type: string - format: uri - example: https://example.com/message_url - message_fallback_method: - type: string - example: POST - enum: - - GET - - POST - message_status_url: - type: string - format: uri - example: https://example.com/message_status_url - message_status_method: - type: string - example: POST - enum: - - GET - - POST - responses: - '200': - description: A LAML Application - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - project_id: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - display_name: - type: string - example: Reception - type: - type: string - example: laml_application - created_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - updated_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - laml_application: - allOf: - - type: object - properties: - id: - type: string - format: uuid - description: A unique identifier for the LAML Application - account_sid: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - - type: object - properties: - voice_url: - type: string - format: uri - example: https://example.com/call_request_url - voice_method: - type: string - example: POST - enum: - - GET - - POST - voice_fallback_url: - type: string - format: uri - example: https://example.com/call_fallback_url - voice_fallback_method: - type: string - example: POST - enum: - - GET - - POST - status_callback: - type: string - format: uri - example: https://example.com/call_status_url - status_callback_method: - type: string - example: POST - enum: - - GET - - POST - voice_caller_id_lookup: - example: null - sms_url: - type: string - format: uri - example: https://example.com/message_request_url - sms_method: - type: string - example: POST - enum: - - GET - - POST - sms_fallback_url: - type: string - format: uri - example: https://example.com/message_url - sms_fallback_method: - type: string - example: POST - enum: - - GET - - POST - sms_status_callback: - type: string - format: uri - example: https://example.com/message_status_url - sms_status_callback_method: - type: string - example: POST - enum: - - GET - - POST - message_status_callback: - type: string - format: uri - example: https://example.com/message_status_url - api_version: - type: string - example: '2010-04-01' - uri: - type: string - example: https://example.com - - type: object - properties: - request_url: - type: string - format: uri - example: >- - https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e - display_name: - type: string - example: My Laml Application - '422': - description: Unprocessable Entity - content: - application/json: - schema: - type: object - properties: - type: - type: string - code: - type: string - message: - type: string - attribute: - type: string - url: - type: string - format: uri - required: - - type - - code - - message - - url - example: - type: validation_error - code: invalid_parameter - message: Name must be present - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - delete: - tags: - - LAML Applications - summary: Delete LAML Application - description: | - Deletes a LAML Application by ID. - operationId: deleteLamlApplication - parameters: - - name: id - in: path - required: true - description: The ID of the LAML Application - schema: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - responses: - '204': - description: No content - /resources/ai_agents/{ai_agent_id}/addresses: - get: - tags: - - AI Agents - operationId: listAIAgentAddresses - summary: List AI Agent Addresses - description: A list of AI Agent Addresses - parameters: - - $ref: '#/components/parameters/AIAgentIDPath' - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgentAddressListResponse' - '401': - description: Access is unauthorized. - content: - application/json: - schema: - type: string - enum: - - Unauthorized - '404': - description: The server cannot find the requested resource. - content: - application/json: - schema: - type: string - enum: - - Not Found - /resources/ai_agents: - get: - tags: - - AI Agents - operationId: listAIAgents - summary: List AI Agents - description: A list of AI Agents - parameters: [] - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgentListResponse' - '401': - description: Access is unauthorized. - content: - application/json: - schema: - type: string - enum: - - Unauthorized - '404': - description: The server cannot find the requested resource. - content: - application/json: - schema: - type: string - enum: - - Not Found - post: - tags: - - AI Agents - operationId: createAIAgent - summary: Create AI Agent - description: Creates an AI Agent - parameters: [] - responses: - '201': - description: The request has succeeded and a new resource has been created as a result. - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgent' - '401': - description: Access is unauthorized. - content: - application/json: - schema: - type: string - enum: - - Unauthorized - '404': - description: The server cannot find the requested resource. - content: - application/json: - schema: - type: string - enum: - - Not Found - '422': - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgentCreateStatusCode422' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgentCreateRequest' - /resources/ai_agents/{id}: - get: - tags: - - AI Agents - operationId: getAIAgent - summary: Get AI Agent - description: Returns an AI Agent by ID - parameters: - - $ref: '#/components/parameters/AIAgentPathID' - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgent' - '401': - description: Access is unauthorized. - content: - application/json: - schema: - type: string - enum: - - Unauthorized - '404': - description: The server cannot find the requested resource. - content: - application/json: - schema: - type: string - enum: - - Not Found - patch: - tags: - - AI Agents - operationId: updateAIAgent - summary: Update AI Agent - description: Updates an AI Agent by ID - parameters: - - $ref: '#/components/parameters/AIAgentPathID' - responses: - '200': - description: The request has succeeded. - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgent' - '401': - description: Access is unauthorized. - content: - application/json: - schema: - type: string - enum: - - Unauthorized - '404': - description: The server cannot find the requested resource. - content: - application/json: - schema: - type: string - enum: - - Not Found - '422': - description: Client error - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgentUpdateStatusCode422' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/AIAgentUpdateRequest' - delete: - tags: - - AI Agents - operationId: deleteAIAgent - summary: Delete AI Agent - description: Deletes an AI Agent by ID - parameters: - - $ref: '#/components/parameters/AIAgentPathID' - responses: - '204': - description: 'There is no content to send for this request, but the headers may be useful. ' - '401': - description: Access is unauthorized. - content: - application/json: - schema: - type: string - enum: - - Unauthorized - '404': - description: The server cannot find the requested resource. - content: - application/json: - schema: - type: string - enum: - - Not Found - /resources/sip_endpoints/{id}/addresses: - get: - tags: - - SIP Endpoints - summary: List SIP endpoint Addresses - description: | - Returns a list of SIP endpoint addresses. - operationId: listSipEndpointAddresses - parameters: - - name: id - in: path - required: true - description: The ID of the SIP endpoint - schema: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - responses: - '200': - description: A list of SIP endpoint addresses - content: - application/json: - schema: - type: object - properties: - links: - type: object - properties: - self: - type: string - format: uri - example: >- - https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_size=50 - first: - type: string - format: uri - example: >- - https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_size=50 - next: - type: string - format: uri - example: >- - https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_number=1&page_size=50&page_token=PA6581c1fa-d985-4c8f-b53e-2fee11b579ad - prev: - type: string - format: uri - example: >- - https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_number=0&page_size=50&page_token=PA6581c1fa-d985-4c8f-b53e-2fee11b579ad - data: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - resource_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - name: - type: string - example: reception - display_name: - type: string - example: Reception - type: - type: string - example: room - cover_url: - type: string - format: uri - example: https://example.com/cover.jpg - preview_url: - type: string - format: uri - example: https://example.com/preview.jpg - channels: - type: object - properties: - video: - type: string - format: uri - example: /public/reception?channel=video - audio: - type: string - format: uri - example: /public/reception?channel=audio - messaging: - type: string - format: uri - example: /public/reception?channel=messaging - /resources/sip_endpoints: - get: - tags: - - SIP Endpoints - summary: List SIP endpoints - operationId: listSipEndpoints - responses: - '200': - description: A list of SIP endpoints - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - project_id: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - display_name: - type: string - example: Reception - type: - type: string - example: sip_endpoint - created_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - updated_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - sip_endpoint: - allOf: - - type: object - properties: - id: - type: string - format: uuid - description: A unique identifier for the SIP endpoint - - type: object - properties: - username: - type: string - example: 123456 - password: - type: string - example: 123456 - caller_id: - type: string - example: 123456 - send_as: - type: string - example: random - ciphers: - type: array - items: - type: string - example: AEAD_AES_256_GCM_8 - enum: - - AEAD_AES_256_GCM_8 - - AES_256_CM_HMAC_SHA1_80 - - AES_CM_128_HMAC_SHA1_80 - - AES_256_CM_HMAC_SHA1_32 - - AES_CM_128_HMAC_SHA1_32 - codecs: - type: array - items: - type: string - example: PCMU - enum: - - PCMU - - PCMA - - G722 - - G729 - - OPUS - - VP8 - - H264 - encryption: - type: string - example: optional - enum: - - required - - optional - call_handler: - type: string - example: laml_webhooks - call_request_url: - type: string - format: uri - example: https://example.com/call_handler - call_request_method: - type: string - example: POST - enum: - - GET - - POST - call_fallback_url: - type: string - format: uri - example: https://example.com/call_handler - call_fallback_method: - type: string - example: POST - enum: - - GET - - POST - call_status_callback_url: - type: string - format: uri - example: https://example.com/call_handler - call_status_callback_method: - type: string - example: POST - enum: - - GET - - POST - call_laml_application_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_ai_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_version: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_dialogflow_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_context: - type: string - example: office - call_video_room_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_script_url: - type: string - format: uri - example: https://example.com/relay_script - call_relay_script_method: - type: string - example: POST - enum: - - GET - - POST - calling_handler_resource_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - post: - tags: - - SIP Endpoints - summary: Create SIP endpoint - operationId: createSipEndpoint - requestBody: - required: true - content: - application/json: - schema: - allOf: - - type: object - properties: - username: - type: string - example: 123456 - password: - type: string - example: 123456 - caller_id: - type: string - example: 123456 - send_as: - type: string - example: random - ciphers: - type: array - items: - type: string - example: AEAD_AES_256_GCM_8 - enum: - - AEAD_AES_256_GCM_8 - - AES_256_CM_HMAC_SHA1_80 - - AES_CM_128_HMAC_SHA1_80 - - AES_256_CM_HMAC_SHA1_32 - - AES_CM_128_HMAC_SHA1_32 - codecs: - type: array - items: - type: string - example: PCMU - enum: - - PCMU - - PCMA - - G722 - - G729 - - OPUS - - VP8 - - H264 - encryption: - type: string - example: optional - enum: - - required - - optional - call_handler: - type: string - example: laml_webhooks - call_request_url: - type: string - format: uri - example: https://example.com/call_handler - call_request_method: - type: string - example: POST - enum: - - GET - - POST - call_fallback_url: - type: string - format: uri - example: https://example.com/call_handler - call_fallback_method: - type: string - example: POST - enum: - - GET - - POST - call_status_callback_url: - type: string - format: uri - example: https://example.com/call_handler - call_status_callback_method: - type: string - example: POST - enum: - - GET - - POST - call_laml_application_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_ai_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_version: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_dialogflow_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_context: - type: string - example: office - call_video_room_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_script_url: - type: string - format: uri - example: https://example.com/relay_script - call_relay_script_method: + type: integer + example: 5 + last_accessed_at: + type: string + format: date-time + example: '2024-01-02T00:00:00Z' + request_url: + type: string + format: uri + example: >- + https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e + - type: object + properties: + request_url: + type: string + format: uri + example: >- + https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e + display_name: + type: string + example: My Laml Bin + put: + tags: + - LAML Bins + summary: Update LAML Bin + description: | + Updates a LAML Bin by ID. + operationId: updateLamlBin + parameters: + - name: id + in: path + required: true + description: The ID of the LAML Bin + schema: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + requestBody: + required: true + content: + application/json: + schema: + allOf: + - type: object + properties: + name: type: string - example: POST - enum: - - GET - - POST - calling_handler_resource_id: + example: My Laml Bin + - type: object + properties: + contents: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 + example: + version: 1.0.0 + sections: + main: + - play: say:Hello from SignalWire! responses: '200': - description: A SIP endpoint + description: A LAML Bin content: application/json: schema: @@ -8676,7 +7828,7 @@ paths: example: Reception type: type: string - example: sip_endpoint + example: laml_bin created_at: type: string format: date-time @@ -8685,132 +7837,45 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - sip_endpoint: + laml_bin: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the SIP endpoint + description: A unique identifier for the LAML Bin - type: object properties: - username: - type: string - example: 123456 - password: - type: string - example: 123456 - caller_id: - type: string - example: 123456 - send_as: - type: string - example: random - ciphers: - type: array - items: - type: string - example: AEAD_AES_256_GCM_8 - enum: - - AEAD_AES_256_GCM_8 - - AES_256_CM_HMAC_SHA1_80 - - AES_CM_128_HMAC_SHA1_80 - - AES_256_CM_HMAC_SHA1_32 - - AES_CM_128_HMAC_SHA1_32 - codecs: - type: array - items: - type: string - example: PCMU - enum: - - PCMU - - PCMA - - G722 - - G729 - - OPUS - - VP8 - - H264 - encryption: - type: string - example: optional - enum: - - required - - optional - call_handler: - type: string - example: laml_webhooks - call_request_url: - type: string - format: uri - example: https://example.com/call_handler - call_request_method: - type: string - example: POST - enum: - - GET - - POST - call_fallback_url: + contents: type: string - format: uri - example: https://example.com/call_handler - call_fallback_method: + example: + version: 1.0.0 + sections: + main: + - play: say:Hello from SignalWire! + request_count: + type: integer + example: 5 + last_accessed_at: type: string - example: POST - enum: - - GET - - POST - call_status_callback_url: + format: date-time + example: '2024-01-02T00:00:00Z' + request_url: type: string format: uri - example: https://example.com/call_handler - call_status_callback_method: - type: string - example: POST - enum: - - GET - - POST - call_laml_application_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_ai_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_version: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_dialogflow_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_context: - type: string - example: office - call_video_room_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_script_url: + example: >- + https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e + - type: object + properties: + request_url: type: string format: uri - example: https://example.com/relay_script - call_relay_script_method: - type: string - example: POST - enum: - - GET - - POST - calling_handler_resource_id: + example: >- + https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e + display_name: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 + example: My Laml Bin '422': description: Unprocessable Entity content: @@ -8818,48 +7883,294 @@ paths: schema: type: object properties: - type: - type: string - code: - type: string - message: - type: string - attribute: - type: string - url: - type: string - format: uri - required: - - type - - code - - message - - url - example: - type: validation_error - code: invalid_parameter - message: Name must be present - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - /resources/sip_endpoints/{id}: + type: + type: string + code: + type: string + message: + type: string + attribute: + type: string + url: + type: string + format: uri + required: + - type + - code + - message + - url + example: + type: validation_error + code: invalid_parameter + message: Name must be present + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter + delete: + tags: + - LAML Bins + summary: Delete LAML Bin + description: | + Deletes a LAML Bin by ID. + operationId: deleteLamlBin + parameters: + - name: id + in: path + required: true + description: The ID of the LAML Bin + schema: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + responses: + '204': + description: No content + /resources/laml_applications/{id}/addresses: + get: + tags: + - LAML Applications + summary: List LAML Application Addresses + description: | + Returns a list of LAML Application addresses. + operationId: listLamlApplicationAddresses + parameters: + - name: id + in: path + required: true + description: The ID of the LAML Application + schema: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + responses: + '200': + description: A list of LAML Application addresses + content: + application/json: + schema: + type: object + properties: + links: + type: object + properties: + self: + type: string + format: uri + example: >- + https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_size=50 + first: + type: string + format: uri + example: >- + https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_size=50 + next: + type: string + format: uri + example: >- + https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_number=1&page_size=50&page_token=PA6581c1fa-d985-4c8f-b53e-2fee11b579ad + prev: + type: string + format: uri + example: >- + https://{space_name}.signalwire.com/api/fabric/resources/016e5773-c197-4446-bcc2-9c48f14e2d0a/addresses?page_number=0&page_size=50&page_token=PA6581c1fa-d985-4c8f-b53e-2fee11b579ad + data: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + resource_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + name: + type: string + example: reception + display_name: + type: string + example: Reception + type: + type: string + example: room + cover_url: + type: string + format: uri + example: https://example.com/cover.jpg + preview_url: + type: string + format: uri + example: https://example.com/preview.jpg + channels: + type: object + properties: + video: + type: string + format: uri + example: /public/reception?channel=video + audio: + type: string + format: uri + example: /public/reception?channel=audio + messaging: + type: string + format: uri + example: /public/reception?channel=messaging + /resources/laml_applications: get: tags: - - SIP Endpoints - summary: Get SIP endpoint + - LAML Applications + summary: List LAML Applications + operationId: listLamlApplications + responses: + '200': + description: A list of LAML Applications + content: + application/json: + schema: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + project_id: + type: string + format: uuid + example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 + display_name: + type: string + example: Reception + type: + type: string + example: laml_application + created_at: + type: string + format: date-time + example: '2024-01-02T00:00:00Z' + updated_at: + type: string + format: date-time + example: '2024-01-02T00:00:00Z' + laml_application: + allOf: + - type: object + properties: + id: + type: string + format: uuid + description: A unique identifier for the LAML Application + account_sid: + type: string + format: uuid + example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 + - type: object + properties: + voice_url: + type: string + format: uri + example: https://example.com/call_request_url + voice_method: + type: string + example: POST + enum: + - GET + - POST + voice_fallback_url: + type: string + format: uri + example: https://example.com/call_fallback_url + voice_fallback_method: + type: string + example: POST + enum: + - GET + - POST + status_callback: + type: string + format: uri + example: https://example.com/call_status_url + status_callback_method: + type: string + example: POST + enum: + - GET + - POST + voice_caller_id_lookup: + example: null + sms_url: + type: string + format: uri + example: https://example.com/message_request_url + sms_method: + type: string + example: POST + enum: + - GET + - POST + sms_fallback_url: + type: string + format: uri + example: https://example.com/message_url + sms_fallback_method: + type: string + example: POST + enum: + - GET + - POST + sms_status_callback: + type: string + format: uri + example: https://example.com/message_status_url + sms_status_callback_method: + type: string + example: POST + enum: + - GET + - POST + message_status_callback: + type: string + format: uri + example: https://example.com/message_status_url + api_version: + type: string + example: '2010-04-01' + uri: + type: string + example: https://example.com + - type: object + properties: + request_url: + type: string + format: uri + example: >- + https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e + display_name: + type: string + example: My Laml Application + /resources/laml_applications/{id}: + get: + tags: + - LAML Applications + summary: Get LAML Application description: | - Returns a SIP endpoint by ID. - operationId: getSipEndpoint + Returns a LAML Application by ID. + operationId: getLamlApplication parameters: - name: id in: path required: true - description: The ID of the SIP endpoint + description: The ID of the LAML Application schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A SIP endpoint + description: A LAML Application content: application/json: schema: @@ -8878,7 +8189,7 @@ paths: example: Reception type: type: string - example: sip_endpoint + example: laml_application created_at: type: string format: date-time @@ -8887,144 +8198,114 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - sip_endpoint: + laml_application: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the SIP endpoint + description: A unique identifier for the LAML Application + account_sid: + type: string + format: uuid + example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - type: object properties: - username: - type: string - example: 123456 - password: - type: string - example: 123456 - caller_id: - type: string - example: 123456 - send_as: + voice_url: type: string - example: random - ciphers: - type: array - items: - type: string - example: AEAD_AES_256_GCM_8 - enum: - - AEAD_AES_256_GCM_8 - - AES_256_CM_HMAC_SHA1_80 - - AES_CM_128_HMAC_SHA1_80 - - AES_256_CM_HMAC_SHA1_32 - - AES_CM_128_HMAC_SHA1_32 - codecs: - type: array - items: - type: string - example: PCMU - enum: - - PCMU - - PCMA - - G722 - - G729 - - OPUS - - VP8 - - H264 - encryption: + format: uri + example: https://example.com/call_request_url + voice_method: type: string - example: optional + example: POST enum: - - required - - optional - call_handler: - type: string - example: laml_webhooks - call_request_url: + - GET + - POST + voice_fallback_url: type: string format: uri - example: https://example.com/call_handler - call_request_method: + example: https://example.com/call_fallback_url + voice_fallback_method: type: string example: POST enum: - GET - POST - call_fallback_url: + status_callback: type: string format: uri - example: https://example.com/call_handler - call_fallback_method: + example: https://example.com/call_status_url + status_callback_method: type: string example: POST enum: - GET - POST - call_status_callback_url: + voice_caller_id_lookup: + example: null + sms_url: type: string format: uri - example: https://example.com/call_handler - call_status_callback_method: + example: https://example.com/message_request_url + sms_method: type: string example: POST enum: - GET - POST - call_laml_application_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_ai_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_version: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_dialogflow_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_application: + sms_fallback_url: type: string - example: office - call_video_room_id: + format: uri + example: https://example.com/message_url + sms_fallback_method: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_script_url: + example: POST + enum: + - GET + - POST + sms_status_callback: type: string format: uri - example: https://example.com/relay_script - call_relay_script_method: + example: https://example.com/message_status_url + sms_status_callback_method: type: string example: POST enum: - GET - POST - calling_handler_resource_id: + message_status_callback: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 + format: uri + example: https://example.com/message_status_url + api_version: + type: string + example: '2010-04-01' + uri: + type: string + example: https://example.com + - type: object + properties: + request_url: + type: string + format: uri + example: >- + https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e + display_name: + type: string + example: My Laml Application put: tags: - - SIP Endpoints - summary: Update SIP endpoint + - LAML Applications + summary: Update LAML Application description: | - Updates a SIP endpoint by ID. - operationId: updateSipEndpoint + Updates a LAML Application by ID. + operationId: updateLamlApplication parameters: - name: id in: path required: true - description: The ID of the SIP endpoint + description: The ID of the LAML Application schema: type: string format: uuid @@ -9037,55 +8318,18 @@ paths: allOf: - type: object properties: - username: - type: string - example: 123456 - password: - type: string - example: 123456 - caller_id: - type: string - example: 123456 - send_as: - type: string - example: random - ciphers: - type: array - items: - type: string - example: AEAD_AES_256_GCM_8 - enum: - - AEAD_AES_256_GCM_8 - - AES_256_CM_HMAC_SHA1_80 - - AES_CM_128_HMAC_SHA1_80 - - AES_256_CM_HMAC_SHA1_32 - - AES_CM_128_HMAC_SHA1_32 - codecs: - type: array - items: - type: string - example: PCMU - enum: - - PCMU - - PCMA - - G722 - - G729 - - OPUS - - VP8 - - H264 - encryption: + name: type: string - example: optional - enum: - - required - - optional - call_handler: + example: My Laml Application + - type: object + properties: + name: type: string - example: laml_webhooks + example: My Laml Application call_request_url: type: string format: uri - example: https://example.com/call_handler + example: https://example.com/call_request_url call_request_method: type: string example: POST @@ -9095,67 +8339,56 @@ paths: call_fallback_url: type: string format: uri - example: https://example.com/call_handler + example: https://example.com/call_fallback_url call_fallback_method: type: string example: POST enum: - GET - POST - call_status_callback_url: + call_status_url: type: string format: uri - example: https://example.com/call_handler - call_status_callback_method: + example: https://example.com/call_status_url + call_status_method: type: string example: POST enum: - GET - POST - call_laml_application_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_ai_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_version: + message_request_url: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_dialogflow_agent_id: + format: uri + example: https://example.com/message_request_url + message_request_method: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_application: + example: POST + enum: + - GET + - POST + message_fallback_url: type: string - example: office - call_video_room_id: + format: uri + example: https://example.com/message_url + message_fallback_method: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_script_url: + example: POST + enum: + - GET + - POST + message_status_url: type: string format: uri - example: https://example.com/relay_script - call_relay_script_method: + example: https://example.com/message_status_url + message_status_method: type: string example: POST enum: - GET - POST - calling_handler_resource_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: a SIP endpoint + description: A LAML Application content: application/json: schema: @@ -9174,7 +8407,7 @@ paths: example: Reception type: type: string - example: sip_endpoint + example: laml_application created_at: type: string format: date-time @@ -9183,200 +8416,377 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - sip_endpoint: + laml_application: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the SIP endpoint + description: A unique identifier for the LAML Application + account_sid: + type: string + format: uuid + example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - type: object properties: - username: - type: string - example: 123456 - password: - type: string - example: 123456 - caller_id: - type: string - example: 123456 - send_as: + voice_url: type: string - example: random - ciphers: - type: array - items: - type: string - example: AEAD_AES_256_GCM_8 - enum: - - AEAD_AES_256_GCM_8 - - AES_256_CM_HMAC_SHA1_80 - - AES_CM_128_HMAC_SHA1_80 - - AES_256_CM_HMAC_SHA1_32 - - AES_CM_128_HMAC_SHA1_32 - codecs: - type: array - items: - type: string - example: PCMU - enum: - - PCMU - - PCMA - - G722 - - G729 - - OPUS - - VP8 - - H264 - encryption: + format: uri + example: https://example.com/call_request_url + voice_method: type: string - example: optional + example: POST enum: - - required - - optional - call_handler: - type: string - example: laml_webhooks - call_request_url: + - GET + - POST + voice_fallback_url: type: string format: uri - example: https://example.com/call_handler - call_request_method: + example: https://example.com/call_fallback_url + voice_fallback_method: type: string example: POST enum: - GET - POST - call_fallback_url: + status_callback: type: string format: uri - example: https://example.com/call_handler - call_fallback_method: + example: https://example.com/call_status_url + status_callback_method: type: string example: POST enum: - GET - POST - call_status_callback_url: + voice_caller_id_lookup: + example: null + sms_url: type: string format: uri - example: https://example.com/call_handler - call_status_callback_method: + example: https://example.com/message_request_url + sms_method: type: string example: POST enum: - GET - POST - call_laml_application_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_ai_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_flow_version: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_dialogflow_agent_id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_application: + sms_fallback_url: type: string - example: office - call_video_room_id: + format: uri + example: https://example.com/message_url + sms_fallback_method: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - call_relay_script_url: + example: POST + enum: + - GET + - POST + sms_status_callback: type: string format: uri - example: https://example.com/relay_script - call_relay_script_method: + example: https://example.com/message_status_url + sms_status_callback_method: type: string example: POST enum: - GET - POST - calling_handler_resource_id: + message_status_callback: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 + format: uri + example: https://example.com/message_status_url + api_version: + type: string + example: '2010-04-01' + uri: + type: string + example: https://example.com + - type: object + properties: + request_url: + type: string + format: uri + example: >- + https://example.signalwire.com/relay-bins/2537c89e-2606-48c2-b3c2-bb601d863d1e + display_name: + type: string + example: My Laml Application + '422': + description: Unprocessable Entity + content: + application/json: + schema: + type: object + properties: + type: + type: string + code: + type: string + message: + type: string + attribute: + type: string + url: + type: string + format: uri + required: + - type + - code + - message + - url + example: + type: validation_error + code: invalid_parameter + message: Name must be present + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter + delete: + tags: + - LAML Applications + summary: Delete LAML Application + description: | + Deletes a LAML Application by ID. + operationId: deleteLamlApplication + parameters: + - name: id + in: path + required: true + description: The ID of the LAML Application + schema: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + responses: + '204': + description: No content + /resources/ai_agents/{ai_agent_id}/addresses: + get: + tags: + - AI Agents + operationId: listAIAgentAddresses + summary: List AI Agent Addresses + description: A list of AI Agent Addresses + parameters: + - $ref: '#/components/parameters/AIAgentIDPath' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/AIAgentAddressListResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + /resources/ai_agents: + get: + tags: + - AI Agents + operationId: listAIAgents + summary: List AI Agents + description: A list of AI Agents + parameters: [] + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/AIAgentListResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + post: + tags: + - AI Agents + operationId: createAIAgent + summary: Create AI Agent + description: Creates an AI Agent + parameters: [] + responses: + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/AIAgentResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found '422': - description: Unprocessable Entity + description: Client error content: application/json: schema: - type: object - properties: - type: - type: string - code: - type: string - message: - type: string - attribute: - type: string - url: - type: string - format: uri - required: - - type - - code - - message - - url - example: - type: validation_error - code: invalid_parameter - message: Name must be present - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter + $ref: '#/components/schemas/AIAgentCreateStatusCode422' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AIAgentCreateRequest' + /resources/ai_agents/{id}: + get: + tags: + - AI Agents + operationId: getAIAgent + summary: Get AI Agent + description: Returns an AI Agent by ID + parameters: + - $ref: '#/components/parameters/AIAgentPathID' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/AIAgentResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + patch: + tags: + - AI Agents + operationId: updateAIAgent + summary: Update AI Agent + description: Updates an AI Agent by ID + parameters: + - $ref: '#/components/parameters/AIAgentPathID' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/AIAgentResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + '422': + description: Client error + content: + application/json: + schema: + $ref: '#/components/schemas/AIAgentUpdateStatusCode422' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/AIAgentUpdateRequest' delete: tags: - - SIP Endpoints - summary: Delete SIP endpoint - description: | - Deletes a SIP endpoint by ID. - operationId: deleteSipEndpoint + - AI Agents + operationId: deleteAIAgent + summary: Delete AI Agent + description: Deletes an AI Agent by ID parameters: - - name: id - in: path - required: true - description: The ID of the SIP endpoint - schema: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 + - $ref: '#/components/parameters/AIAgentPathID' responses: '204': - description: No content - /resources/relay_applications/{id}/addresses: + description: 'There is no content to send for this request, but the headers may be useful. ' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + /resources/sip_endpoints/{id}/addresses: get: tags: - - Relay Applications - summary: List Relay Application Addresses + - SIP Endpoints + summary: List SIP endpoint Addresses description: | - Returns a list of Relay Application addresses. - operationId: listRelayApplicationAddresses + Returns a list of SIP endpoint addresses. + operationId: listSipEndpointAddresses parameters: - name: id in: path required: true - description: The ID of the Relay Application + description: The ID of the SIP endpoint schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A list of Relay Application addresses + description: A list of SIP endpoint addresses content: application/json: schema: @@ -9450,15 +8860,15 @@ paths: type: string format: uri example: /public/reception?channel=messaging - /resources/relay_applications: + /resources/sip_endpoints: get: tags: - - Relay Applications - summary: List Relay Applications - operationId: listRelayApplications + - SIP Endpoints + summary: List SIP endpoints + operationId: listSipEndpoints responses: '200': - description: A list of Relay Applications + description: A list of SIP endpoints content: application/json: schema: @@ -9479,7 +8889,7 @@ paths: example: Reception type: type: string - example: relay_application + example: sip_endpoint created_at: type: string format: date-time @@ -9488,30 +8898,137 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - relay_application: + sip_endpoint: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the Relay Application - - type: object - properties: - name: + description: A unique identifier for the SIP endpoint + - type: object + properties: + username: + type: string + example: 123456 + password: + type: string + example: 123456 + caller_id: + type: string + example: 123456 + send_as: + type: string + example: random + ciphers: + type: array + items: + type: string + example: AEAD_AES_256_GCM_8 + enum: + - AEAD_AES_256_GCM_8 + - AES_256_CM_HMAC_SHA1_80 + - AES_CM_128_HMAC_SHA1_80 + - AES_256_CM_HMAC_SHA1_32 + - AES_CM_128_HMAC_SHA1_32 + codecs: + type: array + items: + type: string + example: PCMU + enum: + - PCMU + - PCMA + - G722 + - G729 + - OPUS + - VP8 + - H264 + encryption: + type: string + example: optional + enum: + - required + - optional + call_handler: + type: string + example: laml_webhooks + call_request_url: + type: string + format: uri + example: https://example.com/call_handler + call_request_method: + type: string + example: POST + enum: + - GET + - POST + call_fallback_url: + type: string + format: uri + example: https://example.com/call_handler + call_fallback_method: + type: string + example: POST + enum: + - GET + - POST + call_status_callback_url: + type: string + format: uri + example: https://example.com/call_handler + call_status_callback_method: + type: string + example: POST + enum: + - GET + - POST + call_laml_application_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_ai_agent_id: type: string - example: Booking Assistant - topic: + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_id: type: string - example: booking - call_status_callback_url: + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_version: type: string - example: "https://booking.com/callbacks" + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_dialogflow_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_context: + type: string + example: office + call_video_room_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_script_url: + type: string + format: uri + example: https://example.com/relay_script + call_relay_script_method: + type: string + example: POST + enum: + - GET + - POST + calling_handler_resource_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 post: tags: - - Relay Applications - summary: Create Relay Application - operationId: createRelayApplication + - SIP Endpoints + summary: Create SIP endpoint + operationId: createSipEndpoint requestBody: required: true content: @@ -9520,18 +9037,125 @@ paths: allOf: - type: object properties: - name: + username: type: string - example: Booking Assistant - topic: + example: 123456 + password: type: string - example: booking + example: 123456 + caller_id: + type: string + example: 123456 + send_as: + type: string + example: random + ciphers: + type: array + items: + type: string + example: AEAD_AES_256_GCM_8 + enum: + - AEAD_AES_256_GCM_8 + - AES_256_CM_HMAC_SHA1_80 + - AES_CM_128_HMAC_SHA1_80 + - AES_256_CM_HMAC_SHA1_32 + - AES_CM_128_HMAC_SHA1_32 + codecs: + type: array + items: + type: string + example: PCMU + enum: + - PCMU + - PCMA + - G722 + - G729 + - OPUS + - VP8 + - H264 + encryption: + type: string + example: optional + enum: + - required + - optional + call_handler: + type: string + example: laml_webhooks + call_request_url: + type: string + format: uri + example: https://example.com/call_handler + call_request_method: + type: string + example: POST + enum: + - GET + - POST + call_fallback_url: + type: string + format: uri + example: https://example.com/call_handler + call_fallback_method: + type: string + example: POST + enum: + - GET + - POST call_status_callback_url: type: string - example: "https://booking.com/callbacks" + format: uri + example: https://example.com/call_handler + call_status_callback_method: + type: string + example: POST + enum: + - GET + - POST + call_laml_application_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_ai_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_version: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_dialogflow_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_context: + type: string + example: office + call_video_room_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_script_url: + type: string + format: uri + example: https://example.com/relay_script + call_relay_script_method: + type: string + example: POST + enum: + - GET + - POST + calling_handler_resource_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A Relay Application + description: A SIP endpoint content: application/json: schema: @@ -9550,7 +9174,7 @@ paths: example: Reception type: type: string - example: relay_application + example: sip_endpoint created_at: type: string format: date-time @@ -9559,25 +9183,132 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - relay_application: + sip_endpoint: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the Relay Application - - type: object - properties: - name: + description: A unique identifier for the SIP endpoint + - type: object + properties: + username: + type: string + example: 123456 + password: + type: string + example: 123456 + caller_id: + type: string + example: 123456 + send_as: + type: string + example: random + ciphers: + type: array + items: + type: string + example: AEAD_AES_256_GCM_8 + enum: + - AEAD_AES_256_GCM_8 + - AES_256_CM_HMAC_SHA1_80 + - AES_CM_128_HMAC_SHA1_80 + - AES_256_CM_HMAC_SHA1_32 + - AES_CM_128_HMAC_SHA1_32 + codecs: + type: array + items: + type: string + example: PCMU + enum: + - PCMU + - PCMA + - G722 + - G729 + - OPUS + - VP8 + - H264 + encryption: + type: string + example: optional + enum: + - required + - optional + call_handler: + type: string + example: laml_webhooks + call_request_url: + type: string + format: uri + example: https://example.com/call_handler + call_request_method: + type: string + example: POST + enum: + - GET + - POST + call_fallback_url: + type: string + format: uri + example: https://example.com/call_handler + call_fallback_method: + type: string + example: POST + enum: + - GET + - POST + call_status_callback_url: + type: string + format: uri + example: https://example.com/call_handler + call_status_callback_method: + type: string + example: POST + enum: + - GET + - POST + call_laml_application_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_ai_agent_id: type: string - example: Booking Assistant - topic: + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_id: type: string - example: booking - call_status_callback_url: + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_version: type: string - example: "https://booking.com/callbacks" + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_dialogflow_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_context: + type: string + example: office + call_video_room_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_script_url: + type: string + format: uri + example: https://example.com/relay_script + call_relay_script_method: + type: string + example: POST + enum: + - GET + - POST + calling_handler_resource_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 '422': description: Unprocessable Entity content: @@ -9607,26 +9338,26 @@ paths: message: Name must be present attribute: name url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - /resources/relay_applications/{id}: + /resources/sip_endpoints/{id}: get: tags: - - Relay Applications - summary: Get Relay Application + - SIP Endpoints + summary: Get SIP endpoint description: | - Returns a Relay Application by ID. - operationId: getRelayApplication + Returns a SIP endpoint by ID. + operationId: getSipEndpoint parameters: - name: id in: path required: true - description: The ID of the Relay Application + description: The ID of the SIP endpoint schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A Relay Application + description: A SIP endpoint content: application/json: schema: @@ -9645,7 +9376,7 @@ paths: example: Reception type: type: string - example: relay_application + example: sip_endpoint created_at: type: string format: date-time @@ -9654,37 +9385,144 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - relay_application: + sip_endpoint: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the Relay Application + description: A unique identifier for the SIP endpoint - type: object properties: - name: + username: type: string - example: Booking Assistant - topic: + example: 123456 + password: type: string - example: booking + example: 123456 + caller_id: + type: string + example: 123456 + send_as: + type: string + example: random + ciphers: + type: array + items: + type: string + example: AEAD_AES_256_GCM_8 + enum: + - AEAD_AES_256_GCM_8 + - AES_256_CM_HMAC_SHA1_80 + - AES_CM_128_HMAC_SHA1_80 + - AES_256_CM_HMAC_SHA1_32 + - AES_CM_128_HMAC_SHA1_32 + codecs: + type: array + items: + type: string + example: PCMU + enum: + - PCMU + - PCMA + - G722 + - G729 + - OPUS + - VP8 + - H264 + encryption: + type: string + example: optional + enum: + - required + - optional + call_handler: + type: string + example: laml_webhooks + call_request_url: + type: string + format: uri + example: https://example.com/call_handler + call_request_method: + type: string + example: POST + enum: + - GET + - POST + call_fallback_url: + type: string + format: uri + example: https://example.com/call_handler + call_fallback_method: + type: string + example: POST + enum: + - GET + - POST call_status_callback_url: type: string - example: "https://booking.com/callbacks" + format: uri + example: https://example.com/call_handler + call_status_callback_method: + type: string + example: POST + enum: + - GET + - POST + call_laml_application_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_ai_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_version: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_dialogflow_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_application: + type: string + example: office + call_video_room_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_script_url: + type: string + format: uri + example: https://example.com/relay_script + call_relay_script_method: + type: string + example: POST + enum: + - GET + - POST + calling_handler_resource_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 put: tags: - - Relay Applications - summary: Update Relay Application + - SIP Endpoints + summary: Update SIP endpoint description: | - Updates a Relay Application by ID. - operationId: updateRelayApplication + Updates a SIP endpoint by ID. + operationId: updateSipEndpoint parameters: - name: id in: path required: true - description: The ID of the Relay Application + description: The ID of the SIP endpoint schema: type: string format: uuid @@ -9697,18 +9535,125 @@ paths: allOf: - type: object properties: - name: + username: + type: string + example: 123456 + password: + type: string + example: 123456 + caller_id: + type: string + example: 123456 + send_as: + type: string + example: random + ciphers: + type: array + items: + type: string + example: AEAD_AES_256_GCM_8 + enum: + - AEAD_AES_256_GCM_8 + - AES_256_CM_HMAC_SHA1_80 + - AES_CM_128_HMAC_SHA1_80 + - AES_256_CM_HMAC_SHA1_32 + - AES_CM_128_HMAC_SHA1_32 + codecs: + type: array + items: + type: string + example: PCMU + enum: + - PCMU + - PCMA + - G722 + - G729 + - OPUS + - VP8 + - H264 + encryption: + type: string + example: optional + enum: + - required + - optional + call_handler: + type: string + example: laml_webhooks + call_request_url: + type: string + format: uri + example: https://example.com/call_handler + call_request_method: type: string - example: Booking Assistant - topic: + example: POST + enum: + - GET + - POST + call_fallback_url: type: string - example: booking + format: uri + example: https://example.com/call_handler + call_fallback_method: + type: string + example: POST + enum: + - GET + - POST call_status_callback_url: type: string - example: "https://booking.com/callbacks" + format: uri + example: https://example.com/call_handler + call_status_callback_method: + type: string + example: POST + enum: + - GET + - POST + call_laml_application_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_ai_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_version: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_dialogflow_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_application: + type: string + example: office + call_video_room_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_script_url: + type: string + format: uri + example: https://example.com/relay_script + call_relay_script_method: + type: string + example: POST + enum: + - GET + - POST + calling_handler_resource_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A Relay Application + description: a SIP endpoint content: application/json: schema: @@ -9727,7 +9672,7 @@ paths: example: Reception type: type: string - example: relay_application + example: sip_endpoint created_at: type: string format: date-time @@ -9736,25 +9681,132 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - relay_application: + sip_endpoint: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the Relay Application + description: A unique identifier for the SIP endpoint - type: object properties: - name: + username: type: string - example: Booking Assistant - topic: + example: 123456 + password: type: string - example: booking + example: 123456 + caller_id: + type: string + example: 123456 + send_as: + type: string + example: random + ciphers: + type: array + items: + type: string + example: AEAD_AES_256_GCM_8 + enum: + - AEAD_AES_256_GCM_8 + - AES_256_CM_HMAC_SHA1_80 + - AES_CM_128_HMAC_SHA1_80 + - AES_256_CM_HMAC_SHA1_32 + - AES_CM_128_HMAC_SHA1_32 + codecs: + type: array + items: + type: string + example: PCMU + enum: + - PCMU + - PCMA + - G722 + - G729 + - OPUS + - VP8 + - H264 + encryption: + type: string + example: optional + enum: + - required + - optional + call_handler: + type: string + example: laml_webhooks + call_request_url: + type: string + format: uri + example: https://example.com/call_handler + call_request_method: + type: string + example: POST + enum: + - GET + - POST + call_fallback_url: + type: string + format: uri + example: https://example.com/call_handler + call_fallback_method: + type: string + example: POST + enum: + - GET + - POST call_status_callback_url: type: string - example: "https://booking.com/callbacks" + format: uri + example: https://example.com/call_handler + call_status_callback_method: + type: string + example: POST + enum: + - GET + - POST + call_laml_application_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_ai_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_flow_version: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_dialogflow_agent_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_application: + type: string + example: office + call_video_room_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + call_relay_script_url: + type: string + format: uri + example: https://example.com/relay_script + call_relay_script_method: + type: string + example: POST + enum: + - GET + - POST + calling_handler_resource_id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 '422': description: Unprocessable Entity content: @@ -9786,16 +9838,16 @@ paths: url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter delete: tags: - - Relay Applications - summary: Delete Relay Application + - SIP Endpoints + summary: Delete SIP endpoint description: | - Deletes a Relay Application by ID. - operationId: deleteRelayApplication + Deletes a SIP endpoint by ID. + operationId: deleteSipEndpoint parameters: - name: id in: path required: true - description: The ID of the Relay Application + description: The ID of the SIP endpoint schema: type: string format: uuid @@ -9803,26 +9855,26 @@ paths: responses: '204': description: No content - /resources/freeswitch_connectors/{id}/addresses: + /resources/relay_applications/{id}/addresses: get: tags: - - FreeSWITCH Connectors - summary: List FreeSWITCH Connector Addresses + - Relay Applications + summary: List Relay Application Addresses description: | - Returns a list of FreeSWITCH Connector addresses. - operationId: listFreeswitchConnectorAddresses + Returns a list of Relay Application addresses. + operationId: listRelayApplicationAddresses parameters: - name: id in: path required: true - description: The ID of the FreeSWITCH Connector + description: The ID of the Relay Application schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A list of FreeSWITCH Connector addresses + description: A list of Relay Application addresses content: application/json: schema: @@ -9896,15 +9948,15 @@ paths: type: string format: uri example: /public/reception?channel=messaging - /resources/freeswitch_connectors: + /resources/relay_applications: get: tags: - - FreeSWITCH Connectors - summary: List FreeSWITCH Connectors - operationId: listFreeswitchConnectors + - Relay Applications + summary: List Relay Applications + operationId: listRelayApplications responses: '200': - description: A list of FreeSWITCH Connectors + description: A list of Relay Applications content: application/json: schema: @@ -9925,7 +9977,7 @@ paths: example: Reception type: type: string - example: freeswitch_connector + example: relay_application created_at: type: string format: date-time @@ -9934,34 +9986,30 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - freeswitch_connector: + relay_application: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the FreeSWITCH Connector + description: A unique identifier for the Relay Application - type: object properties: name: type: string example: Booking Assistant - - type: object - properties: - caller_id: + topic: type: string - example: 123456 - - type: object - properties: - send_as: + example: booking + call_status_callback_url: type: string - example: 123456 + example: "https://booking.com/callbacks" post: tags: - - FreeSWITCH Connectors - summary: Create FreeSWITCH Connector - operationId: createFreeswitchConnector + - Relay Applications + summary: Create Relay Application + operationId: createRelayApplication requestBody: required: true content: @@ -9973,15 +10021,15 @@ paths: name: type: string example: Booking Assistant - - type: object - properties: - token: + topic: + type: string + example: booking + call_status_callback_url: type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 + example: "https://booking.com/callbacks" responses: '200': - description: A FreeSWITCH Connector + description: A Relay Application content: application/json: schema: @@ -10000,7 +10048,7 @@ paths: example: Reception type: type: string - example: freeswitch_connector + example: relay_application created_at: type: string format: date-time @@ -10009,29 +10057,25 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - freeswitch_connector: + relay_application: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the FreeSWITCH Connector + description: A unique identifier for the Relay Application - type: object properties: name: type: string example: Booking Assistant - - type: object - properties: - caller_id: + topic: type: string - example: 123456 - - type: object - properties: - send_as: + example: booking + call_status_callback_url: type: string - example: 123456 + example: "https://booking.com/callbacks" '422': description: Unprocessable Entity content: @@ -10061,26 +10105,26 @@ paths: message: Name must be present attribute: name url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - /resources/freeswitch_connectors/{id}: + /resources/relay_applications/{id}: get: tags: - - FreeSWITCH Connectors - summary: Get FreeSWITCH Connector + - Relay Applications + summary: Get Relay Application description: | - Returns a FreeSWITCH Connector by ID. - operationId: getFreeswitchConnector + Returns a Relay Application by ID. + operationId: getRelayApplication parameters: - name: id in: path required: true - description: The ID of the FreeSWITCH Connector + description: The ID of the Relay Application schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A FreeSWITCH Connector + description: A Relay Application content: application/json: schema: @@ -10099,7 +10143,7 @@ paths: example: Reception type: type: string - example: freeswitch_connector + example: relay_application created_at: type: string format: date-time @@ -10108,41 +10152,37 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - freeswitch_connector: + relay_application: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the FreeSWITCH Connector + description: A unique identifier for the Relay Application - type: object properties: name: type: string example: Booking Assistant - - type: object - properties: - caller_id: + topic: type: string - example: 123456 - - type: object - properties: - send_as: + example: booking + call_status_callback_url: type: string - example: 123456 + example: "https://booking.com/callbacks" put: tags: - - FreeSWITCH Connectors - summary: Update FreeSWITCH Connector + - Relay Applications + summary: Update Relay Application description: | - Updates a FreeSWITCH Connector by ID. - operationId: updateFreeswitchConnector + Updates a Relay Application by ID. + operationId: updateRelayApplication parameters: - name: id in: path required: true - description: The ID of the FreeSWITCH Connector + description: The ID of the Relay Application schema: type: string format: uuid @@ -10158,19 +10198,15 @@ paths: name: type: string example: Booking Assistant - - type: object - properties: - caller_id: + topic: type: string - example: 123456 - - type: object - properties: - send_as: + example: booking + call_status_callback_url: type: string - example: 123456 + example: "https://booking.com/callbacks" responses: '200': - description: A FreeSWITCH Connector + description: A Relay Application content: application/json: schema: @@ -10189,7 +10225,7 @@ paths: example: Reception type: type: string - example: freeswitch_connector + example: relay_application created_at: type: string format: date-time @@ -10198,29 +10234,25 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - freeswitch_connector: + relay_application: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the FreeSWITCH Connector + description: A unique identifier for the Relay Application - type: object properties: name: type: string example: Booking Assistant - - type: object - properties: - caller_id: + topic: type: string - example: 123456 - - type: object - properties: - send_as: + example: booking + call_status_callback_url: type: string - example: 123456 + example: "https://booking.com/callbacks" '422': description: Unprocessable Entity content: @@ -10252,16 +10284,16 @@ paths: url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter delete: tags: - - FreeSWITCH Connectors - summary: Delete FreeSWITCH Connector + - Relay Applications + summary: Delete Relay Application description: | - Deletes a FreeSWITCH Connector by ID. - operationId: deleteFreeswitchConnector + Deletes a Relay Application by ID. + operationId: deleteRelayApplication parameters: - name: id in: path required: true - description: The ID of the FreeSWITCH Connector + description: The ID of the Relay Application schema: type: string format: uuid @@ -10269,26 +10301,26 @@ paths: responses: '204': description: No content - /resources/dialogflow_agents/{id}/addresses: + /resources/freeswitch_connectors/{id}/addresses: get: tags: - - Dialogflow Agents - summary: List Dialogflow Agent Addresses + - FreeSWITCH Connectors + summary: List FreeSWITCH Connector Addresses description: | - Returns a list of Dialogflow Agent addresses. - operationId: listDialogflowAgentAddresses + Returns a list of FreeSWITCH Connector addresses. + operationId: listFreeswitchConnectorAddresses parameters: - name: id in: path required: true - description: The ID of the Dialogflow Agent + description: The ID of the FreeSWITCH Connector schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A list of Dialogflow Agent addresses + description: A list of FreeSWITCH Connector addresses content: application/json: schema: @@ -10362,15 +10394,15 @@ paths: type: string format: uri example: /public/reception?channel=messaging - /resources/dialogflow_agents: + /resources/freeswitch_connectors: get: tags: - - Dialogflow Agents - summary: List Dialogflow Agents - operationId: listDialogflowAgents + - FreeSWITCH Connectors + summary: List FreeSWITCH Connectors + operationId: listFreeswitchConnectors responses: '200': - description: A list of Dialogflow Agents + description: A list of FreeSWITCH Connectors content: application/json: schema: @@ -10391,7 +10423,7 @@ paths: example: Reception type: type: string - example: dialogflow_agent + example: freeswitch_connector created_at: type: string format: date-time @@ -10400,57 +10432,153 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - dialogflow_agent: + freeswitch_connector: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the Dialogflow Agent + description: A unique identifier for the FreeSWITCH Connector - type: object properties: - say_enabled: - type: boolean - example: true - say: - type: string - example: Welcome to the Booking Assistant - voice: + name: type: string - example: en-US-Wavenet-D + example: Booking Assistant - type: object properties: - display_name: - type: string - example: Booking Assistant - dialogflow_reference_id: + caller_id: type: string - format: uuid - example: 12345678-1234-1234-1234-1234567890ab - dialogflow_reference_name: + example: 123456 + - type: object + properties: + send_as: type: string - example: my dialogflow agent - /resources/dialogflow_agents/{id}: + example: 123456 + post: + tags: + - FreeSWITCH Connectors + summary: Create FreeSWITCH Connector + operationId: createFreeswitchConnector + requestBody: + required: true + content: + application/json: + schema: + allOf: + - type: object + properties: + name: + type: string + example: Booking Assistant + - type: object + properties: + token: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + responses: + '200': + description: A FreeSWITCH Connector + content: + application/json: + schema: + type: object + properties: + id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + project_id: + type: string + format: uuid + example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 + display_name: + type: string + example: Reception + type: + type: string + example: freeswitch_connector + created_at: + type: string + format: date-time + example: '2024-01-02T00:00:00Z' + updated_at: + type: string + format: date-time + example: '2024-01-02T00:00:00Z' + freeswitch_connector: + allOf: + - type: object + properties: + id: + type: string + format: uuid + description: A unique identifier for the FreeSWITCH Connector + - type: object + properties: + name: + type: string + example: Booking Assistant + - type: object + properties: + caller_id: + type: string + example: 123456 + - type: object + properties: + send_as: + type: string + example: 123456 + '422': + description: Unprocessable Entity + content: + application/json: + schema: + type: object + properties: + type: + type: string + code: + type: string + message: + type: string + attribute: + type: string + url: + type: string + format: uri + required: + - type + - code + - message + - url + example: + type: validation_error + code: invalid_parameter + message: Name must be present + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter + /resources/freeswitch_connectors/{id}: get: tags: - - Dialogflow Agents - summary: Get Dialogflow Agent + - FreeSWITCH Connectors + summary: Get FreeSWITCH Connector description: | - Returns a Dialogflow Agent by ID. - operationId: getDialogflowAgent + Returns a FreeSWITCH Connector by ID. + operationId: getFreeswitchConnector parameters: - name: id in: path required: true - description: The ID of the Dialogflow Agent + description: The ID of the FreeSWITCH Connector schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A Dialogflow Agent + description: A FreeSWITCH Connector content: application/json: schema: @@ -10469,7 +10597,7 @@ paths: example: Reception type: type: string - example: dialogflow_agent + example: freeswitch_connector created_at: type: string format: date-time @@ -10478,49 +10606,41 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - dialogflow_agent: + freeswitch_connector: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the Dialogflow Agent + description: A unique identifier for the FreeSWITCH Connector - type: object properties: - say_enabled: - type: boolean - example: true - say: - type: string - example: Welcome to the Booking Assistant - voice: + name: type: string - example: en-US-Wavenet-D + example: Booking Assistant - type: object properties: - display_name: - type: string - example: Booking Assistant - dialogflow_reference_id: + caller_id: type: string - format: uuid - example: 12345678-1234-1234-1234-1234567890ab - dialogflow_reference_name: + example: 123456 + - type: object + properties: + send_as: type: string - example: my dialogflow agent + example: 123456 put: tags: - - Dialogflow Agents - summary: Update Dialogflow Agent + - FreeSWITCH Connectors + summary: Update FreeSWITCH Connector description: | - Updates a Dialogflow Agent by ID. - operationId: updateDialogflowAgent + Updates a FreeSWITCH Connector by ID. + operationId: updateFreeswitchConnector parameters: - name: id in: path required: true - description: The ID of the Dialogflow Agent + description: The ID of the FreeSWITCH Connector schema: type: string format: uuid @@ -10538,18 +10658,17 @@ paths: example: Booking Assistant - type: object properties: - say_enabled: - type: boolean - example: true - say: + caller_id: type: string - example: Welcome to the Booking Assistant - voice: + example: 123456 + - type: object + properties: + send_as: type: string - example: en-US-Wavenet-D + example: 123456 responses: '200': - description: A Dialogflow Agent + description: A FreeSWITCH Connector content: application/json: schema: @@ -10568,7 +10687,7 @@ paths: example: Reception type: type: string - example: dialogflow_agent + example: freeswitch_connector created_at: type: string format: date-time @@ -10577,37 +10696,29 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - dialogflow_agent: + freeswitch_connector: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the Dialogflow Agent + description: A unique identifier for the FreeSWITCH Connector - type: object properties: - say_enabled: - type: boolean - example: true - say: - type: string - example: Welcome to the Booking Assistant - voice: + name: type: string - example: en-US-Wavenet-D + example: Booking Assistant - type: object properties: - display_name: - type: string - example: Booking Assistant - dialogflow_reference_id: + caller_id: type: string - format: uuid - example: 12345678-1234-1234-1234-1234567890ab - dialogflow_reference_name: + example: 123456 + - type: object + properties: + send_as: type: string - example: my dialogflow agent + example: 123456 '422': description: Unprocessable Entity content: @@ -10639,16 +10750,16 @@ paths: url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter delete: tags: - - Dialogflow Agents - summary: Delete Dialogflow Agent + - FreeSWITCH Connectors + summary: Delete FreeSWITCH Connector description: | - Deletes a Dialogflow Agent by ID. - operationId: deleteDialogflowAgent + Deletes a FreeSWITCH Connector by ID. + operationId: deleteFreeswitchConnector parameters: - name: id in: path required: true - description: The ID of the Dialogflow Agent + description: The ID of the FreeSWITCH Connector schema: type: string format: uuid @@ -10656,26 +10767,26 @@ paths: responses: '204': description: No content - /resources/cxml_applications/{id}/addresses: + /resources/dialogflow_agents/{id}/addresses: get: tags: - - cXML Applications - summary: List cXML Application Addresses + - Dialogflow Agents + summary: List Dialogflow Agent Addresses description: | - Returns a list of cXML Application addresses. - operationId: listCxmlApplicationAddresses + Returns a list of Dialogflow Agent addresses. + operationId: listDialogflowAgentAddresses parameters: - name: id in: path required: true - description: The ID of the cXML Application + description: The ID of the Dialogflow Agent schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A list of cXML Application addresses + description: A list of Dialogflow Agent addresses content: application/json: schema: @@ -10749,280 +10860,95 @@ paths: type: string format: uri example: /public/reception?channel=messaging - /resources/cxml_applications: + /resources/dialogflow_agents: get: tags: - - cXML Applications - summary: List cXML Applications - operationId: listCxmlApplications - responses: - '200': - description: A list of cXML Applications - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - project_id: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - display_name: - type: string - example: Reception - type: - type: string - example: cxml_application - created_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - updated_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - cxml_application: - allOf: - - type: object - properties: - id: - type: string - format: uuid - description: A unique identifier for the cXML Application - - type: object - properties: - name: - type: string - example: Booking Assistant - handle_calls_using: - type: string - example: script - enum: - - script - - external_url - call_handler_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_method: - type: string - example: POST - enum: - - POST - - GET - call_handler_fallback_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_fallback_method: - type: string - example: POST - enum: - - POST - - GET - call_status_callback_url: - type: string - format: uri - example: https://example.com/cxml - call_status_callback_method: - type: string - example: POST - enum: - - POST - - GET - post: - tags: - - cXML Applications - summary: Create cXML Application - operationId: createCxmlApplication - requestBody: - required: true - content: - application/json: - schema: - allOf: - - type: object - properties: - name: - type: string - example: Booking Assistant - handle_calls_using: - type: string - example: script - enum: - - script - - external_url - call_handler_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_method: - type: string - example: POST - enum: - - POST - - GET - call_handler_fallback_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_fallback_method: - type: string - example: POST - enum: - - POST - - GET - call_status_callback_url: - type: string - format: uri - example: https://example.com/cxml - call_status_callback_method: - type: string - example: POST - enum: - - POST - - GET - - type: object - properties: - call_handler_script: - type: string - example: >- - + - Dialogflow Agents + summary: List Dialogflow Agents + operationId: listDialogflowAgents responses: '200': - description: A cXML Application - content: - application/json: - schema: - type: object - properties: - id: - type: string - format: uuid - example: 993ed018-9e79-4e50-b97b-984bd5534095 - project_id: - type: string - format: uuid - example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 - display_name: - type: string - example: Reception - type: - type: string - example: cxml_application - created_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - updated_at: - type: string - format: date-time - example: '2024-01-02T00:00:00Z' - cxml_application: - allOf: - - type: object - properties: - id: - type: string - format: uuid - description: A unique identifier for the cXML Application - - type: object - properties: - name: - type: string - example: Booking Assistant - handle_calls_using: - type: string - example: script - enum: - - script - - external_url - call_handler_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_method: - type: string - example: POST - enum: - - POST - - GET - call_handler_fallback_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_fallback_method: - type: string - example: POST - enum: - - POST - - GET - call_status_callback_url: - type: string - format: uri - example: https://example.com/cxml - call_status_callback_method: - type: string - example: POST - enum: - - POST - - GET - '422': - description: Unprocessable Entity + description: A list of Dialogflow Agents content: application/json: schema: - type: object - properties: - type: - type: string - code: - type: string - message: - type: string - attribute: - type: string - url: - type: string - format: uri - required: - - type - - code - - message - - url - example: - type: validation_error - code: invalid_parameter - message: Name must be present - attribute: name - url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter - /resources/cxml_applications/{id}: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + example: 993ed018-9e79-4e50-b97b-984bd5534095 + project_id: + type: string + format: uuid + example: 1313fe58-5e14-4c11-bbe7-6fdfa11fe780 + display_name: + type: string + example: Reception + type: + type: string + example: dialogflow_agent + created_at: + type: string + format: date-time + example: '2024-01-02T00:00:00Z' + updated_at: + type: string + format: date-time + example: '2024-01-02T00:00:00Z' + dialogflow_agent: + allOf: + - type: object + properties: + id: + type: string + format: uuid + description: A unique identifier for the Dialogflow Agent + - type: object + properties: + say_enabled: + type: boolean + example: true + say: + type: string + example: Welcome to the Booking Assistant + voice: + type: string + example: en-US-Wavenet-D + - type: object + properties: + display_name: + type: string + example: Booking Assistant + dialogflow_reference_id: + type: string + format: uuid + example: 12345678-1234-1234-1234-1234567890ab + dialogflow_reference_name: + type: string + example: my dialogflow agent + /resources/dialogflow_agents/{id}: get: tags: - - cXML Applications - summary: Get cXML Application + - Dialogflow Agents + summary: Get Dialogflow Agent description: | - Returns a cXML Application by ID. - operationId: getCxmlApplication + Returns a Dialogflow Agent by ID. + operationId: getDialogflowAgent parameters: - name: id in: path required: true - description: The ID of the cXML Application + description: The ID of the Dialogflow Agent schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 responses: '200': - description: A cXML Application + description: A Dialogflow Agent content: application/json: schema: @@ -11041,7 +10967,7 @@ paths: example: Reception type: type: string - example: cxml_application + example: dialogflow_agent created_at: type: string format: date-time @@ -11050,128 +10976,78 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - cxml_application: + dialogflow_agent: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the cXML Application + description: A unique identifier for the Dialogflow Agent - type: object properties: - name: - type: string - example: Booking Assistant - handle_calls_using: - type: string - example: script - enum: - - script - - external_url - call_handler_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_method: + say_enabled: + type: boolean + example: true + say: type: string - example: POST - enum: - - POST - - GET - call_handler_fallback_url: + example: Welcome to the Booking Assistant + voice: type: string - format: uri - example: https://example.com/cxml - call_handler_fallback_method: + example: en-US-Wavenet-D + - type: object + properties: + display_name: type: string - example: POST - enum: - - POST - - GET - call_status_callback_url: + example: Booking Assistant + dialogflow_reference_id: type: string - format: uri - example: https://example.com/cxml - call_status_callback_method: + format: uuid + example: 12345678-1234-1234-1234-1234567890ab + dialogflow_reference_name: type: string - example: POST - enum: - - POST - - GET + example: my dialogflow agent put: tags: - - cXML Applications - summary: Update cXML Application + - Dialogflow Agents + summary: Update Dialogflow Agent description: | - Updates a cXML Application by ID. - operationId: updateCxmlApplication + Updates a Dialogflow Agent by ID. + operationId: updateDialogflowAgent parameters: - name: id in: path required: true - description: The ID of the cXML Application + description: The ID of the Dialogflow Agent schema: type: string format: uuid example: 993ed018-9e79-4e50-b97b-984bd5534095 requestBody: - required: true - content: - application/json: - schema: - allOf: - - type: object - properties: - name: - type: string - example: Booking Assistant - handle_calls_using: - type: string - example: script - enum: - - script - - external_url - call_handler_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_method: - type: string - example: POST - enum: - - POST - - GET - call_handler_fallback_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_fallback_method: - type: string - example: POST - enum: - - POST - - GET - call_status_callback_url: - type: string - format: uri - example: https://example.com/cxml - call_status_callback_method: + required: true + content: + application/json: + schema: + allOf: + - type: object + properties: + name: type: string - example: POST - enum: - - POST - - GET + example: Booking Assistant - type: object properties: - call_handler_script: + say_enabled: + type: boolean + example: true + say: type: string - example: >- - + example: Welcome to the Booking Assistant + voice: + type: string + example: en-US-Wavenet-D responses: '200': - description: A cXML Application + description: A Dialogflow Agent content: application/json: schema: @@ -11190,7 +11066,7 @@ paths: example: Reception type: type: string - example: cxml_application + example: dialogflow_agent created_at: type: string format: date-time @@ -11199,55 +11075,37 @@ paths: type: string format: date-time example: '2024-01-02T00:00:00Z' - cxml_application: + dialogflow_agent: allOf: - type: object properties: id: type: string format: uuid - description: A unique identifier for the cXML Application + description: A unique identifier for the Dialogflow Agent - type: object properties: - name: - type: string - example: Booking Assistant - handle_calls_using: - type: string - example: script - enum: - - script - - external_url - call_handler_url: - type: string - format: uri - example: https://example.com/cxml - call_handler_method: + say_enabled: + type: boolean + example: true + say: type: string - example: POST - enum: - - POST - - GET - call_handler_fallback_url: + example: Welcome to the Booking Assistant + voice: type: string - format: uri - example: https://example.com/cxml - call_handler_fallback_method: + example: en-US-Wavenet-D + - type: object + properties: + display_name: type: string - example: POST - enum: - - POST - - GET - call_status_callback_url: + example: Booking Assistant + dialogflow_reference_id: type: string - format: uri - example: https://example.com/cxml - call_status_callback_method: + format: uuid + example: 12345678-1234-1234-1234-1234567890ab + dialogflow_reference_name: type: string - example: POST - enum: - - POST - - GET + example: my dialogflow agent '422': description: Unprocessable Entity content: @@ -11279,16 +11137,16 @@ paths: url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#invalid_parameter delete: tags: - - cXML Applications - summary: Delete cXML Application + - Dialogflow Agents + summary: Delete Dialogflow Agent description: | - Deletes a cXML Application by ID. - operationId: deleteCxmlApplication + Deletes a Dialogflow Agent by ID. + operationId: deleteDialogflowAgent parameters: - name: id in: path required: true - description: The ID of the cXML Application + description: The ID of the Dialogflow Agent schema: type: string format: uuid @@ -11296,6 +11154,213 @@ paths: responses: '204': description: No content + /resources/cxml_applications: + get: + operationId: CxmlApplications_list + summary: List cXML Applications + description: A list of cXML Applications + parameters: [] + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationListResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + tags: + - cXML Application + post: + operationId: CxmlApplications_create + summary: Create cXML Application + description: Creates acXML Application + parameters: [] + responses: + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + '422': + description: Client error + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationCreateStatusCode422' + tags: + - cXML Application + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationCreateRequest' + /resources/cxml_applications/{cxml_application_id}/addresses: + get: + operationId: CxmlApplicationAddresses_list + summary: List cXML Application Addresses + description: A list of cXML Application Addresses + parameters: + - $ref: '#/components/parameters/CxmlApplicationIDPath' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationAddressListResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + tags: + - cXML Application + /resources/cxml_applications/{id}: + get: + operationId: CxmlApplications_read + summary: Get cXML Application + description: Returns an cXML Application by ID + parameters: + - $ref: '#/components/parameters/CxmlApplicationID' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + tags: + - cXML Application + patch: + operationId: CxmlApplications_update + summary: Update cXML Application + description: Updates a cXML Application by ID + parameters: + - $ref: '#/components/parameters/CxmlApplicationID' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + '422': + description: Client error + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationUpdateStatusCode422' + tags: + - cXML Application + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationUpdateRequest' + delete: + operationId: CxmlApplications_delete + summary: Delete cXML Application + description: Deletes a cXML Application by ID + parameters: + - $ref: '#/components/parameters/CxmlApplicationID' + responses: + '204': + description: 'There is no content to send for this request, but the headers may be useful. ' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + tags: + - cXML Application /resources/{id}/addresses: get: tags: diff --git a/api/signalwire-rest/fabric-api/ai-agent/main.tsp b/api/signalwire-rest/fabric-api/ai-agent/main.tsp index 2c498b9..8a39636 100644 --- a/api/signalwire-rest/fabric-api/ai-agent/main.tsp +++ b/api/signalwire-rest/fabric-api/ai-agent/main.tsp @@ -24,14 +24,14 @@ namespace FabricAPI.AIAgents { @summary("Get AI Agent") @doc("Returns an AI Agent by ID") read(...AIAgentPathID): - { @statusCode statusCode: 200; @body ai_agent: AIAgent; } | + { @statusCode statusCode: 200; @body ai_agent: AIAgentResponse; } | StatusCode401 | StatusCode404; @summary("Create AI Agent") @doc("Creates an AI Agent") @post create(...AIAgentCreateRequest): - { @statusCode statusCode: 201; @body ai_agent: AIAgent; } | + { @statusCode statusCode: 201; @body ai_agent: AIAgentResponse; } | StatusCode401 | StatusCode404 | AIAgentCreateStatusCode422; @@ -39,7 +39,7 @@ namespace FabricAPI.AIAgents { @summary("Update AI Agent") @doc("Updates an AI Agent by ID") @patch update(...AIAgentPathID, ...AIAgentUpdateRequest): - { @statusCode statusCode: 200; @body ai_agent: AIAgent; } | + { @statusCode statusCode: 200; @body ai_agent: AIAgentResponse; } | StatusCode401 | StatusCode404 | AIAgentUpdateStatusCode422; diff --git a/api/signalwire-rest/fabric-api/ai-agent/models/responses.tsp b/api/signalwire-rest/fabric-api/ai-agent/models/responses.tsp index fc65c8f..2d47e8c 100644 --- a/api/signalwire-rest/fabric-api/ai-agent/models/responses.tsp +++ b/api/signalwire-rest/fabric-api/ai-agent/models/responses.tsp @@ -1,5 +1,34 @@ +model AIAgentResponse { + @doc("Unique ID of the AIAgent.") + @example("a87db7ed-8ebe-42e4-829f-8ba5a4152f54") + id: uuid; + + @doc("Unique ID of the Project.") + @example("99151cf8-9548-4860-ba70-a8de824f3312") + project_id: uuid; + + @doc("Display name of the AIAgent Fabric Resource") + @example("Booking Assistant") + display_name: string; + + @doc("Type of the Fabric Resource") + @example("external_laml_handler") + type: string; + + @doc("Date and time when the resource was created.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + created_at: utcDateTime; + + @doc("Date and time when the resource was updated.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + updated_at: utcDateTime; + + @doc("AIAgent data.") + ai_agent: AIAgentWithID; +} + model AIAgentListResponse { - data: AIAgentWithID[]; + data: AIAgentResponse[]; links: AIAgentPaginationResponse; } diff --git a/api/signalwire-rest/fabric-api/cxml-application-addresses/main.tsp b/api/signalwire-rest/fabric-api/cxml-application-addresses/main.tsp new file mode 100644 index 0000000..f52fd1a --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application-addresses/main.tsp @@ -0,0 +1,23 @@ +import "@typespec/http"; +import "@typespec/openapi"; +import "./models/core.tsp"; +import "./models/responses.tsp"; +import "../../types"; + +using TypeSpec.Http; +using Types.StatusCodes; + +@route("/resources/cxml_applications/{cxml_application_id}/addresses") +namespace FabricAPI.CxmlApplicationAddresses { + @tag("cXML Application") + @friendlyName("cXML Applications") + interface CxmlApplicationAddresses { + @summary("List cXML Application Addresses") + @doc("A list of cXML Application Addresses") + list(...CxmlApplicationIDPath): + CxmlApplicationAddressListResponse | + StatusCode401 | + StatusCode404; + } +} + diff --git a/api/signalwire-rest/fabric-api/cxml-application-addresses/models/core.tsp b/api/signalwire-rest/fabric-api/cxml-application-addresses/models/core.tsp new file mode 100644 index 0000000..0ec3a24 --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application-addresses/models/core.tsp @@ -0,0 +1,45 @@ +import "@typespec/openapi3"; +import "./enums.tsp"; +import "../../../types"; + +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +model CxmlApplicationIDPath { + @doc("Unique ID of a cXML Application.") + @path + cxml_application_id: uuid +} + +model CxmlApplicationAddress { + @doc("Unique ID of the Fabric Address.") + @example("691af061-cd86-4893-a605-173f47afc4c2") + id: uuid; + + @doc("Fabric resource ID that the Fabric Address belongs to.") + @example("691af061-cd86-4893-a605-173f47afc4c2") + resource_id: uuid; + + @doc("Name of the Fabric Address.") + @example("justice-league") + name: string; + + @doc("Display name of the Fabric Address.") + @example("Justice League") + display_name: string; + + @doc("Type of the Fabric Address.") + @example(DisplayTypes.App) + type: DisplayTypes; + + @doc("Cover url of the Fabric Address.") + @example("https://coverurl.com") + cover_url: string; + + @doc("Preview url of the Fabric Address.") + @example("https://previewurl.com") + preview_url: string; + + @doc("Channels of the Fabric Address.") + channel: AddressChannel; +} diff --git a/api/signalwire-rest/fabric-api/cxml-application-addresses/models/enums.tsp b/api/signalwire-rest/fabric-api/cxml-application-addresses/models/enums.tsp new file mode 100644 index 0000000..e7475bb --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application-addresses/models/enums.tsp @@ -0,0 +1 @@ +import "./../../enums.tsp"; diff --git a/api/signalwire-rest/fabric-api/cxml-application-addresses/models/responses.tsp b/api/signalwire-rest/fabric-api/cxml-application-addresses/models/responses.tsp new file mode 100644 index 0000000..f1c0d0d --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application-addresses/models/responses.tsp @@ -0,0 +1,18 @@ +model CxmlApplicationAddressListResponse { + data: CxmlApplicationAddress[]; + links: CxmlApplicationAddressPaginationResponse; +} + +model CxmlApplicationAddressPaginationResponse { + @doc("Link of the current page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50") + self: url; + + @doc("Link to the first page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50") + first: url; + + @doc("Link to the next page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca") + next: url; +} diff --git a/api/signalwire-rest/fabric-api/cxml-application/main.tsp b/api/signalwire-rest/fabric-api/cxml-application/main.tsp new file mode 100644 index 0000000..82af1ab --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application/main.tsp @@ -0,0 +1,58 @@ +import "@typespec/http"; +import "@typespec/openapi"; +import "./models/core.tsp"; +import "./models/requests.tsp"; +import "./models/responses.tsp"; +import "./models/errors.tsp"; +import "../../types"; + +using TypeSpec.Http; +using Types.StatusCodes; + +@route("/resources/cxml_applications") +namespace FabricAPI.CxmlApplications { + @tag("cXML Application") + @friendlyName("cXML Applications") + interface CxmlApplications { + @summary("List cXML Applications") + @doc("A list of cXML Applications") + list(): + CxmlApplicationListResponse | + StatusCode401 | + StatusCode404; + + @summary("Get cXML Application") + @doc("Returns an cXML Application by ID") + read(...CxmlApplicationID): { + @statusCode statusCode: 200; + @body cxml_application: CxmlApplicationResponse; + } | + StatusCode401 | + StatusCode404; + + @summary("Create cXML Application") + @doc("Creates acXML Application") + @post create(...CxmlApplicationCreateRequest): + { @statusCode statusCode: 201; @body cxml_application: CxmlApplicationResponse; } | + StatusCode401 | + StatusCode404 | + CxmlApplicationCreateStatusCode422; + + @summary("Update cXML Application") + @doc("Updates a cXML Application by ID") + @patch update(...CxmlApplicationID, ...CxmlApplicationUpdateRequest): { + @statusCode statusCode: 200; @body cxml_application: CxmlApplicationResponse; + } | + StatusCode401 | + StatusCode404 | + CxmlApplicationUpdateStatusCode422; + + @summary("Delete cXML Application") + @doc("Deletes a cXML Application by ID") + @delete delete(...CxmlApplicationID): + { @statusCode statusCode: 204; } | + StatusCode401 | + StatusCode404; + } +} + diff --git a/api/signalwire-rest/fabric-api/cxml-application/models/core.tsp b/api/signalwire-rest/fabric-api/cxml-application/models/core.tsp new file mode 100644 index 0000000..a2685ec --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application/models/core.tsp @@ -0,0 +1,48 @@ +import "./enums.tsp"; +import "../../../types"; + +using TypeSpec.Http; + +model CxmlApplicationID { + @doc("Unique ID of a cXML Application.") + @path + id: uuid +} + +model CxmlApplication { + @doc("Unique ID of the cXML Application.") + @example("a87db7ed-8ebe-42e4-829f-8ba5a4152f54") + id: uuid; + + @doc("Name of the cXML Application.") + @example("My cXML Application") + name: string; + + @doc("Indicates whether the call will be handled by a script or an external URL.") + @example(HandleCallsUsing.Script) + handle_calls_using: HandleCallsUsing; + + @doc("Call handler URL") + @example("https://example.com/cxml") + call_handler_url: string; + + @doc("Call handler URL method") + @example(UrlMethodType.Get) + call_handler_method: UrlMethodType; + + @doc("Call handler callback URL.") + @example("https://example.com/cxml") + call_handler_fallback_url: string; + + @doc("Call handler fallback method.") + @example(UrlMethodType.Get) + call_handler_fallback_method: UrlMethodType; + + @doc("Call status callback URL") + @example("https://callback.com") + call_status_callback_url: string; + + @doc("Call status callback method.") + @example(UrlMethodType.Post) + call_status_callback_method: UrlMethodType; +} diff --git a/api/signalwire-rest/fabric-api/cxml-application/models/enums.tsp b/api/signalwire-rest/fabric-api/cxml-application/models/enums.tsp new file mode 100644 index 0000000..e7475bb --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application/models/enums.tsp @@ -0,0 +1 @@ +import "./../../enums.tsp"; diff --git a/api/signalwire-rest/fabric-api/cxml-application/models/errors.tsp b/api/signalwire-rest/fabric-api/cxml-application/models/errors.tsp new file mode 100644 index 0000000..6f57698 --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application/models/errors.tsp @@ -0,0 +1,16 @@ +import "../../../types/status-codes"; + +using Types.StatusCodes; + +@example(#{ + errors: #[#{ + type: "validation_error", + code: "missing_required_parameter", + message: "Name is required", + attribute: "name", + url: "https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter" + }], + }) + model CxmlApplicationCreateStatusCode422 is StatusCode422; + + model CxmlApplicationUpdateStatusCode422 is CxmlApplicationCreateStatusCode422; diff --git a/api/signalwire-rest/fabric-api/cxml-application/models/requests.tsp b/api/signalwire-rest/fabric-api/cxml-application/models/requests.tsp new file mode 100644 index 0000000..e53c11e --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application/models/requests.tsp @@ -0,0 +1,75 @@ +model CxmlApplicationCreateRequest { + @doc("Name of the cXML Application.") + @example("My cXML Application") + name: string; + + @doc("Indicates whether the call will be handled by a script or an external URL.") + @example(HandleCallsUsing.Script) + handle_calls_using?: HandleCallsUsing; + + @doc("Call handler URL") + @example("https://example.com/cxml") + call_handler_url?: string; + + @doc("Call handler URL method") + @example(UrlMethodType.Get) + call_handler_method?: UrlMethodType = UrlMethodType.Post; + + @doc("Call handler callback URL.") + @example("https://example.com/cxml") + call_handler_fallback_url?: string; + + @doc("Call handler fallback method.") + @example(UrlMethodType.Get) + call_handler_fallback_method?: UrlMethodType = UrlMethodType.Post; + + @doc("Call status callback URL") + @example("https://callback.com") + call_status_callback_url?: string; + + @doc("Call status callback method.") + @example(UrlMethodType.Get) + call_status_callback_method?: UrlMethodType = UrlMethodType.Post; + + @doc("Script to handle to call.") + @example("\n\n https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3\n") + call_handler_script?: string; +} + +model CxmlApplicationUpdateRequest { + @doc("Name of the cXML Application.") + @example("My cXML Application") + name?: string; + + @doc("Indicates whether the call will be handled by a script or an external URL.") + @example(HandleCallsUsing.Script) + handle_calls_using?: HandleCallsUsing; + + @doc("Call handler URL") + @example("https://example.com/cxml") + call_handler_url?: string; + + @doc("Call handler URL method") + @example(UrlMethodType.Get) + call_handler_method?: UrlMethodType = UrlMethodType.Post; + + @doc("Call handler callback URL.") + @example("https://example.com/cxml") + call_handler_fallback_url?: string; + + @doc("Call handler fallback method.") + @example(UrlMethodType.Get) + call_handler_fallback_method?: UrlMethodType = UrlMethodType.Post; + + @doc("Call status callback URL") + @example("https://callback.com") + call_status_callback_url?: string; + + @doc("Call status callback method.") + @example(UrlMethodType.Get) + call_status_callback_method?: UrlMethodType = UrlMethodType.Post; + + @doc("Script to handle to call.") + @example("\n\n https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3\n") + call_handler_script?: string; +} diff --git a/api/signalwire-rest/fabric-api/cxml-application/models/responses.tsp b/api/signalwire-rest/fabric-api/cxml-application/models/responses.tsp new file mode 100644 index 0000000..8a0ad5e --- /dev/null +++ b/api/signalwire-rest/fabric-api/cxml-application/models/responses.tsp @@ -0,0 +1,47 @@ + +model CxmlApplicationResponse { + @doc("Unique ID of the cXML Application.") + @example("a87db7ed-8ebe-42e4-829f-8ba5a4152f54") + id: uuid; + + @doc("Unique ID of the Project.") + @example("99151cf8-9548-4860-ba70-a8de824f3312") + project_id: uuid; + + @doc("Display name of the cXML Application Fabric Resource") + @example("Booking Assistant") + display_name: string; + + @doc("Type of the Fabric Resource") + @example("cxml_application") + type: string; + + @doc("Date and time when the resource was created.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + created_at: utcDateTime; + + @doc("Date and time when the resource was updated.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + updated_at: utcDateTime; + + @doc("cXML Application data.") + cxml_application: CxmlApplication; +} +model CxmlApplicationListResponse { + data: CxmlApplicationResponse[]; + links: CxmlApplicationPaginationResponse; +} + +model CxmlApplicationPaginationResponse { + @doc("Link of the current page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50") + self: url; + + @doc("Link to the first page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50") + first: url; + + @doc("Link to the next page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca") + next: url; +} diff --git a/api/signalwire-rest/fabric-api/enums.tsp b/api/signalwire-rest/fabric-api/enums.tsp index aadd8e5..52b2144 100644 --- a/api/signalwire-rest/fabric-api/enums.tsp +++ b/api/signalwire-rest/fabric-api/enums.tsp @@ -36,6 +36,12 @@ enum UrlMethodType { Post: "POST", } +@doc("Indicates whether the call will be handled by a script or an external url.") +enum HandleCallsUsing { + Script: "script", + ExternalUrl: "external_url", +} + union AddressChannel { AudioChannel, MessagingChannel, diff --git a/api/signalwire-rest/fabric-api/external-laml-handler/main.tsp b/api/signalwire-rest/fabric-api/external-laml-handler/main.tsp index 09dcc0f..a8f2d41 100644 --- a/api/signalwire-rest/fabric-api/external-laml-handler/main.tsp +++ b/api/signalwire-rest/fabric-api/external-laml-handler/main.tsp @@ -25,7 +25,7 @@ namespace FabricAPI.ExternalLAMLHandlers { @doc("Returns an External LAML Handler by ID") read(...ExternalLAMLHandlerID): { @statusCode statusCode: 200; - @body external_laml_handler: ExternalLAMLHandler; + @body external_laml_handler: ExternalLAMLHandlerResponse; } | StatusCode401 | StatusCode404; @@ -33,7 +33,7 @@ namespace FabricAPI.ExternalLAMLHandlers { @summary("Create External LAML Handler") @doc("Creates an External LAML Handler") @post create(...ExternalLAMLHandlerCreateRequest): - { @statusCode statusCode: 201; @body external_laml_handler: ExternalLAMLHandler; } | + { @statusCode statusCode: 201; @body external_laml_handler: ExternalLAMLHandlerResponse; } | StatusCode401 | StatusCode404 | ExternalLamlHandlerCreateStatusCode422; @@ -41,7 +41,7 @@ namespace FabricAPI.ExternalLAMLHandlers { @summary("Update External LAML Handler") @doc("Updates an External LAML Handler by ID") @patch update(...ExternalLAMLHandlerID, ...ExternalLAMLHandlerUpdateRequest): { - @statusCode statusCode: 200; @body external_laml_handler: ExternalLAMLHandler; + @statusCode statusCode: 200; @body external_laml_handler: ExternalLAMLHandlerResponse; } | StatusCode401 | StatusCode404 | diff --git a/api/signalwire-rest/fabric-api/external-laml-handler/models/responses.tsp b/api/signalwire-rest/fabric-api/external-laml-handler/models/responses.tsp index 521f9fb..ae5ca4a 100644 --- a/api/signalwire-rest/fabric-api/external-laml-handler/models/responses.tsp +++ b/api/signalwire-rest/fabric-api/external-laml-handler/models/responses.tsp @@ -1,5 +1,35 @@ + +model ExternalLAMLHandlerResponse { + @doc("Unique ID of the ExternalLAMLHandler.") + @example("a87db7ed-8ebe-42e4-829f-8ba5a4152f54") + id: uuid; + + @doc("Unique ID of the Project.") + @example("99151cf8-9548-4860-ba70-a8de824f3312") + project_id: uuid; + + @doc("Display name of the ExternalLAMLHandler Fabric Resource") + @example("Booking Assistant") + display_name: string; + + @doc("Type of the Fabric Resource") + @example("external_laml_handler") + type: string; + + @doc("Date and time when the resource was created.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + created_at: utcDateTime; + + @doc("Date and time when the resource was updated.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + updated_at: utcDateTime; + + @doc("ExternalLAMLHandler data.") + external_laml_handler: ExternalLAMLHandler; +} + model ExternalLAMLHandlerListResponse { - data: ExternalLAMLHandler[]; + data: ExternalLAMLHandlerResponse[]; links: ExternalLAMLHandlerPaginationResponse; } diff --git a/api/signalwire-rest/fabric-api/external-swml-handler/main.tsp b/api/signalwire-rest/fabric-api/external-swml-handler/main.tsp index d09f73d..83ff1a0 100644 --- a/api/signalwire-rest/fabric-api/external-swml-handler/main.tsp +++ b/api/signalwire-rest/fabric-api/external-swml-handler/main.tsp @@ -25,7 +25,7 @@ namespace FabricAPI.ExternalSWMLHandlers { @doc("Returns an External SWML Handler by ID") read(...ExternalSWMLHandlerID): { @statusCode statusCode: 200; - @body external_laml_handler: ExternalSWMLHandler; + @body external_laml_handler: ExternalSWMLHandlerResponse; } | StatusCode401 | StatusCode404; @@ -33,7 +33,7 @@ namespace FabricAPI.ExternalSWMLHandlers { @summary("Create External SWML Handler") @doc("Creates an External SWML Handler") @post create(...ExternalSWMLHandlerCreateRequest): - { @statusCode statusCode: 201; @body external_swml_handler: ExternalSWMLHandler; } | + { @statusCode statusCode: 201; @body external_swml_handler: ExternalSWMLHandlerResponse; } | StatusCode401 | StatusCode404 | ExternalSwmlHandlerCreateStatusCode422; @@ -41,7 +41,7 @@ namespace FabricAPI.ExternalSWMLHandlers { @summary("Update External SWML Handler") @doc("Updates an External SWML Handler by ID") @patch update(...ExternalSWMLHandlerID, ...ExternalSWMLHandlerUpdateRequest): { - @statusCode statusCode: 200; @body external_swml_handler: ExternalSWMLHandler; + @statusCode statusCode: 200; @body external_swml_handler: ExternalSWMLHandlerResponse; } | StatusCode401 | StatusCode404 | diff --git a/api/signalwire-rest/fabric-api/external-swml-handler/models/responses.tsp b/api/signalwire-rest/fabric-api/external-swml-handler/models/responses.tsp index 81cbd14..0bb2f05 100644 --- a/api/signalwire-rest/fabric-api/external-swml-handler/models/responses.tsp +++ b/api/signalwire-rest/fabric-api/external-swml-handler/models/responses.tsp @@ -1,5 +1,36 @@ + + +model ExternalSWMLHandlerResponse { + @doc("Unique ID of the External SWML Handler.") + @example("a87db7ed-8ebe-42e4-829f-8ba5a4152f54") + id: uuid; + + @doc("Unique ID of the Project.") + @example("99151cf8-9548-4860-ba70-a8de824f3312") + project_id: uuid; + + @doc("Display name of the External SWML Handler Fabric Resource") + @example("Booking Assistant") + display_name: string; + + @doc("Type of the Fabric Resource") + @example("external_swml_handler") + type: string; + + @doc("Date and time when the resource was created.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + created_at: utcDateTime; + + @doc("Date and time when the resource was updated.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + updated_at: utcDateTime; + + @doc("External SWML Handler data.") + external_swml_handler: ExternalSWMLHandler; +} + model ExternalSWMLHandlerListResponse { - data: ExternalSWMLHandler[]; + data: ExternalSWMLHandlerResponse[]; links: ExternalSWMLHandlerPaginationResponse; } diff --git a/api/signalwire-rest/fabric-api/main.tsp b/api/signalwire-rest/fabric-api/main.tsp index 11e0d02..06f1f6b 100644 --- a/api/signalwire-rest/fabric-api/main.tsp +++ b/api/signalwire-rest/fabric-api/main.tsp @@ -10,6 +10,9 @@ import "./external-swml-handler"; import "./external-swml-handler-addresses"; import "./ai-agent"; import "./ai-agent-addresses"; +import "./cxml-application"; +import "./cxml-application-addresses"; + using TypeSpec.Http; using Types.StatusCodes; diff --git a/api/signalwire-rest/fabric-api/subscribers/main.tsp b/api/signalwire-rest/fabric-api/subscribers/main.tsp index 2dc4143..6d370ea 100644 --- a/api/signalwire-rest/fabric-api/subscribers/main.tsp +++ b/api/signalwire-rest/fabric-api/subscribers/main.tsp @@ -18,25 +18,28 @@ namespace FabricAPI.Subscribers { @friendlyName("Subscribers") interface Subscribers { @summary("List Subscribers") - list(): Subscriber[]; + list(): + SubscriberListResponse | + StatusCode401 | + StatusCode404; @summary("Create Subscriber") @post - create(@body body: SubscriberRequest): + create(@body body: SubscriberRequest): { @statusCode statusCode: 201; @body subscriber: SubscriberResponse; } | StatusCode401 | StatusCode404 | SubscriberCreateStatusCode422; @summary("Get Subscriber") - get(...SubscriberPathID): + get(...SubscriberPathID): { @statusCode statusCode: 200; @body body: SubscriberResponse; } | StatusCode401 | StatusCode404; @summary("Update Subscriber") @put - update(...SubscriberPathID, ...SubscriberRequest): + update(...SubscriberPathID, ...SubscriberRequest): { @statusCode statusCode: 200; @body body: SubscriberResponse; } | StatusCode401 | StatusCode404 | @@ -44,7 +47,7 @@ namespace FabricAPI.Subscribers { @summary("Delete Subscriber") @delete - delete(...SubscriberPathID): + delete(...SubscriberPathID): { @statusCode statusCode: 204; } | StatusCode401 | StatusCode404; diff --git a/api/signalwire-rest/fabric-api/subscribers/models/core.tsp b/api/signalwire-rest/fabric-api/subscribers/models/core.tsp index adeb4ed..81142e1 100644 --- a/api/signalwire-rest/fabric-api/subscribers/models/core.tsp +++ b/api/signalwire-rest/fabric-api/subscribers/models/core.tsp @@ -4,52 +4,50 @@ using TypeSpec.Http; using Types; model SubscriberPathID { - @doc("Unique ID of a Subscriber.") - @path - id: uuid + @doc("Unique ID of a Subscriber.") + @path + id: uuid } model Subscriber { - - @doc("Unique ID of the Subscriber.") - @example("d369a402-7b43-4512-8735-9d5e1f387814") - id: string; - - @doc("Email of the Subscriber.") - @example("johndoe@example.com") - email: string; - - @doc("First name of the Subscriber.") - @example("John") - first_name: string; - - @doc("Last name of the Subscriber.") - @example("Doe") - last_name: string; - - @doc("Display name of the Subscriber.") - @example("John Doe") - display_name: string; - - @doc("Job title of the Subscriber.") - @example("Software Engineer") - job_title: string; - - @doc("Timezone of the Subscriber.") - @example("America/New_York") - timezone: string; - - @doc("Country of the Subscriber.") - @example("United States") - country: string; - - @doc("Region of the Subscriber.") - @example("New York") - region: string; - - @doc("Company name of the Subscriber.") - @example("SignalWire") - company_name: string; - -} \ No newline at end of file + @doc("Unique ID of the Subscriber.") + @example("d369a402-7b43-4512-8735-9d5e1f387814") + id: string; + + @doc("Email of the Subscriber.") + @example("johndoe@example.com") + email: string; + + @doc("First name of the Subscriber.") + @example("John") + first_name: string; + + @doc("Last name of the Subscriber.") + @example("Doe") + last_name: string; + + @doc("Display name of the Subscriber.") + @example("John Doe") + display_name: string; + + @doc("Job title of the Subscriber.") + @example("Software Engineer") + job_title: string; + + @doc("Timezone of the Subscriber.") + @example("America/New_York") + timezone: string; + + @doc("Country of the Subscriber.") + @example("United States") + country: string; + + @doc("Region of the Subscriber.") + @example("New York") + region: string; + + @doc("Company name of the Subscriber.") + @example("SignalWire") + company_name: string; +} diff --git a/api/signalwire-rest/fabric-api/subscribers/models/responses.tsp b/api/signalwire-rest/fabric-api/subscribers/models/responses.tsp index a3d71cf..a47333b 100644 --- a/api/signalwire-rest/fabric-api/subscribers/models/responses.tsp +++ b/api/signalwire-rest/fabric-api/subscribers/models/responses.tsp @@ -1,31 +1,48 @@ import "./core.tsp"; model SubscriberResponse { + @doc("Unique ID of the request.") + @example("d369a402-7b43-4512-8735-9d5e1f387814") + id: string; - @doc("Unique ID of the request.") - @example("d369a402-7b43-4512-8735-9d5e1f387814") - id: string; + @doc("Unique ID of the project.") + @example("d369a402-7b43-4512-8735-9d5e1f387814") + project_id: string; - @doc("Unique ID of the project.") - @example("d369a402-7b43-4512-8735-9d5e1f387814") - project_id: string; + @doc("Display name of the Subscriber.") + @example("John Doe") + display_name: string; - @doc("Display name of the Subscriber.") - @example("John Doe") - display_name: string; + @doc("Type of the resource.") + type: "subscriber"; - @doc("Type of the resource.") - type: "subscriber"; + @doc("Date and time when the resource was created.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + created_at: utcDateTime; - @doc("Date and time when the resource was created.") - @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) - created_at: utcDateTime; + @doc("Date and time when the resource was updated.") + @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) + updated_at: utcDateTime; - @doc("Date and time when the resource was updated.") - @example(utcDateTime.fromISO("2024-10-17T14:14:53Z")) - updated_at: utcDateTime; + @doc("Subscriber data.") + subscriber: Subscriber; +} + +model SubscriberListResponse { + data: SubscriberResponse[]; + links: SubscriberPaginationResponse; +} + +model SubscriberPaginationResponse { + @doc("Link of the current page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=0&page_size=50") + self: url; + + @doc("Link to the first page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=0&page_size=50") + first: url; - @doc("Subscriber data.") - subscriber: Subscriber; - + @doc("Link to the next page") + @example("https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca") + next: url; } diff --git a/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml b/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml index edc973e..d0d4c5f 100644 --- a/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml +++ b/api/signalwire-rest/fabric-api/tsp-output/@typespec/openapi3/openapi.yaml @@ -10,6 +10,7 @@ tags: - name: External LAML Handler - name: External SWML Handler - name: AI Agent + - name: cXML Application paths: /addresses: get: @@ -167,7 +168,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AIAgent' + $ref: '#/components/schemas/AIAgentResponse' '401': description: Access is unauthorized. content: @@ -243,7 +244,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AIAgent' + $ref: '#/components/schemas/AIAgentResponse' '401': description: Access is unauthorized. content: @@ -274,7 +275,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AIAgent' + $ref: '#/components/schemas/AIAgentResponse' '401': description: Access is unauthorized. content: @@ -332,6 +333,213 @@ paths: - Not Found tags: - AI Agent + /resources/cxml_applications: + get: + operationId: CxmlApplications_list + summary: List cXML Applications + description: A list of cXML Applications + parameters: [] + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationListResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + tags: + - cXML Application + post: + operationId: CxmlApplications_create + summary: Create cXML Application + description: Creates acXML Application + parameters: [] + responses: + '201': + description: The request has succeeded and a new resource has been created as a result. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + '422': + description: Client error + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationCreateStatusCode422' + tags: + - cXML Application + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationCreateRequest' + /resources/cxml_applications/{cxml_application_id}/addresses: + get: + operationId: CxmlApplicationAddresses_list + summary: List cXML Application Addresses + description: A list of cXML Application Addresses + parameters: + - $ref: '#/components/parameters/CxmlApplicationIDPath' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationAddressListResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + tags: + - cXML Application + /resources/cxml_applications/{id}: + get: + operationId: CxmlApplications_read + summary: Get cXML Application + description: Returns an cXML Application by ID + parameters: + - $ref: '#/components/parameters/CxmlApplicationID' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + tags: + - cXML Application + patch: + operationId: CxmlApplications_update + summary: Update cXML Application + description: Updates a cXML Application by ID + parameters: + - $ref: '#/components/parameters/CxmlApplicationID' + responses: + '200': + description: The request has succeeded. + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + '422': + description: Client error + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationUpdateStatusCode422' + tags: + - cXML Application + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CxmlApplicationUpdateRequest' + delete: + operationId: CxmlApplications_delete + summary: Delete cXML Application + description: Deletes a cXML Application by ID + parameters: + - $ref: '#/components/parameters/CxmlApplicationID' + responses: + '204': + description: 'There is no content to send for this request, but the headers may be useful. ' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found + tags: + - cXML Application /resources/external_laml_handlers: get: operationId: ExternalLAMLHandlers_list @@ -374,7 +582,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandler' + $ref: '#/components/schemas/ExternalLAMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -450,7 +658,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandler' + $ref: '#/components/schemas/ExternalLAMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -481,7 +689,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalLAMLHandler' + $ref: '#/components/schemas/ExternalLAMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -581,7 +789,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalSWMLHandler' + $ref: '#/components/schemas/ExternalSWMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -657,7 +865,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalSWMLHandler' + $ref: '#/components/schemas/ExternalSWMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -688,7 +896,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ExternalSWMLHandler' + $ref: '#/components/schemas/ExternalSWMLHandlerResponse' '401': description: Access is unauthorized. content: @@ -757,9 +965,23 @@ paths: content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Subscriber' + $ref: '#/components/schemas/SubscriberListResponse' + '401': + description: Access is unauthorized. + content: + application/json: + schema: + type: string + enum: + - Unauthorized + '404': + description: The server cannot find the requested resource. + content: + application/json: + schema: + type: string + enum: + - Not Found tags: - Subscribers post: @@ -1219,6 +1441,20 @@ components: description: Unique ID of an AI Agent. schema: $ref: '#/components/schemas/uuid' + CxmlApplicationID: + name: id + in: path + required: true + description: Unique ID of a cXML Application. + schema: + $ref: '#/components/schemas/uuid' + CxmlApplicationIDPath: + name: cxml_application_id + in: path + required: true + description: Unique ID of a cXML Application. + schema: + $ref: '#/components/schemas/uuid' ExternalLAMLHandlerID: name: id in: path @@ -1283,50 +1519,6 @@ components: schema: $ref: '#/components/schemas/uuid' schemas: - AIAgent: - type: object - required: - - name - properties: - name: - type: string - example: My AI Agent - description: Name of the AI Agent. - prompt: - allOf: - - $ref: '#/components/schemas/AIPrompt' - description: Establishes the initial set of instructions and settings to configure the agent. - post_prompt: - allOf: - - $ref: '#/components/schemas/AIPostPrompt' - description: The final set of instructions and configuration settings to send to the agent. - params: - allOf: - - $ref: '#/components/schemas/AIParams' - description: A JSON object containing parameters as key-value pairs. - pronounce: - type: array - items: - $ref: '#/components/schemas/Pronounce' - description: An array of JSON objects to clarify the AI's pronunciation of words or expressions. - hints: - type: array - items: - type: string - example: - - One Hint - - Two Hint - description: An array of hints (as strings) to provide context to the dialogue. - languages: - type: array - items: - $ref: '#/components/schemas/Languages' - description: An array of JSON objects defining supported languages in the conversation. - SWAIG: - type: array - items: - $ref: '#/components/schemas/SWAIG' - description: An array of JSON objects to create user-defined functions/endpoints that can be executed during the dialogue. AIAgentAddress: type: object required: @@ -1477,7 +1669,7 @@ components: data: type: array items: - $ref: '#/components/schemas/AIAgentWithID' + $ref: '#/components/schemas/AIAgentResponse' links: $ref: '#/components/schemas/AIAgentPaginationResponse' AIAgentPaginationResponse: @@ -1502,6 +1694,49 @@ components: format: uri example: https://{space_name}.signalwire.com/api/fabric/resources/ai_agents?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page + AIAgentResponse: + type: object + required: + - id + - project_id + - display_name + - type + - created_at + - updated_at + - ai_agent + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the AIAgent. + project_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the AIAgent Fabric Resource + type: + type: string + example: external_laml_handler + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + ai_agent: + allOf: + - $ref: '#/components/schemas/AIAgentWithID' + description: AIAgent data. AIAgentUpdateRequest: type: object properties: @@ -2143,112 +2378,458 @@ components: ContextStepsUpdate: type: object properties: - steps: + steps: + type: array + items: + $ref: '#/components/schemas/ContextStepsParams' + description: An array of objects that define the steps in the context. These steps are used to define the flow of the conversation. + title: steps + title: ContextSteps object + ContextStepsValidSteps: + type: object + required: + - name + - text + properties: + name: + type: string + example: Take Pizza order + description: The name of the step. The name must be unique within the context. The name is used for referencing the step in the context. + text: + type: string + example: Your name is Franklin and you are taking orders for Franklin's Pizza. + description: The prompt or instructions given to the AI at this step. + step_criteria: + type: string + example: Customer wants to order Pizza + description: |- + The conditions that must be met for the conversation to proceed to the next step. + If a condition is not met, the conversation will not proceed to the next step. + It's **highly** recommended you create a custom criteria for the step to get the intended behavior. + functions: + type: array + items: + type: string + example: + - Take Order + - Confirm Order + - Confirm Address + description: An array of SWAIG.functions that can be executed from this step. + valid_contexts: + type: array + items: + type: string + example: + - Place Order + - Confirm Order + description: An array of valid contexts that the conversation can transition to from this step. + skip_user_turn: + type: boolean + description: A boolean value that, when true, will skip the user's turn to respond in the conversation and proceed to the next step. + valid_steps: + type: array + items: + type: string + example: + - get order + - confirm order + description: |- + An array of valid steps that the conversation can proceed to from this step. + If the array is empty, or the `valid_steps` key is not present, the conversation will proceed to the next step in the context. + title: ContextStepsValidSteps object + ContextSwitchAction: + type: object + required: + - context_switch + properties: + context_switch: + type: object + properties: + system_prompt: + type: string + description: The instructions to send to the agent. Default is not set. + consolidate: + type: boolean + description: Whether to consolidate the context. Default is `false`. + user_prompt: + type: string + description: |- + A string serving as simulated user input for the AI Agent. + During a context_switch in the AI's prompt, the user_prompt offers the AI pre-established context or guidance. + Default is not set + required: + - system_prompt + description: A JSON object containing the context to switch to. Default is not set. + title: context_switch + title: ContextSwitchAction object + Contexts: + type: object + required: + - default + properties: + default: + allOf: + - $ref: '#/components/schemas/ContextSteps' + description: The default context to use at the beginning of the conversation. Additional context steps can be defined as any other key in the object. + additionalProperties: + $ref: '#/components/schemas/ContextSteps' + title: contexts + ContextsUpdate: + type: object + properties: + default: + allOf: + - $ref: '#/components/schemas/ContextStepsUpdate' + description: The default context to use at the beginning of the conversation. Additional context steps can be defined as any other key in the object. + additionalProperties: + $ref: '#/components/schemas/ContextStepsUpdate' + title: contexts + CxmlApplication: + type: object + required: + - id + - name + - handle_calls_using + - call_handler_url + - call_handler_method + - call_handler_fallback_url + - call_handler_fallback_method + - call_status_callback_url + - call_status_callback_method + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the cXML Application. + name: + type: string + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: + allOf: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: + type: string + example: https://example.com/cxml + description: Call handler URL + call_handler_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler URL method + call_handler_fallback_url: + type: string + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler fallback method. + call_status_callback_url: + type: string + example: https://callback.com + description: Call status callback URL + call_status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: POST + description: Call status callback method. + CxmlApplicationAddress: + type: object + required: + - id + - resource_id + - name + - display_name + - type + - cover_url + - preview_url + - channel + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Unique ID of the Fabric Address. + resource_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 691af061-cd86-4893-a605-173f47afc4c2 + description: Fabric resource ID that the Fabric Address belongs to. + name: + type: string + example: justice-league + description: Name of the Fabric Address. + display_name: + type: string + example: Justice League + description: Display name of the Fabric Address. + type: + allOf: + - $ref: '#/components/schemas/DisplayTypes' + example: app + description: Type of the Fabric Address. + cover_url: + type: string + example: https://coverurl.com + description: Cover url of the Fabric Address. + preview_url: + type: string + example: https://previewurl.com + description: Preview url of the Fabric Address. + channel: + allOf: + - $ref: '#/components/schemas/AddressChannel' + description: Channels of the Fabric Address. + CxmlApplicationAddressListResponse: + type: object + required: + - data + - links + properties: + data: + type: array + items: + $ref: '#/components/schemas/CxmlApplicationAddress' + links: + $ref: '#/components/schemas/CxmlApplicationAddressPaginationResponse' + CxmlApplicationAddressPaginationResponse: + type: object + required: + - self + - first + - next + properties: + self: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link of the current page + first: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=0&page_size=50 + description: Link to the first page + next: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applications/a87db7ed-8ebe-42e4-829f-8ba5a4152f54/addresses?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page + CxmlApplicationCreateRequest: + type: object + required: + - name + properties: + name: + type: string + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: + allOf: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: + type: string + example: https://example.com/cxml + description: Call handler URL + call_handler_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler URL method + default: POST + call_handler_fallback_url: + type: string + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler fallback method. + default: POST + call_status_callback_url: + type: string + example: https://callback.com + description: Call status callback URL + call_status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call status callback method. + default: POST + call_handler_script: + type: string + example: |- + + + https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 + + description: Script to handle to call. + CxmlApplicationCreateStatusCode422: + type: object + required: + - errors + properties: + errors: + type: array + items: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode422Error' + example: + errors: + - type: validation_error + code: missing_required_parameter + message: Name is required + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter + CxmlApplicationListResponse: + type: object + required: + - data + - links + properties: + data: type: array items: - $ref: '#/components/schemas/ContextStepsParams' - description: An array of objects that define the steps in the context. These steps are used to define the flow of the conversation. - title: steps - title: ContextSteps object - ContextStepsValidSteps: + $ref: '#/components/schemas/CxmlApplicationResponse' + links: + $ref: '#/components/schemas/CxmlApplicationPaginationResponse' + CxmlApplicationPaginationResponse: type: object required: - - name - - text + - self + - first + - next properties: - name: + self: type: string - example: Take Pizza order - description: The name of the step. The name must be unique within the context. The name is used for referencing the step in the context. - text: + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50 + description: Link of the current page + first: type: string - example: Your name is Franklin and you are taking orders for Franklin's Pizza. - description: The prompt or instructions given to the AI at this step. - step_criteria: + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=0&page_size=50 + description: Link to the first page + next: type: string - example: Customer wants to order Pizza - description: |- - The conditions that must be met for the conversation to proceed to the next step. - If a condition is not met, the conversation will not proceed to the next step. - It's **highly** recommended you create a custom criteria for the step to get the intended behavior. - functions: - type: array - items: - type: string - example: - - Take Order - - Confirm Order - - Confirm Address - description: An array of SWAIG.functions that can be executed from this step. - valid_contexts: - type: array - items: - type: string - example: - - Place Order - - Confirm Order - description: An array of valid contexts that the conversation can transition to from this step. - skip_user_turn: - type: boolean - description: A boolean value that, when true, will skip the user's turn to respond in the conversation and proceed to the next step. - valid_steps: - type: array - items: - type: string - example: - - get order - - confirm order - description: |- - An array of valid steps that the conversation can proceed to from this step. - If the array is empty, or the `valid_steps` key is not present, the conversation will proceed to the next step in the context. - title: ContextStepsValidSteps object - ContextSwitchAction: + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/cxml_applicationis?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page + CxmlApplicationResponse: type: object required: - - context_switch + - id + - project_id + - display_name + - type + - created_at + - updated_at + - cxml_application properties: - context_switch: - type: object - properties: - system_prompt: - type: string - description: The instructions to send to the agent. Default is not set. - consolidate: - type: boolean - description: Whether to consolidate the context. Default is `false`. - user_prompt: - type: string - description: |- - A string serving as simulated user input for the AI Agent. - During a context_switch in the AI's prompt, the user_prompt offers the AI pre-established context or guidance. - Default is not set - required: - - system_prompt - description: A JSON object containing the context to switch to. Default is not set. - title: context_switch - title: ContextSwitchAction object - Contexts: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the cXML Application. + project_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the cXML Application Fabric Resource + type: + type: string + example: cxml_application + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + cxml_application: + allOf: + - $ref: '#/components/schemas/CxmlApplication' + description: cXML Application data. + CxmlApplicationUpdateRequest: type: object - required: - - default properties: - default: + name: + type: string + example: My cXML Application + description: Name of the cXML Application. + handle_calls_using: allOf: - - $ref: '#/components/schemas/ContextSteps' - description: The default context to use at the beginning of the conversation. Additional context steps can be defined as any other key in the object. - additionalProperties: - $ref: '#/components/schemas/ContextSteps' - title: contexts - ContextsUpdate: + - $ref: '#/components/schemas/HandleCallsUsing' + example: script + description: Indicates whether the call will be handled by a script or an external URL. + call_handler_url: + type: string + example: https://example.com/cxml + description: Call handler URL + call_handler_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler URL method + default: POST + call_handler_fallback_url: + type: string + example: https://example.com/cxml + description: Call handler callback URL. + call_handler_fallback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call handler fallback method. + default: POST + call_status_callback_url: + type: string + example: https://callback.com + description: Call status callback URL + call_status_callback_method: + allOf: + - $ref: '#/components/schemas/UrlMethodType' + example: GET + description: Call status callback method. + default: POST + call_handler_script: + type: string + example: |- + + + https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3 + + description: Script to handle to call. + CxmlApplicationUpdateStatusCode422: type: object + required: + - errors properties: - default: - allOf: - - $ref: '#/components/schemas/ContextStepsUpdate' - description: The default context to use at the beginning of the conversation. Additional context steps can be defined as any other key in the object. - additionalProperties: - $ref: '#/components/schemas/ContextStepsUpdate' - title: contexts + errors: + type: array + items: + $ref: '#/components/schemas/Types.StatusCodes.StatusCode422Error' + example: + errors: + - type: validation_error + code: missing_required_parameter + message: Name is required + attribute: name + url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes/#missing_required_parameter DataMap: oneOf: - $ref: '#/components/schemas/Output' @@ -2513,7 +3094,7 @@ components: data: type: array items: - $ref: '#/components/schemas/ExternalLAMLHandler' + $ref: '#/components/schemas/ExternalLAMLHandlerResponse' links: $ref: '#/components/schemas/ExternalLAMLHandlerPaginationResponse' ExternalLAMLHandlerPaginationResponse: @@ -2538,6 +3119,49 @@ components: format: uri example: https://{space_name}.signalwire.com/api/fabric/resources/external_laml_handlers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page + ExternalLAMLHandlerResponse: + type: object + required: + - id + - project_id + - display_name + - type + - created_at + - updated_at + - external_laml_handler + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the ExternalLAMLHandler. + project_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the ExternalLAMLHandler Fabric Resource + type: + type: string + example: external_laml_handler + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + external_laml_handler: + allOf: + - $ref: '#/components/schemas/ExternalLAMLHandler' + description: ExternalLAMLHandler data. ExternalLAMLHandlerUpdateRequest: type: object properties: @@ -2818,7 +3442,7 @@ components: data: type: array items: - $ref: '#/components/schemas/ExternalSWMLHandler' + $ref: '#/components/schemas/ExternalSWMLHandlerResponse' links: $ref: '#/components/schemas/ExternalSWMLHandlerPaginationResponse' ExternalSWMLHandlerPaginationResponse: @@ -2843,6 +3467,49 @@ components: format: uri example: https://{space_name}.signalwire.com/api/fabric/resources/external_swml_handlers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca description: Link to the next page + ExternalSWMLHandlerResponse: + type: object + required: + - id + - project_id + - display_name + - type + - created_at + - updated_at + - external_swml_handler + properties: + id: + allOf: + - $ref: '#/components/schemas/uuid' + example: a87db7ed-8ebe-42e4-829f-8ba5a4152f54 + description: Unique ID of the External SWML Handler. + project_id: + allOf: + - $ref: '#/components/schemas/uuid' + example: 99151cf8-9548-4860-ba70-a8de824f3312 + description: Unique ID of the Project. + display_name: + type: string + example: Booking Assistant + description: Display name of the External SWML Handler Fabric Resource + type: + type: string + example: external_swml_handler + description: Type of the Fabric Resource + created_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was created. + updated_at: + type: string + format: date-time + example: 2024-10-17T14:14:53Z + description: Date and time when the resource was updated. + external_swml_handler: + allOf: + - $ref: '#/components/schemas/ExternalSWMLHandler' + description: External SWML Handler data. ExternalSWMLHandlerUpdateRequest: type: object properties: @@ -3056,6 +3723,12 @@ components: message: The addresses must belong to the project attribute: allowed_addresses url: https://developer.signalwire.com/rest/signalwire-rest/overview/error-codes#must_belong_to_project + HandleCallsUsing: + type: string + enum: + - script + - external_url + description: Indicates whether the call will be handled by a script or an external url. IntegerProperty: type: object required: @@ -3891,6 +4564,40 @@ components: type: string example: eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIiwiY2giOiJwdWMuc2lnbmFsd2lyZS5jb20iLCJ0eXAiOiJTQVQifQ..8O4EJs349q97jAcd.H4GNrC6gsWdz91ArWF9ce00Cm62iHfsrFRRUUGW3e96j9C3IphiJXvHYHTmD4qMt8czZ8cniF8c53vVAIZF-yBQibejiMxwnqW6KkLct2EJoPUf9g-wQwM0-lGGj9iPx_7yprkQekFK-7svkLcKlo1voZyavxIsWQlXByppmR_ospVx2u8jbAab0ZjKJNEnr1yPF9oNkyMAnkpkS8k8PwKaxUHBc5SGumKlexUjL3ixZDR6UOcbApVXxrB-DmQBs3otOT7hzME7oKvR-6Xy0XJ1pt4Of7MEzNBUK5Z5NMjtFiA8IqwDlNJz3I5gn8hbjSZwSMJHRJGx2DKpNKiu6fcd-3i2VwCpnKHaNUybMJ5gV3cTNfTFJQBSearCLv-7gMx6Gqy9FF_Hm2bGlfnjTQ9BCsCqXBkQ9EQD6yboi2uUhPyLmpzPqlrBc9ik0c3qR5ey5Jym_VnZXaT_S5NxjzIjLzvs33GOKiooGMsBWOm6mzTPcf398xaSErT4dF2wXwtZANou7Dt4BoTKa.DcLVYpma-iItaGhaOStu9A description: Invite Token + SubscriberListResponse: + type: object + required: + - data + - links + properties: + data: + type: array + items: + $ref: '#/components/schemas/SubscriberResponse' + links: + $ref: '#/components/schemas/SubscriberPaginationResponse' + SubscriberPaginationResponse: + type: object + required: + - self + - first + - next + properties: + self: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=0&page_size=50 + description: Link of the current page + first: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=0&page_size=50 + description: Link to the first page + next: + type: string + format: uri + example: https://{space_name}.signalwire.com/api/fabric/resources/subscribers?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca + description: Link to the next page SubscriberRequest: type: object required: