Developers
Loc8ID API
Create and manage Loc8IDs programmatically. Requires a Business plan API key.
Try it
Make a live request right here—no curl or Postman needed. Uses your real API key against your account.
Authentication
Every request must include your API key as a Bearer token:
Keys are created in your Dashboard → API Keys. Each key is shown only once at creation.
Endpoints
/api/loc8ids
API Key required
Create a new Loc8ID for a geographic coordinate. Returns a short URL immediately.
Request body · application/json
| Field | Type | Required | Description |
|---|---|---|---|
| latitude | number | Yes | −90 to 90 |
| longitude | number | Yes | −180 to 180 |
| name | string | No | Label for this location |
| description | string | No | Additional details |
| custom_slug | string | No | Custom short code (Business) |
Code samples
curl -X POST https://loc8id.com/api/loc8ids \
-H "Authorization: Bearer loc8id_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"latitude": 40.7580,
"longitude": -73.9855,
"name": "Times Square"
}'
Response · 201 Created
{
"success": true,
"data": {
"loc8id": "xk7m",
"url": "https://loc8id.com/xk7m",
"latitude": 40.758,
"longitude": -73.9855,
"name": "Times Square",
"description": null,
"is_custom_slug": false
}
}
/api/collections/{id}/items
Public
Returns all Loc8IDs in a public collection. No authentication required.
curl https://loc8id.com/api/collections/your-collection-id/items
Response · 200 OK
{
"success": true,
"data": [
{
"loc8id": "xk7m",
"url": "https://loc8id.com/xk7m",
"name": "Times Square",
"latitude": 40.758,
"longitude": -73.9855
}
]
}
Rate Limits
Rate limit status is returned in every response header.
Business
60 req / min
Response headers
X-RateLimit-Limit · X-RateLimit-Remaining · X-RateLimit-Reset
Exceeding the limit returns 429 Too Many Requests. The X-RateLimit-Reset header tells you when the window resets (Unix timestamp).
Error Codes
All errors return JSON with a message field.
| Code | Meaning |
|---|---|
| 201 | Created — Loc8ID created successfully |
| 400 | Bad Request—missing or invalid parameters |
| 401 | Unauthorized—missing, invalid, or revoked API key |
| 403 | Forbidden—plan limit reached or insufficient permissions |
| 404 | Not Found |
| 429 | Too Many Requests—rate limit exceeded, check X-RateLimit-Reset |
| 500 | Server Error—try again, contact support if it persists |