Error codes
REST operations and MCP tool errors share stable error codes. Branch on the code, follow the hint, and retry only when retryable is true. Authentication and protocol errors have their own transport behavior.
The DailyGoal API is not available on the Free plan. It works with a paid plan or during a free trial. See plans.
Error envelope
REST responses carry the envelope as the JSON body with the status below. MCP domain failures return HTTP 200 with the envelope as structuredContent and isError: true. docsUrl links to the code's section on this page, and details never contains credentials.
{
"error": {
"code": "validation_failed",
"message": "The request input is not valid.",
"hint": "Fix the fields named in details, then send the request again.",
"retryable": false,
"details": {
"fields": [
{
"path": "date",
"message": "Expected a string matching the pattern ^\\d{4}-\\d{2}-\\d{2}$, got \"14/09/2026\""
}
]
},
"docsUrl": "https://www.dailygoal.fit/developers/errors#validation_failed"
}
}MCP credential failures return HTTP 401 or 403 with the envelope and WWW-Authenticate so the client can authorize. Subscription lapse is a tool error, subscription_required, and does not ask the client to reconnect. Malformed JSON-RPC, unsupported methods and invalid tool names return a JSON-RPC error object instead of this envelope.
The statuses below describe REST responses. For an MCP rate_limited tool error, use the wait in its message; the tool result does not carry a Retry-After header. For unauthorized, check the API token or reconnect the OAuth app if its credential expired or was revoked.
OAuth authorization, registration and token routes use OAuth's error and error_description fields. For example, an invalid client document returns invalid_client (400), a refused refresh returns invalid_grant (400), and paused access returns subscription_required (403). These are separate from the REST and MCP operation envelope below.
Codes
insufficient_scope
HTTP 403 · Not retryable
This credential cannot perform this operation.
origin_not_allowed
HTTP 403 · Not retryable
The DailyGoal API does not accept browser requests from this origin. Call it from a server, script or AI agent instead.
misdirected_request
HTTP 421 · Not retryable
Send API requests to https://api.dailygoal.fit/v1.
subscription_required
HTTP 403 · Not retryable
API access needs a DailyGoal subscription or free trial. Resubscribe at the URL in details; your token starts working again straight away.
rate_limited
HTTP 429 · Retryable
Wait for the number of seconds in the Retry-After header, then retry.
validation_failed
HTTP 400 · Not retryable
Fix the fields named in details, then send the request again.
not_found
HTTP 404 · Not retryable
Check the id. Ids that belong to another user are also reported as not found.
conflict
HTTP 409 · Not retryable
Read the current state, then retry with updated input.
idempotency_conflict
HTTP 409 · Not retryable
Use a new Idempotency-Key for a request with a different body.
limit_exceeded
HTTP 409 · Not retryable
Remove an existing item before adding another.
calculated_goal_readonly
HTTP 409 · Not retryable
This goal is calculated from logged data. Log the underlying food, steps or workout instead.
internal_error
HTTP 500 · Retryable
Retry after a short wait. If it keeps failing, contact DailyGoal support.