Register a new subdomain under jmpy.me for your short URLs. Once registered and verified, you can create short URLs like yourname.jmpy.me/link.
Why use subdomains?
- Brand recognition: Use your company or project name
- Organization: Group links by purpose (e.g.,
marketing.jmpy.me, docs.jmpy.me)
- Custom alias scoping: The same alias can exist on different subdomains
Body Parameters
The subdomain name to register.Requirements:
- 3-63 characters
- Alphanumeric and dashes (
-) only
- Cannot start or end with a dash
- Must be unique and not already registered by another user
Reserved subdomains: www, api, admin, app, mail, ftp, blog, shop, store, support, help, docs, dev, test, staging
Optional display name for the subdomain.Constraints: 1-100 charactersExample: Acme Corp Links
Optional description for the subdomain.Constraints: Max 500 characters
Response
Unique identifier for the subdomain (UUID).
The registered subdomain name.
The complete domain (e.g., acme.jmpy.me).
Whether the subdomain is verified and ready for use.
ISO 8601 timestamp of creation.
Request Examples
cURL
Node.js
TypeScript
Python
PHP
Go
Java
curl -X POST "https://jmpy.me/api/v1/domains/subdomains" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subdomain": "acme",
"name": "Acme Corp Links",
"description": "Marketing team short links"
}'
const fetch = require('node-fetch');
const response = await fetch('https://jmpy.me/api/v1/domains/subdomains', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
subdomain: 'acme',
name: 'Acme Corp Links',
description: 'Marketing team short links'
})
});
const data = await response.json();
console.log(`Created: ${data.data.full_domain}`);
import axios from 'axios';
const response = await axios.post(
'https://jmpy.me/api/v1/domains/subdomains',
{
subdomain: 'acme',
name: 'Acme Corp Links',
description: 'Marketing team short links'
},
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
console.log(`Created: ${response.data.data.full_domain}`);
import requests
url = "https://jmpy.me/api/v1/domains/subdomains"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
data = {
"subdomain": "acme",
"name": "Acme Corp Links",
"description": "Marketing team short links"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
<?php
$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://jmpy.me/api/v1/domains/subdomains', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Content-Type' => 'application/json'
],
'json' => [
'subdomain' => 'acme',
'name' => 'Acme Corp Links',
'description' => 'Marketing team short links'
]
]);
?>
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
url := "https://jmpy.me/api/v1/domains/subdomains"
data := map[string]string{
"subdomain": "acme",
"name": "Acme Corp Links",
"description": "Marketing team short links",
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
req.Header.Add("Content-Type", "application/json")
http.DefaultClient.Do(req)
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.URI;
import java.net.http.HttpResponse;
String jsonInfo = """
{
"subdomain": "acme",
"name": "Acme Corp Links",
"description": "Marketing team short links"
}""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://jmpy.me/api/v1/domains/subdomains"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonInfo))
.build();
client.send(request, HttpResponse.BodyHandlers.ofString());
Response Examples
201 Created
409 Already Taken
403 Plan Limit Reached
400 Validation Error
{
"success": true,
"data": {
"id": "880e8400-e29b-41d4-a716-446655440000",
"subdomain": "acme",
"full_domain": "acme.jmpy.me",
"name": "Acme Corp Links",
"description": "Marketing team short links",
"is_verified": true,
"url_count": 0,
"created_at": "2024-01-15T10:30:00.000Z"
}
}
{
"success": false,
"error": {
"code": "SUBDOMAIN_EXISTS",
"message": "This subdomain is already registered"
}
}
{
"success": false,
"error": {
"code": "PLAN_LIMIT_EXCEEDED",
"message": "You have reached the maximum number of subdomains for your plan"
}
}
{
"success": false,
"error": "Validation failed for fields: subdomain",
"code": "VALIDATION_ERROR",
"status": 400,
"details": [
{
"field": "subdomain",
"message": "Subdomain can only contain letters, numbers, and hyphens",
"value": "invalid!",
"location": "body"
}
]
}
Next Steps
Example Usage
After creating a subdomain, you can create short URLs using it:
curl -X POST "https://jmpy.me/api/v1/short-urls" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/page",
"url_type": "subdomain",
"subdomain": "acme",
"custom_alias": "my-link"
}'
This creates: https://acme.jmpy.me/my-link