Entri Monitor API
General API Guidelines
Base URL
Authentication
All requests require the following headers:-
applicationId: Your unique application ID. -
Authorization: A bearer token (JWT) generated using your client secret. See Token creation (JWT).
Monitor endpoints are protected by a custom Lambda authorizer that validates the
applicationId + Authorization pair on every request. Authorizer results are not cached. Each request is re-authorized, so always send a valid, unexpired token.Token scope
When you mint the JWT you can add aproduct, domain and dnsRecords claim, as described in Enhancing Integration Security. Monitor enforces these claims as follows. Every rejection described here happens before anything is read or changed, so after a 403 the monitored domain and its records are exactly as they were.
The product claim
The endpoints that act on many domains at once require a JWT issued with product: "monitor". A token without a product claim is rejected with a 403 and the message The token must be issued with product 'monitor' to use this endpoint. See https://developers.entri.com/connect/configuration#enhancing-integration-security. This also applies to applications that have authentication disabled.
A JWT issued for another product (
connect, sell, power or secure) is rejected on every Monitor endpoint with a 403 and the message JWT is not valid for this resource. The single-domain endpoints keep accepting a token that has no product claim.
The domain claim
When the JWT carries a domain claim, the single-domain endpoints only accept requests for that domain. The comparison is not case-sensitive. A request for any other domain is rejected with a 403 and the message The token is not authorized for the requested domain. This applies to Retrieve domain details, Add a domain, Update a domain, Delete a domain, and the four /monitor/domains/:domain_name/records endpoints. It also applies to every item of a batch create or batch delete request made with a token that combines product: "monitor" and a domain claim: if any item names another domain, the whole batch is rejected with a 403 and nothing is queued.
The dnsRecords claim
When the JWT carries a dnsRecords claim, the records in the request are checked against the records in the token. A mismatch is rejected with a 403 and the message The DNS records do not match the authorized records. The rule depends on the endpoint:
A record’s
ttl is only compared when the record in the token includes one. If the token’s record has no ttl, the request can send any value.
DNS record format
Wherever an endpoint accepts adnsRecords array, each record has the following shape:
The
/monitor/domains/:domain_name/records endpoints validate these fields strictly: an unsupported record type, an empty host or value, a ttl of 0 or less, or an empty dnsRecords array is rejected with a 400 response.
Quickstart
Step 1: Add domains for monitoring
You’ll first need to tell Entri Monitor which domain you’d like to monitor. Send aPOST request to /monitor/domains with the name of the domain, as well as a list of the records you want to monitor, including their type, host, value, and ttl properties.
Example request body:
201 response like this if you’re successful:
Step 2: Specify a webhook URL
Log into the Entri Dashboard and navigate to the App Settings page. Enter the URL of the webhook that you’ll use to receive notifications about the DNS changes you specified.Step 3: Set up your service to receive the webhook requests at the URL you specified
Your webhook URL will be sent requests if the DNS records you specified are modified or deleted. Example request:Retrieve DNS records
Query parameters
subdomain(string, optional): Target the records monitored for a specific subdomain ofdomain_name. Omit it to target the records monitored on the apex domain.
Successful response (200 status)
Returns the monitored records as a JSON array:JSON
404 response if the domain is not monitored or your application is not authorized to access it.
Create DNS records
Adds the given records to the set already being monitored for the domain. Existing monitored records are kept.Query parameters
subdomain(string, optional): Target a specific subdomain ofdomain_name. Omit it to target the apex domain.
Request body
JSON
Successful response (200 status)
JSON
Update DNS records
Replaces the full set of monitored records for the domain (or subdomain) with the records in the request. Any previously monitored record not included in the request stops being monitored.Query parameters
subdomain(string, optional): Target a specific subdomain ofdomain_name. Omit it to target the apex domain.
Request body
JSON
Successful response (201 status)
JSON
Delete DNS records
Removes the given records from the monitored set. Monitored records that don’t match a record in the request are kept.Query parameters
subdomain(string, optional): Target a specific subdomain ofdomain_name. Omit it to target the apex domain.
Request body
JSON
Successful response (200 status)
JSON
The domain object
The endpoints that return monitored domains use the following shape:List domains
This endpoint requires a JWT issued with
product: "monitor", including when you pass ?domain= to look up a single domain. See Token scope.Query parameters
domain(string): Return a single monitored domain by name instead of a paginated list.offset(integer): Pagination offset. Defaults to0.limit(integer): Number of domains per page. Defaults to10.from_date(date): Filter start date. Must be sent together withto_date.to_date(date): Filter end date. Must be sent together withfrom_date.
Successful response (200 status)
JSON
page echoes the offset you sent and totalItems is the number of domains returned in this response. See The domain object for the fields of each entry.
Retrieve domain details
Query parameters
subdomain(string, optional): Target the monitored domain for a specific subdomain ofdomain_name. Omit it to target the monitored domain on the apex domain (the entry with no subdomain). It does not return “all subdomains” ofdomain_name. To look up a specific subdomain, pass its exact value (for example,shop).
Successful response (200 status)
Returns a single domain object:JSON
404 response if the domain is not monitored or your application is not authorized to access it.
Add a domain
Request body
JSON
Request parameters
If the domain is already being monitored, this request updates it with the DNS records provided.
Successful response (201 status)
JSON
Update a domain
Replaces the monitored records of an existing domain.Request body
JSON
Request parameters
Returns a
404 response if the domain is not being monitored.
Successful response (200 status)
JSON
Delete a domain
Request body
JSON
Request parameters
All parameters must be sent in the request body. Query parameters are not supported on this endpoint.
Successful response (200 status)
JSON
400 response with an explanatory message if the domain is not being monitored, is already deleted, or deleteOnlyIfEmpty is true and monitored records still exist.
Batch create domains
Each batch request is limited to a maximum of 100 domains. Submit multiple batches if you need to register more than 100 at once.
This endpoint requires a JWT issued with
product: "monitor". See Token scope.Request body
JSON
domains accepts the same fields as Add a domain.
Successful response (201 status)
The batch is processed asynchronously. Use the returnedrequest_id with the Batch status endpoint to track its progress.
JSON
Batch delete domains
Deletes multiple monitored domains in a single request. The batch is processed asynchronously: the endpoint validates and queues the request, then returns arequest_id that you can use to track progress through the Batch status endpoint.
Each batch request is limited to a maximum of 1000 domains. Submit multiple batches if you need to delete more than 1000 at once.
This endpoint requires a JWT issued with
product: "monitor". See Token scope.Request body
JSON
Request parameters
Each item in thedomains array accepts the same options as Delete a domain:
Each item is matched against your monitored domains by its
domain and subdomain pair. Items that cannot be matched, or that fail validation, fail individually without affecting the rest of the batch; they are reported through the Batch status endpoint.
Successful response (201 status)
JSON
request_id to check the result.
Error responses
Batch status
Returns the status of a batch create or batch delete request, using therequest_id returned when the batch was submitted.
Batch status records are retained for 7 days (TTL) after the batch is submitted. After that window, status lookups for old batches will return a not-found response.
This endpoint requires a JWT issued with
product: "monitor". See Token scope.Successful response (200 status)
JSON
failedDomains object listing them:
JSON
Response fields
Returns a
404 response if there is no status for the given request ID (including expired records), and a 403 response if the request belongs to a different application or the JWT was not issued with product: "monitor".
Monitor service status
Returns the current health of the Entri Monitor service itself, based on its most recent internal health check.Successful response (200 status)
JSON
status is either "healthy" or "unhealthy", and executedAt is the timestamp of the last health check run.
Webhooks
To receive webhook notifications about the target domains, log into the Entri Dashboard and navigate to the App Settings page. Enter the URL of the webhook that you’ll use to receive notifications about the DNS changes you specified. Your webhook URL will be sent requests if the DNS records you specified are modified or deleted.Top-Level fields
id: A unique identifier for the webhook event (e.g."e98d267b-84b8-4229-a94a-1933ed7f91ea").user_id: The ID of the user who initiated the domain-related action (e.g."your-provided-user-id").domain: The domain involved in the event (e.g."example.com").subdomain: The subdomain associated with the event, if any (e.g."shop").type: Defines the type of event. Possible values:"domain.record_missing": Used whenever there is a record missing from the records that are being monitored."domain.record_restored": Confirms that ALL records have been restored.
data.records_propagated: Contains all the records that are being monitored and were found correctly configured on the domain.data.records_non_propagated: Contains all the records that are being monitored and were found as missing on the domain.connect_link: Entri Connect’s sharing link with the configuration required to re-establish the missing records on the domain.

