Example Request

Basic Example Request

Here's a complete example of making a request to the Aftermarket Portfolio API:

List Your Domains

Endpoint: Get domains

curl -X GET 'https://api.afternic.com/v3/aftermarket/customers/my/domains?limit=10' \
  -H 'Authorization: sso-key YOUR_API_KEY:YOUR_API_SECRET' \
  -H 'User-Agent: MyApp/1.0' \
  -H 'X-Request-Id: 123e4567-e89b-12d3-a456-426614174000' \
  -H 'Accept: application/json'

Add a New Domain

Endpoint: Create domain

curl -X POST 'https://api.afternic.com/v3/aftermarket/customers/my/domains' \
  -H 'Authorization: sso-key YOUR_API_KEY:YOUR_API_SECRET' \
  -H 'User-Agent: MyApp/1.0' \
  -H 'X-Request-Id: 123e4567-e89b-12d3-a456-426614174000' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -d '{
    "name": "example.com",
    "displayName": "Example.com",
    "buynowPrice": 5000000000,
    "minbidPrice": 100000000,
    "intakeStyle": "BUYNOW"
  }'

Response Format

Successful responses will return JSON data:

  {
    "name": "example.com",
    "featured": true,
    "hidden": false,
    "buynowPrice": 5000000000,
    "floorPrice": 0,
    "minbidPrice": 100000000,
    "maxLeasePeriod": 36,
    "leasingEnabled": false,
    "displayName": "Example.com",
    "intakeStyle": "PRICE_FORM",
    "showLanderMakeOfferOption": false,
    "showLanderLeaseToOwnOption": false,
    "showLanderBuynowOption": false,
    "landingPage": "SALES_TYPE",
    "updatedAt": "2026-01-02T15:04:05Z",
    "createdAt": "2026-01-02T15:04:05Z",
    "listStatus": "ACTIVE",
    "tld": "com"
  }

Success and Error Responses

Error responses include a code and message:

    {
      "code": "ERROR_CODE",
      "message": "Human-readable error description",
      "details": "More details about the error",
      "fields": [
        {
          "code": "VALIDATION_ERROR",
          "message": "Human-readable error description",
          "path": "Query parameter or request body field which failed validation"
        }
      ]
    }

Required Headers

Every request must include these headers:

  1. Authorization: sso-key YOUR_API_KEY:YOUR_API_SECRET
  2. User-Agent: Your application identifier

Optional Headers

  • Accept: Specify response format (default: application/json)
  • Content-Type: Required for POST/PUT/PATCH requests with body
  • X-Request-Id: A unique UUID for request tracking (recommended for quickly triaging requests)

Tips

  • Use the /my path parameter instead of your actual customer ID
  • Include X-Request-Id for easier debugging and support
  • Implement exponential backoff for rate limit errors (429)

On this page