Programmatic access to your IPCraft data for scripts, CI/CD, and integrations.
Keys are prefixed with ipc_ for easy identification. The key prefix (first 12 characters) is visible in the settings page for reference. The number of keys you can create depends on your plan (5 on Free, 25 on Pro, 50 on Teams).
Include the key in the Authorization header:
curl https://api.ipcraft.io/api/v1/subnets \ -H "Authorization: Bearer ipc_a1b2c3d4e5f6..."
API key requests don't need the X-Requested-With header (that's only for browser session auth).
Each key carries its own permission scopes: read, write, or both (the default). When creating a key via the API, pass "permissions": ["read"] to mint a read-only key — a good default for dashboards and monitoring.
Your plan adds a second layer on top of key scopes:
curl -s https://api.ipcraft.io/api/v1/subnets \ -H "Authorization: Bearer ipc_your_key_here" \ | python3 -m json.tool
curl -X POST https://api.ipcraft.io/api/v1/subnets/{subnet_id}/addresses \
-H "Authorization: Bearer ipc_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"ip": "10.0.1.50",
"hostname": "web-server-03",
"status": "assigned",
"owner": "ops-team"
}'
curl -s https://api.ipcraft.io/api/v1/subnets/{subnet_id}/first-free \
-H "Authorization: Bearer ipc_your_key_here"
# Response: {"ip": "10.0.1.51"}
#!/bin/bash
# Assign the next available IP in a subnet
API="https://api.ipcraft.io/api/v1"
KEY="ipc_your_key_here"
SUBNET_ID="your-subnet-uuid"
# Get next free IP
FREE_IP=$(curl -s "$API/subnets/$SUBNET_ID/first-free" \
-H "Authorization: Bearer $KEY" | jq -r '.ip')
if [ "$FREE_IP" = "null" ]; then
echo "No available IPs"
exit 1
fi
# Assign it
curl -X POST "$API/subnets/$SUBNET_ID/addresses" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d "{\"ip\": \"$FREE_IP\", \"hostname\": \"$(hostname)\", \"status\": \"assigned\"}"
echo "Assigned $FREE_IP"
Click the trash icon next to any key in Settings to revoke it immediately. Revoked keys stop working instantly.
API key requests share the same rate limits as the web application. There are no separate per-key rate limits at this time.
See the full API reference for all available endpoints.