API Keys
API keys start with dolyu_sk_ and authenticate public API requests in the Authorization header. See API Overview and Authentication. Each merchant can have up to 5 keys, and only owners and admins can create and revoke them.
Create a key
Choose permissions and expiration
Enter a Name. Under 1 Permissions, choose None or Read for each row; at least one must be Read. Read all at the top right sets every row to Read. Under 2 Expiration, choose Never, 30 days, 90 days, or 1 year. To restrict where the key can be used from, click Add address under 3 Allowed source addresses and enter one IP address or CIDR per row. With no rows, any source is allowed. Click Create.
Copy the key
The Key created dialog appears. Click Copy, store the key in your system, then click I have copied it. The full key is shown only this once; after that, only the last four characters are shown.
Permissions
| Dashboard option | API permission | Endpoints available with Read |
|---|---|---|
| Services and staff | catalog:read | Services, staff, service and staff events |
| Appointments | appointments:read | Appointments, appointment events |
| Customers | customers:read | Customers, customer events |
| Payments and refunds | payments:read | Payments, refunds, payment and refund events |
When Customers is set to None, the customer in appointments has only id and object. For the permission each endpoint requires, see API Overview and Authentication.
Expiration
- When a key expires within 7 days, the dashboard shows the number of days left instead of the expiration date; expired keys are marked as expired.
- An expired key returns 401
invalid_api_keybut still counts toward the limit of 5 until you revoke it.
Source restriction
A key can accept requests only from the source addresses you list. Only owners and admins can set this.
Open Edit source restriction
Click ⋮ on a key row, then Edit source restriction.
Enter the allowed source addresses
In 1 Allowed source addresses, click Add address to add a row or the trash icon next to a row to remove it, then click 2 Save changes. The change applies from the next request.
- Entries can be IPv4 or IPv6 addresses or CIDR ranges, up to 10. Clearing the field removes the restriction from the key.
- Internal network addresses, reserved addresses, and ranges that contain them can't be used. A CIDR prefix length can't be 0.
- Requests from a source that isn't on the list return 403
ip_not_allowedand don't update Last used. - The Allowed IPs column in the key list shows Any or the number of entries, and the time of the most recent blocked request.
- When a request is blocked, owners and admins are notified, once per key every 24 hours.
Revoke a key
Click ⋮ on a key row, then Revoke. After you confirm, the key stops working immediately and requests return 401 invalid_api_key. You can still revoke keys after your subscription ends.
If a key appears in the URL, or in a header other than Authorization, Cookie, or Proxy-Authorization, of a GET request, it is revoked immediately and disappears from the list, and the request returns 401 api_key_exposed. Create a new key.