Invoice Ninja Authentication API

The Authentication API from Invoice Ninja — 2 operation(s) for authentication.

OpenAPI Specification

invoice-ninja-authentication-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Invoice Ninja v5 Activities Authentication API
  description: 'REST API for the Invoice Ninja v5 invoicing and billing platform.

    Endpoints cover authentication, companies, gateways, charts, activities,

    bank integrations, bank transactions, bank transaction rules, and client

    gateway tokens. The full v5 API additionally exposes CRUD endpoints for

    clients, invoices, quotes, payments, products, recurring invoices,

    credits, expenses, projects, tasks, and company settings.

    Authentication is via an `X-Api-Token` header (with an optional

    `X-Api-Secret` header for self-hosted installs).

    '
  version: '5.0'
  contact:
    name: Invoice Ninja
    url: https://api-docs.invoicing.co
servers:
- url: https://invoicing.co
  description: Invoice Ninja hosted SaaS
security:
- apiToken: []
tags:
- name: Authentication
paths:
  /api/v1/login:
    post:
      tags:
      - Authentication
      summary: Login
      operationId: login
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - email
              - password
              properties:
                email:
                  type: string
                  format: email
                password:
                  type: string
      responses:
        '200':
          description: Authenticated user with tokens
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
  /api/v1/refresh:
    post:
      tags:
      - Authentication
      summary: Refresh data
      description: Refresh data by timestamp.
      operationId: refresh
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                updated_at:
                  type: integer
      responses:
        '200':
          description: Refreshed payload
components:
  responses:
    Unauthorized:
      description: Missing or invalid API token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties: true
  securitySchemes:
    apiToken:
      type: apiKey
      in: header
      name: X-Api-Token
      description: 'API token created in the Invoice Ninja settings. Self-hosted installs

        may additionally require an `X-Api-Secret` header.

        '