Reference

Elderella Partner API reference

Every endpoint, request and response in the Partner API, generated from our OpenAPI contract, so the page cannot drift from the contract. Start with the quickstart for the end-to-end flow, authentication for tokens and scopes, and connections for consent and webhooks. The raw contract is at /partner-api.yaml.

Base URL https://api.elderella.com. Every operation, parameter and schema below is generated from the OpenAPI contract at /partner-api.yaml.

OAuth

Partner authentication (client-credentials grant)

POST /oauth/token

Exchange client credentials for a partner bearer token. OAuth2 client-credentials grant (RFC 6749 §4.4). Returns a short-lived, scoped partner bearer. Every credential failure — unknown client_id, bad secret, revoked credential, suspended partner — returns the identical invalid_client error (no client_id enumeration oracle, in body and, via a dummy-hash compare, timing). Rate limited per IP.

Request body (required)

Content type: application/x-www-form-urlencoded, application/json.

FieldTypeDescription
grant_type requiredclient_credentials
client_id requiredstring
client_secret requiredstring
scopestringSpace-separated subset of the partner's allowed scopes. Omit to be granted all Ring 1 scopes.

Responses

StatusMeaning
200A partner bearer token.
400invalid_request (missing fields), unsupported_grant_type, invalid_client (any credential failure), or invalid_scope.
429The caller exceeded this endpoint's rate limit.

Connections

Request, poll, and sever a partner↔elder connection

POST /v1/connections

Request a connection to an elder. Create a pending connection keyed on (partner, address). Always returns 202 { id, status: "pending" } for any valid-shape address — resolved or not. A repeat request for the same address returns the same con_… id. A malformed address is a 400 (leaks nothing about existence).

Request body (required)

Content type: application/json.

FieldTypeDescription
elder requiredstringThe elder's Elderella address, e.g. happy.sun.meadow@care.elderella.com.

Responses

StatusMeaning
202The pending connection.
400The request was malformed (bad/missing field, bad address shape).
401Missing, malformed, invalid, or revoked partner bearer.
403A valid token that lacks the scope this route requires.
429The caller exceeded this endpoint's rate limit.

GET /v1/connections/{id}

Poll a connection's status. Returns the connection's external status. An unknown id and one owned by another partner return an identical 404 (no cross-partner oracle).

Parameters

NameInRequiredDescription
idpathyesOpaque connection id, con_….

Responses

StatusMeaning
200The connection.
401Missing, malformed, invalid, or revoked partner bearer.
403A valid token that lacks the scope this route requires.
404The id does not name a resource this partner can see (identical whether unknown or owned by another partner).
429The caller exceeded this endpoint's rate limit.

DELETE /v1/connections/{id}

Sever a connection (partner-initiated). Revoke the connection → revoked. Idempotent: revoking an already- terminal connection still reports revoked.

Parameters

NameInRequiredDescription
idpathyesOpaque connection id, con_….

Responses

StatusMeaning
200The revoked connection.
401Missing, malformed, invalid, or revoked partner bearer.
403A valid token that lacks the scope this route requires.
404The id does not name a resource this partner can see (identical whether unknown or owned by another partner).
429The caller exceeded this endpoint's rate limit.

Files

Send a file for a consented elder and poll its coarse status

POST /v1/files

Send a file for a consented elder. Multipart upload of any material about an elder (document, photo, audio, or text). Validates type (415) and size (413, 25 MB) before storing, then accepts it for asynchronous extraction and returns 202 { id, status: "received" }. An Idempotency-Key retry with the same bytes returns the same receipt; the same key with different bytes is a 409. An unresolvable address, an unconsented elder, and a revoked connection ALL return the identical 403 no_active_connection.

Parameters

NameInRequiredDescription
Idempotency-KeyheadernoOpaque client key; a 24h store dedupes retries.

Request body (required)

Content type: multipart/form-data.

FieldTypeDescription
file requiredstring (binary)The file bytes (≤ 25 MB; see the accepted MIME set in §5).
elder requiredstringThe elder's Elderella address.
purposestringFree-form hint; accepted as any string, never validated.

Responses

