mijn.host API
  1. Getting started
mijn.host API
  • Getting started
    • Introduction
    • Base url
    • Authentication
    • Response codes
  • Domains
    • Domains
      • List domains
      • Get domain
      • Update domain
      • Cancel domain
      • Get DNS records
      • Update DNS records
      • Update single DNS record
      • Get auth code
      • Cancel domain deletion
    • Contacts
      • List profiles
      • Create profile
      • Update profile
      • Get profile
    • Nameservers
      • List profiles
      • Create profile
      • Update profile
      • Get profile
    • DNS templates
      • List templates
      • Create template
      • Update template
      • Get template
    • Availability
      • Check domain availability
    • Order
      • Order domain
  1. Getting started

Response codes

When you interact with the mijn.host API, you will receive various HTTP response codes indicating the status of your request. Understanding these codes helps you diagnose issues and handle responses appropriately in your application. Below is a comprehensive list of the response codes used by the mijn.host API and their meanings.

Success Responses#

Status CodeDescription
200 OKThe request was successful, and the server responded with the requested data.

Error Responses#

Status CodeDescription
400 Bad RequestThe request could not be understood by the server due to malformed syntax. Check the request format and parameters.
401 UnauthorizedAuthentication failed or was not provided. Ensure your API-Key header is included and correct.
403 ForbiddenThe server understood the request, but you do not have permission to access the requested resource.
404 Not FoundThe requested resource could not be found. Verify the endpoint and resource identifier.
405 Method Not AllowedThe requested method is not supported for the specified resource. Check if the HTTP method is appropriate for the endpoint.
429 Too Many RequestsWhen you exceed the rate limit, you'll get this error.
500 Internal Server ErrorServer error, feel free to report this as soon as you get this.

Example Responses#

Successful Response Example (200 OK)#

{
    "status": 200,
    "status_description": "Request successful",
    "data": {
        "templates": [
            {
                "id": 1000,
                "alias": "my-dns-template",
                "default": 1,
            }
        ]
    }
}

Error Response Example (400 Bad Request)#

{
    "status": "error",
    "status_description": "You have no access to this resource"
}

Error Response Example (401 Unauthorized)#

{
    "status": "error",
    "status_description": "No valid API key set"
}

Handling Responses#

To ensure your application handles responses correctly:
Check Status Codes: Always check the HTTP status code to determine if the request was successful or if an error occurred.
Parse Response Body: For successful requests, parse the data field in the response to access the returned information.
Handle Errors Gracefully: For error responses, use the message field to understand the issue and provide appropriate feedback or retry logic.
Modified at 2024-06-26 14:12:57
Previous
Authentication
Next
List domains
Built with