Contacts

Contacts have a dual FK: nullable company_id + venue_id. Org scope is derived via the company and/or venue lead. Creating against a venue stamps company_id from venue_leads.company_id when present (UI parity).

Quickstart

Base URL (canonical)

https://api.strackerapp.com/v1/

Same gateway also answers under /api/v1 on strackerapp.com. Prefer the api. subdomain. Do not use api.stracker.io (not wired; returns 403).

Environments (keep separate)

EnvBaseKeys
Productionhttps://api.strackerapp.com/v1sk_prod_… only
Local smokehttp://127.0.0.1:8888/api/v1sk_dev_… only

Never mix prod keys with local, or local keys with prod.

Auth (all endpoints)

Org-scoped Bearer API key. Agent keys act as the agent with reports_to ACL inheritance.

Authorization: Bearer sk_REPLACE
Content-Type: application/json

# Optional alternate header:
# X-Stracker-Api-Key: sk_REPLACE

Response envelope

{
  "success": true,
  "data":   { /* endpoint-specific payload */ }
}

Errors

Failed responses always have success: false and an error object with a stable code and a human-readable message:

{
  "success": false,
  "error": {
    "code":    "VALIDATION_ERROR",
    "message": "company_name is required"
  }
}
HTTP statusWhenWhat to do
400Validation failed (missing required fields, bad enum, migration not applied for company/contact notes, assignee not in org, slot unavailable).Read error.message; fix the payload.
401Missing or invalid Authorization / X-Stracker-Api-Key.Check the API key; confirm the header is present.
403Key is valid but lacks permission (e.g. non-admin calling agent admin endpoints), or org scope mismatch.Use an org-admin key, or confirm the resource belongs to the key's org.
404Resource not found or not visible to this org.Verify the id and org scoping.
500Unexpected server error.Retry with backoff; report if persistent.

Contacts

Endpoints at a glance

ActionMethod + PathSummary
List contactsGET /contactsList contacts, optionally filtered by company or venue.
Create a contactPOST /contactsCreate a contact. Required: name plus company_id and/or venue_id.
Get a contactGET /contacts/{id}Fetch a single contact by id.
Update a contactPATCH/PUT /contacts/{id}Update one or more contact fields.

GET /contacts

List contacts, optionally filtered by company or venue.

Query parameters

FieldTypeRequiredDescription
q string no Search name / email / phone
company_id integer no Filter by company
venue_id integer no Filter by venue lead id
limit integer no Page size Default: 50.
offset integer no Offset

Request example

curl -sS "https://api.strackerapp.com/v1/contacts?company_id=1&limit=5" \
  -H "Authorization: Bearer sk_REPLACE"

Response 200 OK

{
  "success": true,
  "data": {
    "contacts": [
      { "id": 10, "name": "Jane Doe", "email": "[email protected]", "company_id": 1, "venue_id": null }
    ],
    "pagination": { "limit": 5, "offset": 0 }
  }
}

POST /contacts

Create a contact. Required: name plus company_id and/or venue_id.

Body parameters

FieldTypeRequiredDescription
name string yes Full name
company_id integer no Link to company (and/or venue_id)
venue_id integer no Link to venue lead (and/or company_id)
email string no Email
phone string no Phone
title string no Job title

Request example

curl -sS https://api.strackerapp.com/v1/contacts \
  -H "Authorization: Bearer sk_REPLACE" \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe","company_id":1,"email":"[email protected]"}'

Response 201 Created

{
  "success": true,
  "data": {
    "contact": { "id": 11, "name": "Jane Doe", "email": "[email protected]", "company_id": 1 }
  }
}

GET /contacts/{id}

Fetch a single contact by id.

Path parameters

FieldTypeRequiredDescription
id integer yes Contact id

Request example

curl -sS https://api.strackerapp.com/v1/contacts/10 \
  -H "Authorization: Bearer sk_REPLACE"

Response 200 OK

{
  "success": true,
  "data": {
    "contact": { "id": 10, "name": "Jane Doe", "email": "[email protected]", "title": "VP Sales", "company_id": 1 }
  }
}

PATCH PUT /contacts/{id}

Update one or more contact fields.

Path parameters

FieldTypeRequiredDescription
id integer yes Contact id

Body parameters

FieldTypeRequiredDescription
name string no Full name
email string no Email
phone string no Phone
title string no Job title
company_id integer no Re-link company
venue_id integer no Re-link venue lead

Request example

curl -sS -X PATCH https://api.strackerapp.com/v1/contacts/10 \
  -H "Authorization: Bearer sk_REPLACE" \
  -H "Content-Type: application/json" \
  -d '{"title":"VP Sales","phone":"+1-555-0100"}'

Response 200 OK

{
  "success": true,
  "data": {
    "contact": { "id": 10, "name": "Jane Doe", "title": "VP Sales", "phone": "+1-555-0100" }
  }
}