Skip to main content

Overview

The Crewship API allows you to programmatically:
  • Create and manage deployments
  • Trigger and monitor runs
  • Access artifacts and logs
  • Manage environment variables

Base URL

https://api.crewship.dev

Authentication

All API requests require authentication using an API key:
curl https://api.crewship.dev/v1/runs \
  -H "Authorization: Bearer YOUR_API_KEY"

Getting an API Key

  1. Open the Crewship Console
  2. Go to SettingsAPI Keys
  3. Click Create API Key
  4. Copy and store the key securely
API keys are shown only once. Store them securely and never commit them to version control.

Request Format

Headers

HeaderRequiredDescription
AuthorizationYesBearer YOUR_API_KEY
Content-TypeFor POST/PUTapplication/json
AcceptOptionalapplication/json (default) or text/event-stream

Request Body

POST and PUT requests accept JSON:
curl -X POST https://api.crewship.dev/v1/runs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "deployment": "my-crew",
    "input": {"topic": "AI agents"}
  }'

Response Format

Success Responses

{
  "data": {
    "id": "run_abc123",
    "status": "running",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

List Responses

{
  "data": [
    { "id": "run_abc123", ... },
    { "id": "run_xyz789", ... }
  ],
  "pagination": {
    "total": 100,
    "page": 1,
    "per_page": 20,
    "has_more": true
  }
}

Error Responses

{
  "error": {
    "code": "invalid_request",
    "message": "Missing required field: deployment",
    "details": {
      "field": "deployment"
    }
  }
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad request (invalid parameters)
401Unauthorized (invalid API key)
403Forbidden (insufficient permissions)
404Not found
429Rate limited
500Server error

Rate Limits

PlanRequests/minuteConcurrent runs
Free602
Pro30010
EnterpriseCustomCustom
Rate limit headers are included in responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1705315860

Pagination

List endpoints support pagination:
curl "https://api.crewship.dev/v1/runs?page=2&per_page=50" \
  -H "Authorization: Bearer YOUR_API_KEY"
ParameterDefaultMaxDescription
page1Page number
per_page20100Items per page

Filtering

List endpoints support filtering:
# Filter runs by status
curl "https://api.crewship.dev/v1/runs?status=running" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Filter by deployment
curl "https://api.crewship.dev/v1/runs?deployment=my-crew" \
  -H "Authorization: Bearer YOUR_API_KEY"

SDKs

TypeScript

Coming soon

Python

Coming soon

Go

Coming soon

API Endpoints