Skip to main content

API Reference

The CODITECT API provides programmatic access to all platform features, enabling integration with your existing tools and workflows.

Base URL

https://api.coditect.ai/v1

All API requests must use HTTPS. HTTP requests will be rejected.

API Versions

VersionStatusNotes
v1CurrentStable, production-ready

Authentication

All API requests require authentication using a Bearer token.

curl -H "Authorization: Bearer YOUR_API_TOKEN" \
https://api.coditect.ai/v1/me

See Authentication for details on obtaining tokens.

Response Format

All responses are JSON with consistent structure:

Successful Response

{
"data": {
// Response payload
},
"meta": {
"request_id": "req_abc123",
"timestamp": "2026-01-09T10:30:00Z"
}
}

Error Response

{
"error": {
"code": "invalid_request",
"message": "The request body is missing required field 'name'",
"details": {
"field": "name",
"reason": "required"
}
},
"meta": {
"request_id": "req_xyz789",
"timestamp": "2026-01-09T10:30:00Z"
}
}

HTTP Status Codes

CodeMeaning
200Success
201Created (POST requests)
204No Content (DELETE requests)
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
403Forbidden - Insufficient permissions
404Not Found - Resource doesn't exist
409Conflict - Resource already exists
422Unprocessable Entity - Validation failed
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Pagination

List endpoints support cursor-based pagination:

# First page
GET /v1/projects?limit=20

# Response includes cursor
{
"data": [...],
"pagination": {
"has_more": true,
"next_cursor": "eyJpZCI6MTIzfQ=="
}
}

# Next page
GET /v1/projects?limit=20&cursor=eyJpZCI6MTIzfQ==

Pagination Parameters

ParameterTypeDefaultMaxDescription
limitinteger20100Items per page
cursorstring--Cursor from previous response

Filtering

Many endpoints support filtering via query parameters:

# Filter projects by status
GET /v1/projects?status=active

# Multiple filters
GET /v1/projects?status=active&created_after=2026-01-01

Sorting

Use sort parameter to order results:

# Sort by creation date (newest first)
GET /v1/projects?sort=-created_at

# Sort by name (ascending)
GET /v1/projects?sort=name

Prefix with - for descending order.

API Endpoints

Core Resources

EndpointDescription
AuthenticationOAuth2, tokens, sessions
LicensesLicense management
CommerceSubscriptions, billing
WebhooksEvent notifications

Quick Reference

# Authentication
POST /v1/auth/login
POST /v1/auth/register
POST /v1/auth/refresh
POST /v1/auth/logout
GET /v1/auth/me

# Organizations
GET /v1/orgs
POST /v1/orgs
GET /v1/orgs/{id}
PATCH /v1/orgs/{id}
DELETE /v1/orgs/{id}

# Licenses
GET /v1/licenses
POST /v1/licenses/acquire
POST /v1/licenses/heartbeat
POST /v1/licenses/release
GET /v1/licenses/{id}

# Subscriptions
GET /v1/subscriptions
POST /v1/subscriptions
GET /v1/subscriptions/{id}
POST /v1/subscriptions/{id}/cancel

# Webhooks
GET /v1/webhooks
POST /v1/webhooks
GET /v1/webhooks/{id}
DELETE /v1/webhooks/{id}

SDKs and Libraries

Official SDKs are available for popular languages:

LanguagePackageInstall
Pythoncoditectpip install coditect
JavaScript@coditect/sdknpm install @coditect/sdk
Gocoditect-gogo get github.com/coditect-ai/coditect-go

Testing

Use our sandbox environment for testing:

https://api.sandbox.coditect.ai/v1

Sandbox features:

  • Isolated from production data
  • Test credit card numbers accepted
  • Webhooks sent to your test endpoints
  • Rate limits are more lenient

Support