Point API documentation
Introduction
Point provides an API that gives access to point zone, records, http and email redirects management. The API is built using RESTful principles.
XML and JSON are supported as responses to API calls.
Version
The current version is 1.0.
Libraries
Ruby gem https://github.com/PointDNS/point
Python package https://github.com/PointDNS/python-pointdns
Go library https://github.com/PointDNS/go-pointdns
Node.js package https://github.com/PointDNS/nodejs-pointdns
PHP library https://github.com/PointDNS/php-pointdns
Authentication
Authentication is currently done with HTTP Basic Authentication. To access your Point account, you'll need to define your username & password. The username is your email address and the password is the API token which, can be found in My Account tab.
username = "user@example.com"
password = "f9eca287-5346-1cc7-8529-68eb9db7cd5e"
Response Codes
We return the following response codes:
Response Code | Description |
---|---|
200 Success
|
Everything went fine. |
201 Created
|
Everything went fine. |
202 Accepted
|
Everything went fine. |
403 Forbidden
|
You tried to access something you did not have permissions to. |
422 Unprocessable Entity
|
You tried to create or update an object with invalid data. |
404 Not Found
|
You tried to access an object that does not exist in your account. |
500 Internal Server Error
|
Oops. Something went wrong on our end. Don't worry, we're on the case! |
Resources
Currently Point API provides access to Zone, Records, Redirects and Mail Redirects resources:
Zone
URI: https://api.pointhq.com/zones
Zones Resource allows you to create, update, delete your zones. It also provides possibility to retrieve single zone or full Zones list.
Property | Type | Description |
---|---|---|
id | integer | The ID of the zone. |
name | string | The domain name. |
ttl | integer | Zone TTL (defaults to 3600). |
group | string | The group this zone belongs to. |
user-id | integer | The ID of the user who created it (this will be you). |
ZoneRecord
URI: https://api.pointhq.com/zones/ZONE_ID_OR_NAME/records?record_type=RECORD_TYPE&name=RECORD_NAME
ZoneRecord enables you to manage records in your zones by creating, updating and deleting them. You also can list all your records in particular zone, also you can filter them by RECORD_TYPE (e.g. CNAME, A) or NAME (e.g. www will return all records for www.example.com).
Property | Type | Description |
---|---|---|
id | integer | The record ID. |
name | string | The FQDN for the record. |
data | string | The data field. |
ttl | integer | (not used). |
record_type | string | The record type. |
aux | string | The AUX data for the domain (used on MX records). |
zone_id | integer | The ID of the zone. |
ZoneRedirect
URI: https://api.pointhq.com/zones/ZONE_ID_OR_NAME/redirects
ZoneRedirects enables you to manage redirects in your zones by creating, updating and deleting them. You also can list all your redirects in particular zone.
Property | Type | Description |
---|---|---|
id | integer | The record ID. |
name | string | The FQDN for the record. |
data | string | The data field. |
redirect_type | integer | The type of redirects 301, 302 or 0 for iframes. |
iframe_title | string | Title of iframe (optional). |
redirect_query_string | boolean | Information about including query string when redirecting. |
zone_id | integer | The ID of the zone. |
ZoneMailRedirects
URI: https://api.pointhq.com/zones/ZONE_ID_OR_NAME/mail_redirects
ZoneMailRedirects enables you to manage mail redirects in your zones by creating, updating and deleting them. You also can list all your mail redirects in particular zone.
Property | Type | Description |
---|---|---|
id | integer | The record ID. |
source_address | string | The source address of mail redirect. |
destination_address | string | The destination address of mail redirect. |
zone_id | integer | The ID of the zone. |
Code Samples
Curl Command Line
Curl is the quickest way to try Point API. Full documentation on curl can be found here.
Zones Example
Create a zone called "example.com" in "Default Group" using template "Example Template"
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones -d '{"zone":{"name":"example.com","group":"Default Group", "template":"Example Template"}}'
Example Response:
{ "zone": { "id": 1, "name": "example.com", "group": "Default Group", "user-id": 3, "ttl": 3600 } }
Get Zones
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones
Example Response:
[{ "zone": { "id": 1, "name": "example.com", "group": "Default Group", "user-id": 3, "ttl": 3600 } }]
Get Zone
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1
Example Response:
{ "zone": { "id": 1, "name": "example.com", "group": "Default Group", "user-id": 3, "ttl": 3600 } }
Update a "example.com" zone and change its group to "Other Group" (PUT)
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/example.com -X PUT -d '{"zone":{"group":"Other Group"}}'
Example Response:
{ "zone": { "id": 1, "name": "example.com", "group": "Other Group", "user-id": 3, "ttl": 3600 } }
Delete zone
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1 -X DELETE
Example Response:
"zone": { "status": "OK" }
Records Examples
Create record for zone "example.com" called "site" with record type "A", data "1.2.3.4" and TTL 3600
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/example.com/records -d '{"zone_record":{"name":"site","record_type":"A","data":"1.2.3.4","ttl":3600}}'
Example Response:
{ "zone_record": { "name": "site.example.com.", "data": "1.2.3.4", "id": 141, "aux": null, "record_type": "A", "ttl": 3600, "zone_id": 1 } }
Get records for Zone
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/records
Example Response:
[{ "zone_record": { "name": "site.example.com.", "data": "1.2.3.4", "id": 141, "aux": null, "record_type": "A", "ttl": 3600, "zone_id": 1 } }]
Get records for Zone with filters
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" 'https://api.pointhq.com/zones/1/records/141?record_type=CNAME&name=www'
Example Response:
[{ "zone_record": { "name": "www.example.com.", "data": "newexample.com", "id": 142, "aux": null, "record_type": "CNAME", "ttl": 3600, "zone_id": 1 } }]
Get record using its ID
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/records/141
Example Response:
{ "zone_record": { "name": "site.example.com.", "data": "1.2.3.4", "id": 141, "aux": null, "record_type": "A", "ttl": 3600, "zone_id": 1 } }
Update record with data: "1.2.3.5" (PUT)
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/records/141 -X PUT -d '{"zone_record":{"data":"1.2.3.5"}}'
Example Response:
{ "zone_record": { "name": "site.example.com.", "data": "1.2.3.5", "id": 141, "aux": null, "record_type": "A", "ttl": 3600, "zone_id": 1 } }
Delete record (DELETE)
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/example.com/records/141 -X DELETE
Example Response:
{ "zone_record": { "status": "OK" } }
Redirects Examples
Create redirect for zone "example.com" call "site" redirecting to "http://example.com" (type 302)
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/example.com/redirects -d '{"zone_redirect":{"name":"site","redirect_to":"http://example.com","redirect_type":302}}'
Example Response:
{ "zone_redirect": { "name": "site.example.com.", "redirect_to": "http://example.com", "id": 3, "redirect_type": 302, "iframe_title": null, "redirect_query_string": false, "zone_id": 1 } }
Get redirects for Zone
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/redirects
Example Response:
[{ "zone_redirect": { "name": "site.example.com.", "redirect_to": "http://example.com", "id": 3, "redirect_type": 302, "iframe_title": null, "redirect_query_string": false, "zone_id": 1 } }]
Get redirect using its ID
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/redirects/3
Example Response:
{ "zone_redirect": { "name": "site.example.com.", "redirect_to": "http://example.com", "id": 3, "redirect_type": 302, "iframe_title": null, "redirect_query_string": false, "zone_id": 1 } }
Update redirect with redirect to: "http://example-site.com" (PUT)
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/example.com/redirects/3 -X PUT -d '{"zone_redirect":{"redirect_to":"http://example-site.com"}}'
Example Response:
{ "zone_redirect": { "name": "site.example.com.", "redirect_to": "http://example-site.com", "id": 3, "redirect_type": 302, "iframe_title": null, "redirect_query_string": false, "zone_id": 1 } }
Delete redirect (DELETE)
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/redirects/3 -X DELETE
Example Response:
{ "zone_redirect": { "status": "OK" } }
Mail Redirects Examples
Create mail redirect for zone "example.com" from "admin" to "user@example-site.com"
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/example.com/mail_redirects -d '{"zone_record":{"name":"site","record_type":"A","data":"1.2.3.4","ttl":3600}}'
Example Response:
{ "zone_mail_redirect": { "source_address": "admin", "destination_address": "user@example-site.com", "id": 5, "zone_id": 1 } }
Get mail redirects for Zone
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/mail_redirects
Example Response:
[{ "zone_mail_redirect": { "source_address": "admin", "destination_address": "user@example-site.com", "id": 5, "zone_id": 1 } }]
Get mail redirect using its ID
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/mail_redirects/5
Example Response:
{ "zone_mail_redirect": { "source_address": "admin", "destination_address": "user@example-site.com", "id": 5, "zone_id": 1 } }
Update mail redirect with destination address: "admin@example-site.com" (PUT)
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/1/mail_redirects/5 -X PUT -d '{"zone_mail_redirect":{"destination_address":"admin@example-site.com"}}'
Example Response:
{ "zone_mail_redirect": { "source_address": "admin", "destination_address": "admin@example-site.com", "id": 5, "zone_id": 1 } }
Delete mail redirect (DELETE)
curl -u "user@example.com:f9eca287-5346-1cc7-8529-68eb9db7cd5e" -H 'Accept: application/json' -H "Content-type: application/json" https://api.pointhq.com/zones/example.com/mail_redirects/5 -X DELETE
Example Response:
{ "zone_mail_redirect": { "status": "OK" } }