openapi: 3.0.1
info:
  title: Connxio API
  description: "## Introduction\n    This API is documented in the **OpenAPI format** and provides users with programmatic access to the Connxio platform, allowing them to interact with and control various aspects of their integrations and workflows. With the Connxio API, users can automate integration processes, manage configurations, and programmatically interact with the messaging capabilities, providing flexibility and customization options for seamless integration with their existing systems.\n\n    ## Cross-Origin Resource Sharing\n    This API features Cross-Origin Resource Sharing(CORS) implemented in compliance with the [W3C spec](https://www.w3.org/TR/cors/) which allows for cross-domain communication from the browser.\n    All responses have a wildcard same-origin policy.\n\n    ## Authentication\n    The Connxio API offers two forms of authentication:\n      - [API Key (required)](/connxio-portal/apikeys)\n      - [OAuth2](https://oauth.net/2/)\n      \n    The API Key is required for all requests to the API. The OAuth2 authentication is implemented using the [Client Credentials Flow](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4) and is strongly recommended for all requests to the API."
  contact:
    name: Evidi
    url: https://www.evidi.com
    email: support@connxio.no
  version: '3.0'
  x-logo:
    url: /img/connxio-logo.svg
    altText: Connxio Logo
servers:
  - url: https://app-cx-qp-zelda-api.azurewebsites.net
paths:
  '/v3/messages/{integrationId}':
    post:
      tags:
        - Messages
      summary: Sends a single message to Connxio
      operationId: 'POST_api/v3/messages/{integrationId}'
      parameters:
        - name: MessageEncoding
          in: query
          schema:
            type: string
        - name: InterchangeId
          in: query
          schema:
            type: string
        - name: FileName
          in: query
          schema:
            type: string
        - name: integrationId
          in: path
          description: ''
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: string
            examples:
              Example request:
                value: '{"foo":"bar"}'
          application/xml:
            schema:
              type: string
            examples:
              Example request:
                value: "<root>\n  <Foo>bar</Foo>\n</root>"
        required: true
      responses:
        '200':
          description: The message was validated and sent to the Connxio engine
        '400':
          description: The supplied message or metadata did not pass validation
        '502':
          description: Could not contact internal services. Please try again later or contact our support department
  '/v3/messages/{integrationId}/batch':
    post:
      tags:
        - Messages
      summary: Sends a batch of messages to Connxio
      operationId: 'POST_api/v3/messages/{integrationId}/batch'
      parameters:
        - name: integrationId
          in: path
          description: ''
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/MessageBodyRequest'
            examples:
              Array of MessageBodyRequest:
                value: '[{"messageEncoding":"string","interchangeId":"string","messageBody":"string","fileName":"string"}]'
          application/xml:
            schema:
              $ref: '#/components/schemas/ArrayOfMessageBodyRequest'
            examples:
              Array of MessageBodyRequest:
                value: "<ArrayOfMessageBodyRequest>\n  <MessageBodyRequest>\n    <MessageEncoding>string</MessageEncoding>\n    <InterchangeId>string</InterchangeId>\n    <MessageBody>string</MessageBody>\n    <FileName>string</FileName>\n  </MessageBodyRequest>\n</ArrayOfMessageBodyRequest>"
        required: true
      responses:
        '200':
          description: The message was validated and sent to the Connxio engine
        '400':
          description: The supplied message or metadata did not pass validation
        '502':
          description: Could not contact internal services. Please try again later or contact our support department
  '/v3/messages/{integrationId}/eventgrid':
    post:
      tags:
        - Messages
      summary: Sends an Event Grid message to Connxio.
      operationId: 'POST_api/v3/messages/{integrationId}/eventgrid'
      parameters:
        - name: MessageEncoding
          in: query
          schema:
            type: string
        - name: InterchangeId
          in: query
          schema:
            type: string
        - name: FileName
          in: query
          schema:
            type: string
        - name: integrationId
          in: path
          description: ''
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/EventGridMessage'
            examples:
              Array of EventGridMessage:
                value: '[{"topic":"string","subject":"string","eventType":"string","eventTime":"2023-03-31T19:29:12.612Z","id":"string","data":"string","dataVersion":"string","metadataVersion":"string"}]'
          application/xml:
            schema:
              $ref: '#/components/schemas/ArrayOfEventGridMessage'
            examples:
              Array of EventGridMessage:
                value: "<ArrayOfEventGridMessage>\n  <EventGridMessage>\n    <Topic>string</Topic>\n    <Subject>string</Subject>\n    <EventType>string</EventType>\n    <EventTime>2023-03-31T19:27:48.597Z</EventTime>\n    <Id>string</Id>\n    <Data>string</Data>\n    <DataVersion>string</DataVersion>\n    <MetadataVersion>string</MetadataVersion>\n  </EventGridMessage>\n</ArrayOfEventGridMessage>"
        required: true
      responses:
        '200':
          description: The message was validated and sent to the Connxio engine
        '400':
          description: The supplied message or metadata did not pass validation
        '502':
          description: Could not contact internal services. Please try again later or contact our support department
components:
  schemas:
    ArrayOfEventGridMessage:
      type: object
      properties:
        eventGridMessages:
          type: array
          items:
            $ref: '#/components/schemas/EventGridMessage'
          nullable: true
      additionalProperties: false
    ArrayOfMessageBodyRequest:
      type: object
      properties:
        messageBodyRequests:
          type: array
          items:
            $ref: '#/components/schemas/MessageBodyRequest'
          nullable: true
      additionalProperties: false
    EventGridMessage:
      type: object
      properties:
        topic:
          type: string
          nullable: true
        subject:
          type: string
          nullable: true
        eventType:
          type: string
          nullable: true
        eventTime:
          type: string
          format: date-time
        id:
          type: string
          nullable: true
        data:
          nullable: true
        dataVersion:
          type: string
          nullable: true
        metadataVersion:
          type: string
          nullable: true
      additionalProperties: false
    MessageBodyRequest:
      required:
        - messageBody
      type: object
      properties:
        messageEncoding:
          type: string
          nullable: true
        interchangeId:
          type: string
          nullable: true
        messageBody:
          type: string
          format: byte
        fileName:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    Connxio-Api-Key:
      type: apiKey
      description: 'API Key for Connxio API. Can also be set using a query parameter. If using the webhook functionality, the header ''Connxio-Api-Webhook'' must also be set to ''true'''
      name: Connxio-Api-Key
      in: header
    Connxio-Api-key:
      type: apiKey
      description: API Key for Connxio API as a query parameter. Only use if headers are unavailable to you.
      name: Connxio-Api-Key
      in: query
    Connxio-Api-Webhook:
      type: apiKey
      description: This header must be set to 'true' to enable webhook functionality for the API key
      name: Connxio-Api-Webhook
      in: header
    Bearer:
      type: http
      description: JWT Authorization header using the Bearer scheme.
      scheme: bearer
security:
  - Connxio-API-Key: [ ]
    Bearer: [ ]