The daisyBill API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
This page will help you get started with the daisyBill API.
Authentication
To access the daisyBIll API, API Keys are used for authentication. All API requests must include the API Key in the authorization header. Additionally, you have the option to include the API Key in the query parameters of the request URL.
Obtaining an API Key
To obtain an API Key, please follow these steps:
- Log in to your daisyBIll account at https://www.daisybill.com.
- Navigate to your username found on the right side of the top nav bar and click
Edit User
. - Generate a new API Key by clicking the "Generate Token" button.
- Copy the generated API Key securely.
Including the API Key in API Requests
To authorize your API requests, you can include the API Key in either the authorization header or the query parameters.
Authorization Header
Include the API Key in the authorization header using the "Bearer" scheme.
Example using cURL:
curl --request GET \
--url 'https://go.daisybill.com/api/v1/billing_providers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {API_KEY}'
Replace {API_KEY}
with your actual API Key.
Query Parameters
Alternatively, you can include the API Key in the query parameters of the request URL.
Example using cURL:
curl --request GET \
--url 'https://go.daisybill.com/api/v1/billing_providers?api_token={API_KEY}' \
--header 'Content-Type: application/json'
Replace {API_KEY}
with your actual API Key.
Error Handling
If you receive an authentication error, please ensure the API Key is correctly included in the authorization header or the query parameters. Also, verify that the API Key is valid and has not expired.
Security Recommendations
To maintain the security of your API Key, follow these best practices:
- Keep your API Key confidential and do not share it with unauthorized individuals.
- Regularly rotate your API Keys to minimize the risk of unauthorized access.
- Use secure methods to store and transmit your API Keys, such as environment variables or secure credential storage systems.
Ruby Client
For Ruby developers, we offer a Ruby client library that simplifies making API requests and handling authentication. You can find the daisyBIll Ruby client on our GitHub repository: https://github.com/daisybill/daisybill_api. The client provides convenient methods for including the API Key in requests and handling everyday tasks.
See the daisybill_api gem docs for more information