StatusMeaning
202The file receipt.
400The request was malformed (bad/missing field, bad address shape).
401Missing, malformed, invalid, or revoked partner bearer.
403insufficient_scope (token lacks files:write) or no_active_connection (the single no-oracle send error).
409The Idempotency-Key was reused with a different payload.
413The file exceeds the 25 MB limit.
415The file's MIME type is not in the v1 accepted set.
429The caller exceeded this endpoint's rate limit.

GET /v1/files/{id}

Poll a file's coarse status. Returns the coarse status of the partner's own submission. An unknown or not-owned id returns an identical 404.

Parameters

NameInRequiredDescription
idpathyesOpaque file id, file_….

Responses

StatusMeaning
200The file.
401Missing, malformed, invalid, or revoked partner bearer.
403A valid token that lacks the scope this route requires.
404The id does not name a resource this partner can see (identical whether unknown or owned by another partner).
429The caller exceeded this endpoint's rate limit.

Schemas

The request and response shapes referenced above.

TokenRequest

FieldTypeDescription
grant_type requiredclient_credentials
client_id requiredstring
client_secret requiredstring
scopestringSpace-separated subset of the partner's allowed scopes. Omit to be granted all Ring 1 scopes.

TokenResponse

FieldTypeDescription
access_token requiredstring
token_type requiredBearer
expires_in requiredintegerToken lifetime in seconds.
scope requiredstringSpace-separated granted scopes.

OAuthError

RFC 6749 §5.2 error shape (distinct from the /v1 error envelope).

FieldTypeDescription
error requiredinvalid_request · unsupported_grant_type · invalid_client · invalid_scope
error_descriptionstring

ConnectionCreateRequest

FieldTypeDescription
elder requiredstringThe elder's Elderella address, e.g. happy.sun.meadow@care.elderella.com.

ConnectionResource

FieldTypeDescription
id requiredstringOpaque connection id, con_….
status requiredpending · approved · expired · revokedExternal connection status. declined is never surfaced — a decline reads as pending.

FileSendRequest

FieldTypeDescription
file requiredstring (binary)The file bytes (≤ 25 MB; see the accepted MIME set in §5).
elder requiredstringThe elder's Elderella address.
purposestringFree-form hint; accepted as any string, never validated.

FileResource

FieldTypeDescription
id requiredstringOpaque file id, file_….
status requiredreceived · processed · failedCoarse status of this submission.

Error

The standard /v1 error envelope (design §5).

FieldTypeDescription
error requiredobject

Where error is:

FieldTypeDescription
type requiredstringCoarse grouping, e.g. invalid_request_error, authentication_error, rate_limit_error.
code requiredstringStable machine-readable code (versioned contract) — e.g. unauthorized, not_found, insufficient_scope, no_active_connection, unsupported_media_type, file_too_large, idempotency_key_reuse, rate_limited.
message requiredstringHuman-readable text; may change without a version bump.
paramstringThe offending field, when applicable.

WebhookEvent

The signed JSON body POSTed to a partner's registered webhook endpoint (design §8, §11). Delivered with an Elderella-Signature: t=<unix_ts>,v1=<hmac> header — HMAC-SHA256 over "{t}.{raw_body}" with the partner's signing secret. Only two event types are ever emitted; there is deliberately no connection.declined and no connection.expired event.

FieldTypeDescription
id requiredstringOpaque event id, evt_… — the partner's idempotency key.
type requiredconnection.approved · connection.revoked
created requiredintegerEvent creation time, unix seconds.
data requiredWebhookConnectionData

WebhookConnectionData

FieldTypeDescription
connection_id requiredstringOpaque connection id, con_….
status requiredpending · approved · expired · revokedExternal connection status at the time of the event.

Webhooks

Outbound events POSTed to your registered endpoint. Only the events below are ever sent; see the WebhookEvent schema for the signature scheme, and poll GET /v1/connections/{id} as the fallback of record.

EventMeaning
connection.approvedA primary caregiver approved the partner's connection to an elder.
connection.revokedAn approved connection was severed — by the caregiver or by the partner's own DELETE /v1/connections/{id}.
Loading the API reference… If it doesn't appear, the raw contract is at /partner-api.yaml.