Get started quickly with our official client libraries. All SDKs are open source, well-documented, and maintained by the PortTask team.
Use cURL or any HTTP client to call the API directly -- no installation needed.
curl -X GET "https://api.porttask.com/v1/port-calls?status=SCHEDULED&limit=10" \
-H "X-API-Key: pt_live_your_api_key" \
-H "Content-Type: application/json"curl -X POST "https://api.porttask.com/v1/service-orders" \
-H "X-API-Key: pt_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"portCallId": "pc-123",
"serviceType": "BUNKERING",
"vendorId": "vendor-456",
"details": {
"quantity": 500,
"unit": "MT",
"fuelType": "VLSFO"
}
}'curl -X GET "https://api.porttask.com/v1/vessels/lookup?imo=9876543" \
-H "X-API-Key: pt_live_your_api_key"We're always looking to expand our SDK coverage. Let us know what you need!
Request an SDKCommunity Contributions Welcome
All our SDKs are open source. Found a bug or want to add a feature? Contributions are welcome on GitHub.
TypeScript / JavaScript
Official TypeScript SDK with full type definitions, async/await support, and comprehensive error handling.
npm install @porttask/sdk
import { PortTaskClient } from '@porttask/sdk';
const client = new PortTaskClient({
apiKey: process.env.PORTTASK_API_KEY,
environment: 'production',
});Python 3.8+
Pythonic SDK with async support, type hints, and integration with popular frameworks like FastAPI and Django.
pip install porttask
from porttask import PortTaskClient
client = PortTaskClient(
api_key=os.environ["PORTTASK_API_KEY"],
environment="production"
)Go 1.18+
High-performance Go SDK with context support, connection pooling, and idiomatic error handling.
go get github.com/porttask/sdk-go
package main
import (
"github.com/porttask/sdk-go"
)
func main() {
client := porttask.NewClient(
porttask.WithAPIKey(os.Getenv("PORTTASK_API_KEY")),
)
}.NET 6+
Enterprise-ready .NET SDK with async support, dependency injection, and IHttpClientFactory integration.
dotnet add package PortTask.SDK
using PortTask.SDK;
var client = new PortTaskClient(new PortTaskOptions
{
ApiKey = Environment.GetEnvironmentVariable("PORTTASK_API_KEY"),
Environment = PortTaskEnvironment.Production
});Java 11+
Robust Java SDK with builder patterns, comprehensive exception handling, and Spring Boot integration.
<dependency> <groupId>com.porttask</groupId> <artifactId>porttask-java</artifactId> <version>1.5.0</version> </dependency>
import com.porttask.PortTaskClient;
PortTaskClient client = PortTaskClient.builder()
.apiKey(System.getenv("PORTTASK_API_KEY"))
.environment(Environment.PRODUCTION)
.build();