Skip to main content
POST
/
connections
Create a new connection
curl --request POST \
  --url https://qubesync.com/api/v1/connections \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "redirect_url": "https://myapp.com/quickbooks-setup-callback"
}'
{
  "data": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "app_id": "550e8400-e29b-41d4-a716-446655440000",
    "username": "550e8400-e29b-41d4-a716-446655440001",
    "name": "My Customer Inc.",
    "last_connected_at": null,
    "company_file": null,
    "type": "standard",
    "qbxml_version": null,
    "quickbooks_product_name": null,
    "redirect_url": "https://myapp.com/quickbooks-setup-callback",
    "links": {
      "self": "/api/v1/connections/123e4567-e89b-12d3-a456-426614174000",
      "ui": "/app/connections/123e4567-e89b-12d3-a456-426614174000",
      "onboarding": "https://qubesync.com/onboarding/abcdef123456"
    },
    "inserted_at": "2023-01-01T12:00:00Z",
    "updated_at": "2023-01-01T12:00:00Z"
  }
}

Authorizations

Authorization
string
header
required

Use your app's API_KEY as the username, and leave the password blank

Body

application/json
name
string

Optional name for the connection - if you leave this blank, the company name returned by QuickBooks will be used once the first request is processed

redirect_url
string<uri>

The URL to redirect the user to after they complete (or cancel) the QuickBooks setup process. This URL should be able to handle the query parameters:

  • ?state=connected if they completed the process,
  • ?state=cancelled if they cancelled it or
  • ?state=expired if they visit the onboarding link after it has expired
Example:

"https://myapp.com/quickbooks-setup-callback"

Response

Connection created successfully

data
object