Shipwrecked API

Quick Start

Set up authentication, make your first API call, and explore key operations in minutes.

1️⃣ Set Up Authentication

Use API Key

Get your API key from your dashboard. Set the Authorization header with:

curl -X GET "https://api.shipwrecked.co/v1/vessels/12345" \
     -H "Authorization: Bearer sk_1234567890abcdef1234567890abcdef" \
     -H "Content-Type: application/json"

Use OAuth 2.0

Get Access Token

curl -u "CLIENT_ID:CLIENT_SECRET" \
     -X POST "https://api.shipwrecked.co/oauth/token" \
     -H "Content-Type: application/x-www-form-urlencoded" \
     -d "grant_type=client_credentials"

Use Token

-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5c...

2️⃣ Make Your First Request

Get Vessel Data

GET /vessels/{id}

Retrieve detailed info about a specific vessel including location, speed, and fuel level.

curl -X GET "https://api.shipwrecked.co/v1/vessels/12345" \
     -H "Authorization: Bearer YOUR_API_KEY" \ 
     -H "Content-Type: application/json"

3️⃣ Common Tasks & Examples

Search Vessels

curl -X GET "https://api.shipwrecked.co/v1/vessels?q=maria" \
     -H "Authorization: Bearer YOUR_API_KEY"

Create Trip

POST /trips

Schedule a vessel journey with start and destination ports.

curl -X POST "https://api.shipwrecked.co/v1/trips" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{"vessel": "V12345", "from": "Seattle", "to": "Tokyo"}'

Get Fuel Forecast

curl -X GET "https://api.shipwrecked.co/v1/fuel/forecast?days=7" \
     -H "Authorization: Bearer YOUR_API_KEY"

✅ Next Steps

Explore All Endpoints

View full API documentation for 10+ endpoints covering vessel operations, trips, and analytics.

View Reference Docs →

Check Security Best Practices

Learn how to securely manage your API keys and implement rate limiting for production systems.

Security Guide →