openapi: 3.0.3
info:
  title: 'EasySms API Documentation'
  description: ''
  version: 1.0.0
servers:
  -
    url: 'https://www.easysms.co'
paths:
  /api/send-sms:
    post:
      summary: 'Send Sms'
      description: 'You can use this endpoint to send bulk SMS messages to your recipients. The receiver list can contain a maximum of 1000 recipients.'
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer {YOUR_AUTH_KEY}'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Messages sent.'
                  data: null
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Messages sent.'
                  data:
                    type: string
                    example: null
        401:
          description: 'Authorization Failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: Unauthenticated.
                  data: null
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthenticated.
                  data:
                    type: string
                    example: null
        422:
          description: 'Unprocessable Content'
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'The given data was invalid.'
                  data: null
                  errors:
                    receivers.0.phone:
                      - 'The receivers.0.phone format is invalid.'
                      - 'The receivers.0.phone must be at least 10 characters.'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  data:
                    type: string
                    example: null
                  errors:
                    type: object
                    example:
                      receivers.0.phone:
                        - 'The receivers.0.phone format is invalid.'
                        - 'The receivers.0.phone must be at least 10 characters.'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                receivers:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      phone:
                        type: string
                        description: 'The value format is invalid. Must be at least 7 characters.'
                        example: '358403536665'
                    required:
                      - phone
                text:
                  type: string
                  description: 'Must be at least 4 characters.'
                  example: 'Test Sms'
              required:
                - text
  /api/create-otp:
    post:
      summary: 'Create Otp'
      description: 'This endpoint lets you send a otp code.'
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer {YOUR_AUTH_KEY}'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'Otp sent.'
                  data: null
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'Otp sent.'
                  data:
                    type: string
                    example: null
        401:
          description: 'Authorization Failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: Unauthenticated.
                  data: null
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthenticated.
                  data:
                    type: string
                    example: null
        422:
          description: 'Unprocessable Content'
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'The given data was invalid.'
                  data: null
                  errors:
                    phone:
                      - 'The phone format is invalid.'
                      - 'The phone must be at least 10 characters.'
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  data:
                    type: string
                    example: null
                  errors:
                    type: object
                    example:
                      phone:
                        - 'The phone format is invalid.'
                        - 'The phone must be at least 10 characters.'
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone:
                  type: string
                  description: 'The value format is invalid. Must be at least 7 characters.'
                  example: '358403536665'
              required:
                - phone
  /api/validate-otp:
    post:
      summary: 'Validate Otp'
      description: 'This endpoint lets you validate code.'
      parameters:
        -
          in: header
          name: Authorization
          description: ''
          example: 'Bearer {YOUR_AUTH_KEY}'
          schema:
            type: string
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses:
        200:
          description: Success
          content:
            application/json:
              schema:
                type: object
                example:
                  status: true
                  message: 'OTP is valid'
                  data: null
                properties:
                  status:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: 'OTP is valid'
                  data:
                    type: string
                    example: null
        401:
          description: 'Authorization Failed'
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: Unauthenticated.
                  data: null
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: Unauthenticated.
                  data:
                    type: string
                    example: null
        422:
          description: 'Unprocessable Content'
          content:
            application/json:
              schema:
                type: object
                example:
                  status: false
                  message: 'OTP does not exist'
                  data: null
                properties:
                  status:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'OTP does not exist'
                  data:
                    type: string
                    example: null
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone:
                  type: string
                  description: 'The value format is invalid. Must be at least 7 characters.'
                  example: '358403536665'
                code:
                  type: number
                  description: 'Must be 6 digits.'
                  example: 123456.0
              required:
                - phone
                - code
  /api/fast-track/channels/sms/single:
    post:
      summary: ''
      description: ''
      parameters:
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                activity:
                  type: object
                  description: ''
                  example: []
                  properties:
                    id:
                      type: string
                      description: ''
                      example: nihil
                    brand_id:
                      type: string
                      description: ''
                      example: recusandae
                    user_id:
                      type: string
                      description: ''
                      example: voluptate
                    internal_user_id:
                      type: string
                      description: ''
                      example: fuga
                    activity_id:
                      type: string
                      description: ''
                      example: velit
                    action_group_id:
                      type: string
                      description: ''
                      example: non
                    trigger_hash:
                      type: string
                      description: ''
                      example: sint
                    action_id:
                      type: string
                      description: ''
                      example: ut
                content:
                  type: string
                  description: ''
                  example: perspiciatis
                recipient:
                  type: string
                  description: ''
                  example: sed
                sender_name:
                  type: string
                  description: ''
                  example: impedit
                provider_name:
                  type: string
                  description: ''
                  example: impedit
                encoding:
                  type: string
                  description: 'Must be one of <code>auto</code>, <code>gsm7</code>, or <code>usc2</code>.'
                  example: usc2
              required:
                - content
                - recipient
                - sender_name
                - provider_name
                - encoding
      security: []
  /api/fast-track/channels/sms/batch:
    post:
      summary: ''
      description: ''
      parameters:
        -
          in: header
          name: Content-Type
          description: ''
          example: application/json
          schema:
            type: string
        -
          in: header
          name: Accept
          description: ''
          example: application/json
          schema:
            type: string
      responses: {  }
      tags:
        - Endpoints
      security: []
tags:
  -
    name: Endpoints
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: ''
security:
  -
    default: []
