Write to Apple Health from a server or agent
Syncky Health lets your server or agent send entries to Apple Health through your iPhone. Writes apply at the next sync for the types the owner allowed for writing in the app, with iOS Health permission. There is no prompt per write.
How does my server write to Apple Health?
Add your server in Syncky Health and enable Accept writes to Health. Add writable types to the app's device-wide write allowance in Choose Health data. The iPhone sends data directly to your endpoint; your server returns a commands message in its successful data response. Nothing passes through Syncky's servers on this route. Your server receives plaintext, so use HTTPS and protect the receiving system.
Commands arrive only in replies to data deliveries. If there is nothing new to send, there is no data request to answer and your command waits. Replies to connection tests or results cannot issue writes. Plain HTTP write replies require signing. The server contract defines formats, authentication, signatures, limits and results; n8n shows an automation setup.
How does my agent write through Relay?
Run and pair your own agent, add writable types to the app's device-wide write allowance in Choose Health data, then choose the agent's write scope. The agent sends a commands message with syncky_send or CLI send. The signed skill supplies the message formats. Send only entries the owner requested or covered by a standing instruction.
Client health-data envelopes are encrypted end to end between the iPhone and your agent. No public URL or inbound port is needed for the agent. Relay sees delivery metadata and no health values; its own hub notices are plaintext. It queues sealed envelopes until acknowledgment or expiry, at most 7 days. Your agent receives plaintext, and a chosen model sees what the agent supplies. See agent setup and permissions.
When is a queued write actually applied?
The iPhone applies writes when Syncky runs and the phone is unlocked. iOS decides background opportunities; opening Syncky and tapping Sync now makes a manual attempt.
For the agent, a send receipt can be pending or sent: sent means Relay accepted the envelope. A queued write is not an applied write. Read the phone's matching inbox acknowledgment for the command_id and version; only applied confirms application. A direct server receives a results request with applied or rejected for each command version. Keep transport receipts separate from these phone results.
Which entries can be refused, and why?
Only quantity and category types marked writable in the type catalog are supported. Read access does not imply write access. The app's device-wide write allowance and iOS Health permission apply alongside the agent's write scope or the server's Accept writes to Health toggle.
| Result reason | Meaning |
|---|---|
type_not_allowed |
The type is unknown, unsupported for writing, outside the app's device-wide write allowance or disallowed by the server configuration. |
type_not_in_scope |
An agent requested a write outside its write scope. |
healthkit_denied |
iOS Health write permission has not been granted or was denied. |
value_out_of_range |
The value is outside the supported type's bounds. |
invalid |
The command fails validation, such as its unit, category value or time interval. |
A malformed or unusable server reply can instead be ignored before command processing; the server contract lists those cases. For agent results and retry rules, read the agent reference. Correct validation errors before retrying; a refused write does not grant access.
How is the source recorded, and can I remove an entry?
Syncky writes HealthKit metadata containing a sync identifier and version. The identifier includes the requesting agent's hub/member ids or the server's destination id, plus the command id. This records the requesting source; the HealthKit writing app is Syncky Health. It does not set the HealthKit source name to your AI's name.
You can remove written entries on the iPhone. An agent or server can also send op: delete for its command with a higher version. See the delete format and agent guide. These controls concern entries Syncky wrote for that source.
Other ways?
Build your own iPhone app using HealthKit and the owner's iOS permissions, or use Shortcuts' Log Health Sample action for a supported type. Both still run on the device. For export and read access, see Apple Health API options; for named MCP projects, see the comparison.