---
components:
  fields:
    instance:
      type: string
      example: 797a8f199c45014ab7b08bfe9cc1c12c
  responses:
    DefaultError:
      description: Default Error
      content:
        application/json:
          schema:
            properties:
              type:
                type: string
                example: 'https://developer.nexmo.com/api-errors#TO_BE_UPDATED'
              title:
                type: string
                example: THIS ERROR NEEDS REPLACING
              detail:
                type: string
                example: THIS IS A PLACEHOLDER FOR OTHER ERRORS
              instance:
                $ref: '#/components/fields/instance'
    BadCredentialsError:
      description: Credential is missing or invalid
      content:
        application/json:
          schema:
            properties:
              type:
                type: string
                example: 'https://developer.nexmo.com/api-errors#unauthorized'
              title:
                type: string
                example: Invalid credentials supplied
              detail:
                type: string
                example: You did not provide correct credentials.
              instance:
                $ref: '#/components/fields/instance'
    NotFoundError:
      description: Resource Not Found
      content:
        application/json:
          schema:
            properties:
              type:
                type: string
                example: 'https://developer.nexmo.com/api-errors#not-found'
              title:
                type: string
                example: Not Found
              detail:
                type: string
                example: ID 'ABC123' does not exist, or you do not have access
              instance:
                $ref: '#/components/fields/instance'
    InvalidRequestMethod:
      description: Invalid Request Method
      content:
        application/json:
          schema:
            properties:
              type:
                type: string
                example: 'https://developer.nexmo.com/api-errors#wrong-verb'
              title:
                type: string
                example: Request method not allowed
              detail:
                type: string
                example: Request method 'TRACE' not supported
              instance:
                $ref: '#/components/fields/instance'
    InvalidAcceptHeader:
      description: Invalid Accept Header
      content:
        application/json:
          schema:
            properties:
              type:
                type: string
                example: 'https://developer.nexmo.com/api-errors#accept-header'
              title:
                type: string
                example: Invalid Accept header
              detail:
                type: string
                example: "Invalid Accept header provided. Must be one of the following: 'application/json'"
              instance:
                $ref: '#/components/fields/instance'
    UnsupportedContentTypeHeader:
      description: Unsupported Content Type Header
      content:
        application/json:
          schema:
            properties:
              type:
                type: string
                example: 'https://developer.nexmo.com/api-errors#content-type-header'
              title:
                type: string
                example: Unsupported Content-Type header
              detail:
                type: string
                example: "Unsupported Content-Type header provided. Must be one of the following: 'application/json'"
              instance:
                $ref: '#/components/fields/instance'
