How a customer connects your app
- A workspace administrator opens Settings > Developer, chooses your app as the key’s purpose, and creates the key. Trellis gives the key exactly the access approved for your app.
- Trellis shows the key once. The administrator copies it and pastes it into your product, together with the workspace ID.
- Your product calls the Trellis API with that key.
apiKeys.create, sending kind: "integration" and partner set to your app’s slug. Without scopes, the key gets your app’s full approved set. A narrower scopes list is accepted; a scope beyond your app’s approved set is refused with 422. An app in a private pilot does not appear in Settings yet, so its keys are issued this way. partnerApps.list shows administrators each partner app, what it does, and the scopes and areas Trellis approved for it.
The workspace ID is the first segment of the workspace’s address in Trellis, https://app.trellistech.com/{workspaceId}/…. Ask the customer for it when they give you the key.
A partner key acts for no person. Changes it makes appear in Trellis as made by your app through the API, under the key’s name.
Authentication
Send the key as a Bearer token and put the workspace ID in the path:401 credentialRefused. A customer with several workspaces issues one key per workspace, and your product stores each key with its workspace ID.
A key that is unknown, revoked, expired, or no longer valid for your app also answers 401 credentialRefused.
What your app can reach
Two limits apply to every request, checked each time rather than only when the key is issued.- Scopes. A key holds at most the scopes Trellis approved for your app, such as
properties:readortasks:update. If Trellis narrows your app’s approved scopes, every key already issued to it narrows at once. - Areas. The API groups operations into areas, such as
properties.catalog,tasks.tasks, orreservations.stays. Your key reaches only the areas approved for your app, even when one of its scopes would otherwise cover a neighbouring area.
403 with code missingApiScope and a detail that names the missing area or scope. Do not retry it; ask Trellis to review your app’s access if you need more.
Partner apps are never approved for property access codes and entry instructions, house manuals, property custom fields, owners, smart devices, webhook management, or API key management.
Requests and responses
API conventions covers these in full. The short version:- Paging. Lists return
{ data, page: { nextCursor, hasMore } }. PassnextCursorascursorto get the next page.pageSizedefaults to 50, maximum 200. A cursor only works with the filters that produced it. - Idempotency. Every write needs an
Idempotency-Keyheader, 8 to 300 printable ASCII characters. Retry a failed or timed-out write with the same key and the same body. Trellis answers the first result again withIdempotent-Replayed: trueinstead of writing twice. - Concurrent edits. Writes that could overwrite someone else’s change need
If-Matchwith theETagfrom your latest read. A stale value answers412; read the record again and reapply your change. - Accepted work. A
202means the work was queued, not done. Follow theLocationheader to the Execution and poll it afterRetry-Afterseconds. A partner key can read the Executions it started. - Errors. Errors are RFC 9457 problem details (
application/problem+json) with a stablecodeand arequestId. Branch oncode, not ontitleordetail. Include therequestIdwhen you contact Trellis about a failed call.
Rate limits
Each key can make 100 reads and 20 writes per 10-second window. All keys in a workspace share a larger budget of 500 reads and 100 writes per window, so other integrations in the same workspace can also use it up. Responses carryRateLimit-Policy and RateLimit headers. When a budget is spent, Trellis answers 429 rateLimited with Retry-After in seconds and does nothing. Wait that long before retrying, and spread bulk syncs over time instead of sending bursts.
Webhooks
Partner keys cannot create or manage webhook endpoints. If your app needs events, the customer’s administrator registers your HTTPS URL withwebhooks.create and gives you the whsec_… signing secret, which Trellis shows only once.
Endpoints must be public https URLs without credentials in them. Every delivery follows the Standard Webhooks signing scheme:
webhook-ididentifies the delivery and stays the same on every retry. Delivery is at least once, so drop repeats by this ID.webhook-timestampis when the attempt was signed, in Unix seconds. Refuse requests whose timestamp is far from your clock.webhook-signatureholds one or more space-separatedv1,<signature>values. Each is the base64 HMAC-SHA256 of{webhook-id}.{webhook-timestamp}.{body}, keyed with the base64-decoded part of the secret afterwhsec_. For 24 hours after a secret rotation, two signatures are sent. Accept the request if one matches.
2xx status. Trellis retries failed deliveries for about three days (after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours, then twice after 24 hours) and disables an endpoint whose attempts have all failed for five days. A redirect counts as a failure, so register the final URL.
Security expectations
- Store each key as a secret in your server-side secret manager, encrypted at rest. Never put it in a browser, mobile app, or source repository.
- Never write keys or webhook secrets to logs, error reports, or support tickets. Trellis shows a key’s prefix in Settings > Developer, which is enough to identify it.
- Keep each customer’s key bound to its workspace ID, and never use one customer’s key for another customer’s data.
- To rotate a key, have the administrator issue a new one, switch your product to it, then revoke the old one in Settings > Developer. Revoking takes effect on the next request.
- If you suspect a key leaked, tell the customer so they can revoke it right away, and tell Trellis.