### Authenticate and Get Token Source: https://developers.opusdns.com/index Example of how to authenticate with the OpusDNS API using client credentials and obtain an access token. This request uses the `client_credentials` grant type and requires `client_id` and `client_secret`. ```Shell curl https://api.opusdns.com/v1/auth/token \ --request POST \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'X-Api-Key: YOUR_SECRET_TOKEN' \ --data-urlencode 'client_id=organization_01h45ytscbebyvny4gc8cr8ma2' \ --data-urlencode 'client_secret=' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'password=' \ --data-urlencode 'username=' ``` -------------------------------- ### Signup Organization and User Source: https://developers.opusdns.com/index Registers a new organization and user. Requires a JSON payload containing organization details, user information, and agreement acceptances. Returns an access token upon successful signup (200). Handles conflicts (409) and validation errors (422). ```Shell curl https://api.opusdns.com/v1/auth/signup \ --request POST \ --header 'Content-Type: application/json' \ --data '{ "agreements": [ { "accepted": true, "type": "terms_and_conditions", "url": "", "version": "" } ], "organization": { "address_1": "", "address_2": "", "attributes": [ { "key": "", "private": false, "protected": false, "value": null } ], "business_number": "", "city": "", "country_code": "", "currency": "USD", "default_locale": "en_US", "name": "", "parent_organization_id": "organization_01h45ytscbebyvny4gc8cr8ma2", "postal_code": "", "state": "", "tax_id": "", "tax_id_type": "", "tax_rate": 1, "users": [ { "email": "", "first_name": "", "last_name": "", "locale": "en_US", "password": "correcthorsebatterystaple", "phone": "+1.2125552368", "user_attributes": [ { "key": "", "value": null } ], "username": "" } ] }, "terms_of_service": { "accepted": true }, "user": { "email": "", "first_name": "", "last_name": "", "locale": "en_US", "password": "correcthorsebatterystaple", "phone": "+1.2125552368", "user_attributes": [ { "key": "", "value": null } ], "username": "" } }' ``` -------------------------------- ### Client Credentials Authentication Source: https://developers.opusdns.com/index Demonstrates how to obtain client credentials for authentication with the OpusDNS API. ```curl curl -X GET "https://api.opusdns.com/v1/auth/client_credentials" -H "Accept: */*" -H "Key: {your_key}" -H "Value: {your_value}" ``` -------------------------------- ### Domain Search Endpoint Source: https://developers.opusdns.com/index Provides an endpoint for suggesting domain names. ```bash GET /v1/domain-search/suggest ``` -------------------------------- ### Signup Response Schema Source: https://developers.opusdns.com/index Schema for the response when signing up a new organization and user. Includes the access token, expiration time, and token type. ```JSON { "access_token": "string", "expires_in": 1, "token_type": "Bearer" } ``` -------------------------------- ### List API Keys (Shell cURL) Source: https://developers.opusdns.com/index Fetches a list of API keys, with optional filtering by status and pagination parameters. Requires an Authorization header with a Bearer token. ```shell curl 'https://api.opusdns.com/v1/auth/client_credentials?status=active&page=1&page_size=10' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### List API Keys Response Schema (JSON) Source: https://developers.opusdns.com/index Defines the structure of a successful response when listing API keys. Includes pagination details and a list of API key objects, each with its description, ID, name, and status. ```json { "pagination": { "current_page": 1, "has_next_page": true, "has_previous_page": true, "page_size": 1, "total_items": 1, "total_pages": 1 }, "results": [ { "api_key_description": "string", "api_key_id": "api_key_01h45ytscbebyvny4gc8cr8ma2", "api_key_name": "string", "created_on": "2025-09-12T13:46:46.670Z", "deleted_on": "2025-09-12T13:46:46.670Z", "last_used_on": "2025-09-12T13:46:46.670Z", "organization_id": "organization_01h45ytscbebyvny4gc8cr8ma2", "status": "active" } ] } ``` -------------------------------- ### Notifications Endpoints Source: https://developers.opusdns.com/index Allows for the creation and management of notifications, including retrieving, updating, and deleting them. ```bash GET /v1/notifications POST /v1/notifications DELETE /v1/notifications/{notification_id} GET /v1/notifications/{notification_id} PUT /v1/notifications/{notification_id} PATCH /v1/notifications/{notification_id}/read ``` -------------------------------- ### Issue API Key (Shell cURL) Source: https://developers.opusdns.com/index Creates a new API key for an organization. Requires a POST request with JSON payload containing key description, name, and optional expiration date. An Authorization header is mandatory. ```shell curl https://api.opusdns.com/v1/auth/client_credentials \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --data '{ "api_key_description": "", "api_key_name": "", "expires_at": "" }' ``` -------------------------------- ### DNS Management Endpoints Source: https://developers.opusdns.com/index Provides endpoints for managing DNS records, including retrieving summaries, updating records, and enabling/disabling DNSSEC. ```bash GET /v1/dns POST /v1/dns GET /v1/dns/summary DELETE /v1/dns/{zone_name} GET /v1/dns/{zone_name} POST /v1/dns/{zone_name}/dnssec/disable POST /v1/dns/{zone_name}/dnssec/enable PATCH /v1/dns/{zone_name}/records PATCH /v1/dns/{zone_name}/rrsets PUT /v1/dns/{zone_name}/rrsets ``` -------------------------------- ### Email Forwarding Endpoints Source: https://developers.opusdns.com/index Enables management of email forwards, including creating, deleting, and updating aliases, as well as enabling and disabling forwarding. ```bash DELETE /v1/email-forwards/{zone_name}/aliases GET /v1/email-forwards/{zone_name}/aliases POST /v1/email-forwards/{zone_name}/aliases DELETE /v1/email-forwards/{zone_name}/aliases/{alias} GET /v1/email-forwards/{zone_name}/aliases/{alias} PUT /v1/email-forwards/{zone_name}/aliases/{alias} PATCH /v1/email-forwards/{zone_name}/disable PATCH /v1/email-forwards/{zone_name}/enable ``` -------------------------------- ### Issue API Key Response Schema (JSON) Source: https://developers.opusdns.com/index Details the structure of a successful response after issuing an API key. The response contains the new API key, client ID, description, name, and creation/usage timestamps. ```json { "api_key": "api_key_01h45ytscbebyvny4gc8cr8ma2", "api_key_description": "string", "api_key_name": "string", "client_id": "organization_01h45ytscbebyvny4gc8cr8ma2", "client_secret": "string", "created_on": "2025-09-12T13:46:46.670Z", "deleted_on": "2025-09-12T13:46:46.670Z", "last_used_on": "2025-09-12T13:46:46.670Z", "status": "active" } ``` -------------------------------- ### Issue Internal API Key Source: https://developers.opusdns.com/index Issues a new internal API key for an organization. Requires a JSON payload with optional description, name, and expiration date. Returns the created API key details upon success (200). Handles validation errors (422). ```Shell curl https://api.opusdns.com/v1/auth/internal_client_credentials \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \ --data '{ "api_key_description": "", "api_key_name": "", "expires_at": "" }' ``` -------------------------------- ### Delete API Key Source: https://developers.opusdns.com/index Deletes an existing API key. Requires the API key ID as a path parameter. Returns a 204 status code on successful deletion. Handles unauthorized (401), not found (404), and validation errors (422). ```Shell curl https://api.opusdns.com/v1/auth/client_credentials/api_key_01h45ytscbebyvny4gc8cr8ma2 \ --request DELETE \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` -------------------------------- ### Internal API Key Response Schema Source: https://developers.opusdns.com/index Schema for the response when issuing an internal API key. Includes details such as the generated API key, client ID, creation and deletion timestamps, last used timestamp, and status. ```JSON { "api_key": "api_key_01h45ytscbebyvny4gc8cr8ma2", "api_key_description": "string", "api_key_name": "string", "client_id": "organization_01h45ytscbebyvny4gc8cr8ma2", "client_secret": "string", "created_on": "2025-09-12T13:46:46.670Z", "deleted_on": "2025-09-12T13:46:46.670Z", "last_used_on": "2025-09-12T13:46:46.670Z", "status": "active" } ``` -------------------------------- ### Logout User Source: https://developers.opusdns.com/index Logs out the currently authenticated user. Returns a 204 status code on successful logout. Handles unauthorized requests (401). ```Shell curl https://api.opusdns.com/v1/auth/logout \ --request POST \ --header 'Authorization: Bearer YOUR_SECRET_TOKEN' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.