FreeAgent Contacts API

The Contacts API from FreeAgent — 2 operation(s) for contacts.

OpenAPI Specification

freeagent-contacts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: FreeAgent BankAccounts Contacts API
  description: 'FreeAgent is UK-focused cloud accounting software. The API is RESTful and

    exposes contacts, invoices, bank accounts, projects, expenses, bills,

    timeslips, tax timeline, and more. OAuth 2.0 (authorization code) is

    required for access. JSON and XML responses are supported.


    Sandbox base URL: https://api.sandbox.freeagent.com

    '
  version: '2'
  contact:
    name: FreeAgent API Support
    url: https://dev.freeagent.com/
servers:
- url: https://api.freeagent.com/v2
  description: Production
- url: https://api.sandbox.freeagent.com/v2
  description: Sandbox
security:
- oauth2: []
tags:
- name: Contacts
paths:
  /contacts:
    get:
      summary: List contacts
      operationId: listContacts
      tags:
      - Contacts
      parameters:
      - name: view
        in: query
        schema:
          type: string
          enum:
          - active
          - all
          - clients
          - suppliers
      - name: sort
        in: query
        schema:
          type: string
          enum:
          - name
          - created_at
          - updated_at
          - -name
          - -created_at
          - -updated_at
      - name: updated_since
        in: query
        schema:
          type: string
          format: date-time
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/per_page'
      responses:
        '200':
          description: Contacts list.
    post:
      summary: Create contact
      operationId: createContact
      tags:
      - Contacts
      responses:
        '201':
          description: Contact created.
  /contacts/{id}:
    parameters:
    - $ref: '#/components/parameters/id'
    get:
      summary: Get contact
      operationId: getContact
      tags:
      - Contacts
      responses:
        '200':
          description: Contact.
    put:
      summary: Update contact
      operationId: updateContact
      tags:
      - Contacts
      responses:
        '200':
          description: Updated.
    delete:
      summary: Delete contact
      operationId: deleteContact
      tags:
      - Contacts
      responses:
        '204':
          description: Deleted.
components:
  parameters:
    id:
      name: id
      in: path
      required: true
      schema:
        type: string
    per_page:
      name: per_page
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
    page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
  securitySchemes:
    oauth2:
      type: oauth2
      description: 'OAuth 2.0 authorization code flow. Access tokens valid for ~1 hour;

        refresh tokens used to obtain new access tokens.

        '
      flows:
        authorizationCode:
          authorizationUrl: https://api.freeagent.com/v2/approve_app
          tokenUrl: https://api.freeagent.com/v2/token_endpoint
          refreshUrl: https://api.freeagent.com/v2/token_endpoint
          scopes: {}