API Overview
You can call the enum API with plain HTTP and JSON, over gRPC, or through the Go and TypeScript clients.
Endpoint
Section titled “Endpoint”https://api.enum.coEvery method is a POST to /<service>/<method> with the request as a JSON body:
POST https://api.enum.co/enum.api.v1.DnsService/ListZonesThe API reference lists every service and method with its request and response fields.
First request
Section titled “First request”-
Create an API key for a service account in your current project:
Terminal window export ENUM_TOKEN="$(enumctl sa create api-quickstart --key api-quickstart --print-token-only)"See Authentication for key expiry and rotation.
-
Look up your project ID:
Terminal window enumctl projects list -
List the DNS zones in the project:
Terminal window curl -X POST https://api.enum.co/enum.api.v1.DnsService/ListZones \-H "Authorization: Bearer $ENUM_TOKEN" \-H "Content-Type: application/json" \-d '{"projectId": "proj-01kmyy3t719crcnrrvk1mgyjd0"}'Terminal window grpcurl \-H "Authorization: Bearer $ENUM_TOKEN" \-d '{"projectId": "proj-01kmyy3t719crcnrrvk1mgyjd0"}' \api.enum.co:443 enum.api.v1.DnsService/ListZones
Good to know
Section titled “Good to know”- Most methods take a
projectIdin the request body. The token must have access to that project. - Field names in JSON are camelCase (
projectId,deletionProtected).