Check an account's key now
Check an account's key now: CustomDomain™ API reference in the provider accounts group. Covers request parameters, the request body, responses and error codes.
Reads the account's key against its provider right now: the same one cheap call as the daily check (the provider's domain list where it gives one, else a read of one domain the account covers), and its verdict is recorded the same way. Nothing is written at the provider. The answer is the account, with its health, and result: ok (the provider accepted the key), refused (the provider refused it: the account is now needs_reconnect, with a timeline event for each domain it covers and an inbox item, once), or unreachable (the provider could not be asked or answered with an error that is not a refusal; message says what, and the failure counts toward the backoff and toward needs_you check_failed).
A pasted key the provider had refused that works again returns to active, recorded in the audit log as provider_account.updated (status before and after, via check_now). A key a secure sign-in made keeps its status: it is renewed by signing in again.
Every check that asked the provider is recorded in the audit log as provider_account.checked: who asked (actorId), the account (target), the provider and the result (ok, refused or unreachable), never the key and never the provider's own words. It is written whatever happens to the verdict afterwards, so a check whose verdict was dropped (409 because the account changed while the provider answered) is on record too. A call that never asked the provider (a 403, a 429, a 409 because the account is a one time key, holds no key or has nothing to read the key against, or a request that ended before the provider was asked, which answers 503, gives its minute back and spends nothing from the hourly budget of reach checks) writes nothing.
Takes the workspace's API key and an admin, an owner or the member who connected the account (403 otherwise). A key an end user's own sign-in made is never used for it (403), and a one time key is used once and never checked (409). An account whose provider cannot list its domains and which covers none answers 409 nothing_to_check. One check a minute for an account: a second answers 429 rate_limited with Retry-After: 60. Each check is also one read of the workspace's hourly budget of reach checks: once it is spent the call answers 429 reach_quota with Retry-After, asks the provider nothing, records nothing and keeps no minute, so the same account can be checked as soon as the hour turns. The daily check is outside that budget.
Authorization
apiKey Long-lived tenant API key, cd_live_… (production) or cd_test_… (staging, development), stored hashed. Keys created before the switch to cd_ start with sk_live_… / sk_test_… and are still accepted. Scoped to the owning application's tenant.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/provider-accounts/string:check"{ "account": { "needs_you": { "reason": "refused", "until": "2019-08-24T14:15:22Z" }, "health": { "state": "ok", "checked_at": "2019-08-24T14:15:22Z", "failures": 0 }, "made_by": { "how": "pasted", "by": "string" }, "enforced_by": "provider", "more_domains": [ "string" ], "id": "string", "kind": "api_key", "provider": "string", "provider_name": "string", "label": "string", "access": "continuous", "scope": "all", "domains": [ "string" ], "credential_held": true, "status": "active", "last_error": "string", "created_by": "string", "last_used_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "connections": [ { "id": "string", "application_id": "string", "domain": "string", "status": "string" } ], "uses": [ "string" ], "can_manage": true, "application_id": "string", "application_ids": [ "string" ], "origin": "browser_agent", "agent_key": { "name": "string", "scopes": [ "string" ], "account": "string", "session_id": "string", "verified_at": "2019-08-24T14:15:22Z", "expires_at": "2019-08-24T14:15:22Z", "notice": "d30", "reconnect_reason": "expiring", "reconnect_sent_at": "2019-08-24T14:15:22Z", "renewed_at": "2019-08-24T14:15:22Z", "old_key": "revoke_by_hand", "revoke_url": "http://example.com", "rights": [ "transfer" ] }, "owner_kind": "workspace", "end_user_ref": "string", "account_ref": "string" }, "result": "ok", "message": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}{ "code": "string", "title": "string", "details": "string"}