Examples
Integrations — Examples
Copy-paste, working requests. BASE = https://app.corteksa.info/api/v1 (a dedicated
workspace uses its own subdomain: https://<subdomain>.corteksa.info/api/v1).
KEY is an API key (crtk_live_…); TOKEN is an OAuth access token
(crtk_oauth_…). Either credential works on every endpoint below.
Validate a credential — GET /me
Confirm a pasted key and greet the workspace by name. /me needs no scope — any
valid credential can call it.
cURL (X-Api-Key)
cURL (Bearer — API key or OAuth token)
200
A 401 means the credential is missing, invalid, revoked, or expired.
Make a scoped call — read records
Requires scope read.contacts. :objectSlug (contacts) is a workspace
object; confirm slugs per customer (schemas are customizable).
JavaScript (fetch)
Discover objects & fields
Let the user pick what to sync and map fields. /object/active needs no scope;
listing a specific object's fields needs read.{objectSlug}.
Create a record
Requires scope create.contacts. Keys in data are field slugs — read
them from GET /object/field/active/:objectSlug above.
The OAuth "Connect" exchange
The partner backend side of "Connect with Corteksa" (the browser only sees
the consent screen). PKCE for public clients, client_secret for confidential.
1. Send the user to the consent screen (the Corteksa web app, on the
workspace subdomain — not the API; app for a shared workspace):
2. User approves → the browser returns to your redirect_uri with
?code=…&state=…. Verify state. The code is single-use and expires in 60s.
3. Exchange the code for tokens (server-to-server). This endpoint returns raw RFC 6749 JSON — no app envelope:
200
4. Call the API with the access token:
5. Refresh (access tokens last ~1h; the refresh_token rotates — persist
the new one each time):
Subscribe to a webhook
Get pushed a signed POST on every record change instead of polling. Full
payload, headers, and the signature-verification recipe live in
Webhooks.
The response returns the signing_secret once — store it now.
Next
- Every endpoint a key can reach → Integration API Reference
- When a call fails → Troubleshooting
- Do it safely → Best Practices