projects API

projects

Manage projects and their settings.

GET /v1/projects/:id

Retrieve a project

Auth: User API key

Parameters

Name In Type Required Description
id path uuid Yes Project ID

Responses

200 Project details
enable_signed_ingest
- Whether HMAC-signed ingestion is required
name
- Project name (nullable)
project_id
- Project UUID
slack_webhook_url
- Legacy Slack webhook URL (nullable)
trace_id_url_template
- URL template for trace links (nullable)
404 Project not found

Example

Request
curl https://api.tripswitch.dev/v1/projects/PROJECT_ID \
  -H "Authorization: Bearer YOUR_USER_API_KEY"
Response
{
  "project_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "my-service",
  "enable_signed_ingest": false,
  "slack_webhook_url": null,
  "trace_id_url_template": "https://jaeger.example.com/trace/{{value}}"
}
POST /v1/projects

Create a new project

Auth: User API key

Request Body

name
string Human-readable project name

Responses

201 Project created successfully
ingest_secret
- Secret for HMAC-signed metric ingestion
name
- Project name
project_id
- UUID of the created project
400 Invalid request payload
401 Missing or invalid API key

Example

Request
curl -X POST https://api.tripswitch.dev/v1/projects \
  -H "Authorization: Bearer YOUR_USER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-service"}'
Response
{
  "project_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "my-service",
  "ingest_secret": "secret_abc123..."
}
PATCH /v1/projects/:id

Update project settings

Auth: User API key

Parameters

Name In Type Required Description
id path uuid Yes Project ID

Request Body

enable_signed_ingest
boolean Require HMAC-signed ingestion
name
string New project name
slack_webhook_url
string Slack webhook URL for notifications (null to clear)
trace_id_url_template
string URL template for trace links (use {{value}} placeholder)

Responses

200 Project updated
enable_signed_ingest
- Current setting
name
- Updated name
project_id
- Project UUID
slack_webhook_url
- Current webhook URL
trace_id_url_template
- Trace link template (null if unset)
404 Project not found
422 Validation failed

Example

Request
curl -X PATCH https://api.tripswitch.dev/v1/projects/PROJECT_ID \
  -H "Authorization: Bearer YOUR_USER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "new-name", "enable_signed_ingest": true}'
Response
{
  "project_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "new-name",
  "enable_signed_ingest": true,
  "slack_webhook_url": null,
  "trace_id_url_template": "https://tool.example/trace/{{value}}"
}
POST /v1/projects/:id/ingest_secret/rotate

Rotate the project's ingest secret

Auth: User API key

Parameters

Name In Type Required Description
id path uuid Yes Project ID

Responses

200 Secret rotated
ingest_secret
- New ingest secret
404 Project not found

Example

Request
curl -X POST https://api.tripswitch.dev/v1/projects/PROJECT_ID/ingest_secret/rotate \
  -H "Authorization: Bearer YOUR_USER_API_KEY"
Response
{
  "ingest_secret": "secret_new123..."
}