# Valeron API documentation Source: https://valeron.io/docs/ --- URL: https://valeron.io/docs/authentication/ # Authentication Authenticate every request with an API key that belongs to your organization. Every request carries an API key in the `Authorization` header. ```http Authorization: Bearer vk_live_YOUR_KEY ``` A key belongs to one organization, so you never send an organization header. Valeron reads the organization from the key. ## Create a key Only the Owner of the organization (or an Individual, who owns their own account) can create, list and revoke keys. 1. Sign in to the Valeron app and open [Settings › Developers](https://app.valeron.io/settings/developers). 2. Create a key: give it a name and pick its [scopes](/docs/scopes/). 3. Copy the key now. It is shown once. A key looks like `vk_live_` followed by 40 random characters. Valeron stores only a hash of it and its first 12 characters (such as `vk_live_abcd`), which is what the list in Settings shows. If you lose a key, revoke it and create another. > Keep keys on your server. Put them in an environment variable or a secrets manager. Never ship one in browser code, a mobile app or a public repository. ## Who the request acts as A request made with a key acts as the person who created it, with that person's role. Every rule that applies to that person applies to the key, and the key's scopes narrow it further. History entries name that person, and records written through the API carry the source `api`. If the person who created a key stops being the Owner (or the Individual) of the organization, the key stops working and returns `401 api_key_revoked`. ## Scopes Each key has a list of scopes. A route that needs a scope the key does not have returns `403 missing_scope`, and the error names the scope. The full access scope is `["*"]`. See [Scopes](/docs/scopes/) for the list. ## What keys cannot do Keys reach only the public routes in the [API reference](/docs/api-reference/). Any other route refuses every key with `403 not_available_with_api_key`. Keys are managed with a signed-in session only, never with another key, so there is no API route for creating or listing keys. ## Revoke a key Open Settings › Developers and revoke the key. A revoked key stays in the list so you can see it existed, and it can never be used again. Requests that use it return `401 api_key_revoked`. ## Authentication errors | Status | Code | Meaning | |---|---|---| | 401 | `unauthenticated` | The key is missing or Valeron does not know it. | | 401 | `api_key_revoked` | The key was revoked, or its creator is no longer the Owner. | | 403 | `missing_scope` | The key does not have the scope the route needs. | | 403 | `not_available_with_api_key` | The route is not part of the public API. | See [Errors](/docs/errors/) for the full error shape. --- URL: https://valeron.io/docs/billing-and-charges/ # Billing and charges The API is free to call. The work it causes is charged to your prepaid balance. Calling the API costs nothing. A few actions do work that Valeron charges for, exactly as they do in the app. Your organization has one prepaid balance, and charges come out of it. ## What costs money | Action | Charge | |---|---| | `POST /v1/analyses` | **$0.014 per started minute** of the call, charged as `call_analysis` when the analysis is stored. | | `POST /v1/recordings/{recording_id}/reanalyze` | Charged to your balance again, as a new analysis version. | | `POST /v1/threads/{thread_id}/messages` | A text you send is charged as it is in the app. | Everything else, including reading data, writing contacts, companies, tasks, notes and payments, and managing webhooks, is free. ## How minutes are counted A started minute is billed in full, so a call of 61 seconds is 2 minutes. For `POST /v1/analyses` the minutes come from `duration_seconds`, or, if you leave it out, from the `end_seconds` of the last transcript segment. With neither, the request fails with `422 duration_required`. A 21 minute call (1,260 seconds) costs 21 × $0.014 = **$0.294**. ## When the balance is too low Valeron checks the balance before it accepts a call. `POST /v1/analyses` returns `402 insufficient_balance` when the balance is under the price of the whole call, so nothing is accepted that would then be skipped. `POST /v1/recordings/{recording_id}/reanalyze` also returns `402` when the balance is under one minute's price. ```json { "error": { "code": "insufficient_balance", "message": "Your balance is too low. Add money to your balance.", "field": null, "request_id": "req_01JEX4R7Q2K8M3" } } ``` Add money in the Valeron app, then send the request again. A `402` charges nothing. ## You are never charged twice for one call Send your own `external_id` with every call. Sending the same `external_id` again returns the first recording with `200` and charges nothing more. --- URL: https://valeron.io/docs/changelog/ # Changelog What changed in the Valeron API. Changes that only add are made in `/v1`. A breaking change gets a new version path, such as `/v2`. ## 2026-12-04 ### More coaching in the analysis The analysis now says what to do on the next call, not only what went wrong. See [Get analysis](/docs/api-reference/recordings/get-analysis/). - **`do_instead` on each coaching area.** What to do differently on the next call, in two to four sentences. - **`try_saying` on each coaching area.** One line to say word for word next time, or `null` when no single line fits. - **`next_call_focus` on the analysis.** The one most important thing to do on the next call, in one sentence, or `null` when there is nothing to improve. Analyses made before this date return `null` for all three. ### iMessage lines - **`kind` on texting lines.** `GET /v1/texting/lines` gives each line's `kind`: `sms` (SMS line) or `imessage` (iMessage line), with its label. Texts from an iMessage line go out as iMessages. ## 2026-12-03 ### Public API launched The Valeron API is available to customers with their own CRM, on every plan. - **API keys.** Create keys with scopes in Settings › Developers. Keys start with `vk_live_`. See [Authentication](/docs/authentication/) and [Scopes](/docs/scopes/). - **Read and write your data.** Contacts, companies, recordings, transcripts, analyses, tasks, notes, messages, payments, pipelines, fields and metrics. See the [API reference](/docs/api-reference/). - **Incremental sync.** `updated_since` on `GET /v1/contacts` and `GET /v1/companies`. See [Pagination and syncing](/docs/pagination-and-syncing/). - **Send calls for analysis.** `POST /v1/analyses` takes a transcript and analyzes it, charged at $0.014 per started minute. See [Send calls for analysis](/docs/guides/send-calls-for-analysis/). - **Outgoing webhooks.** Signed events for `recording.analyzed`, `contact.created`, `contact.updated`, `contact.stage_changed`, `meeting.booked`, `message.received` and `payment.succeeded`, with retries. See [Webhooks](/docs/webhooks/). - **New error codes.** `missing_scope`, `not_available_with_api_key`, `api_key_revoked` and `duration_required`. See [Errors](/docs/errors/). - **Rate limit.** 600 requests in 60 seconds per key. See [Rate limits](/docs/rate-limits/). --- URL: https://valeron.io/docs/errors/ # Errors Every error has one shape, and the HTTP status always matches. Every error, on every route, has the same shape. Valeron never returns `200` for a failure. ```json { "error": { "code": "not_found", "message": "Contact not found.", "field": null, "request_id": "req_01JEX4R7Q2K8M3" } } ``` | Field | Meaning | |---|---| | `code` | A stable string to branch on in code. | | `message` | A sentence for people. It can change, so do not match on it. | | `field` | The part of the request that was wrong, or `null`. | | `request_id` | The same value as the `X-Request-Id` response header. Quote it when you ask Valeron for help. | ## Error codes | Status | Code | What it means | |---|---|---| | 400 | `invalid_cursor` | The `cursor` is not one Valeron returned. | | 401 | `unauthenticated` | The key is missing or unknown. | | 401 | `api_key_revoked` | The key was revoked, its creator is no longer the Owner, or the organization was closed. | | 402 | `insufficient_balance` | Your prepaid balance is too low for what you asked. See [Billing and charges](/docs/billing-and-charges/). | | 403 | `missing_scope` | The key lacks the scope the route needs. The error names it. | | 403 | `not_available_with_api_key` | The route is not part of the public API. | | 403 | `forbidden` | The key acts as its creator, and their role does not allow this (for example teams on an Individual account). | | 404 | `not_found` | The record does not exist in your organization. | | 409 | `webhook_endpoint_limit` | Your organization already has 10 webhook endpoints. | | 409 | `endpoint_disabled` | You retried a delivery while its endpoint is switched off. | | 422 | `invalid_request` | A value in the request is not valid. `field` names it. | | 422 | `invalid_member` | `member` in `POST /v1/analyses` is not a member of your organization. | | 422 | `duration_required` | `POST /v1/analyses` had no `duration_seconds` and no segment `end_seconds`. | | 422 | `unknown_field` | A column, filter, sort or group is not in the table's catalogue. | | 422 | `invalid_filter`, `invalid_sort`, `invalid_group` | The field exists but cannot be filtered, sorted or grouped. | | 429 | `rate_limited` | Too many requests. Wait for the `Retry-After` seconds. See [Rate limits](/docs/rate-limits/). | | 503 | `rate_limit_unavailable` | Valeron could not check the limit, so it refused the request instead of skipping it. Retry shortly. | ## Handling errors - Branch on the HTTP status first and `error.code` second. - Retry `429` and `503` after a delay. Do not retry other `4xx` errors: the same request fails the same way. - To retry a `POST` safely, send the same `Idempotency-Key` header again. A retried request returns the first result. ```js const response = await fetch("https://api.valeron.io/v1/contacts", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", "Idempotency-Key": "import-2026-12-03-row-118", }, body: JSON.stringify({ fields: { email: "jordan@example.com" } }), }); if (!response.ok) { const { error } = await response.json(); throw new Error(`${error.code}: ${error.message} (${error.request_id})`); } ``` --- URL: https://valeron.io/docs/guides/send-calls-for-analysis/ # Send calls for analysis Send the transcript of a call Valeron did not record, and get the same analysis as any other call. Use `POST /v1/analyses` when your calls happen outside Valeron, for example in your own dialer. Valeron stores the call as a recording and analyzes it exactly like one it recorded itself. You send **transcripts only**: audio and video are not accepted. ## 1. Create a key Create a key with `analyses:write` and `recordings:read`. See [Authentication](/docs/authentication/). ## 2. Check your balance An analysis costs **$0.014 per started minute**. The request is refused with `402 insufficient_balance` when your balance is under the price of the whole call. See [Billing and charges](/docs/billing-and-charges/). ## 3. Send the call ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/analyses" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "external_id": "call-48213", "member": "maya@acme.com", "started_at": "2026-12-03T14:30:00Z", "title": "Discovery call with Jordan Rivera", "duration_seconds": 1260, "contact": { "email": "jordan@example.com" }, "create_contact": true, "participants": [ { "name": "Maya Chen", "email": "maya@acme.com", "is_member": true }, { "name": "Jordan Rivera", "email": "jordan@example.com", "is_member": false } ], "transcript": [ { "speaker": "Maya Chen", "is_member": true, "start_seconds": 4.2, "end_seconds": 11.8, "text": "Thanks for making time today. What made you book this call?" }, { "speaker": "Jordan Rivera", "is_member": false, "start_seconds": 12.4, "end_seconds": 25.0, "text": "Our new closers take too long to ramp, and I cannot see why." } ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/analyses", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ external_id: "call-48213", member: "maya@acme.com", started_at: "2026-12-03T14:30:00Z", duration_seconds: 1260, contact: { email: "jordan@example.com" }, create_contact: true, transcript: [ { speaker: "Maya Chen", is_member: true, start_seconds: 4.2, end_seconds: 11.8, text: "Thanks for making time today. What made you book this call?" }, { speaker: "Jordan Rivera", is_member: false, start_seconds: 12.4, end_seconds: 25.0, text: "Our new closers take too long to ramp, and I cannot see why." }, ], }), }); const { recording_id } = await response.json(); // 202 ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/analyses", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "external_id": "call-48213", "member": "maya@acme.com", "started_at": "2026-12-03T14:30:00Z", "duration_seconds": 1260, "contact": {"email": "jordan@example.com"}, "create_contact": True, "transcript": [ {"speaker": "Maya Chen", "is_member": True, "start_seconds": 4.2, "end_seconds": 11.8, "text": "Thanks for making time today. What made you book this call?"}, {"speaker": "Jordan Rivera", "is_member": False, "start_seconds": 12.4, "end_seconds": 25.0, "text": "Our new closers take too long to ramp, and I cannot see why."}, ], }, ) response.raise_for_status() recording_id = response.json()["recording_id"] # 202 ``` ### The fields | Field | Required | Notes | |---|---|---| | `external_id` | Yes | Your own ID for the call. Sending it again returns the first recording with `200` and its current `status` (`queued`, `running`, `done` or `failed`), and charges nothing more. | | `member` | Yes | The member who held the call: a `usr_` ID or their email. | | `started_at` | Yes | When the call started, in UTC. | | `transcript` | Yes | 1 to 5,000 segments, at most 500,000 characters in all. Each segment is `{ speaker, is_member?, start_seconds?, end_seconds?, text }`. | | `duration_seconds` | No | 1 to 86,400. Sets the billed minutes. Without it Valeron uses the largest `end_seconds`. With neither, you get `422 duration_required`. | | `contact` | No | `{ id }`, or `{ email, phone }` (either or both) matched with Valeron's usual match rules. `first_name` and `last_name` are used only when the contact is created. | | `create_contact` | No | `true` creates the contact when nothing matches. Otherwise no match leaves the recording unlinked. | | `participants` | No | `[{ name, email?, phone?, is_member }]`. | | `title` | No | A title for the recording. | | `type` | No | `meeting` (the default, analyzed right away) or `phone_call` (analyzed in a batch, within a few hours). | Give `start_seconds` and `end_seconds` on every segment or on none. Mark which speaker is the member with `is_member`. Talk metrics, such as talk ratio and speaking pace, need to know whose voice is the member's. Without it they are `null`. ## 4. Wait for the analysis The answer is `202`: ```json { "recording_id": "rec_01JEX4S9M8", "status": "queued" } ``` The recording appears in Valeron like any other, with the source `api` and your `external_id`. Its tasks, proposed record changes and AI fields follow as they do for any analyzed recording. There are two ways to get the result. **Receive a webhook.** Subscribe an endpoint to `recording.analyzed`. See [Keep your CRM up to date with webhooks](/docs/guides/keep-your-crm-up-to-date-with-webhooks/). **Read it.** Call `GET /v1/recordings/{recording_id}/analysis`. While the analysis is still being worked on, the recording shows its processing state. Try again after a short wait. ## What an analysis contains One analysis per call. A call is scored only with at least 2 minutes of conversation and both people speaking. Otherwise its status is `not_enough_conversation`. The result holds: - a **score** (the average of four sub-scores out of 10: structure, tonality, objection handling and discovery), each with evidence, - a **summary**, - **objections**, each with its category, a quote, the response and whether it was resolved, - **discovery questions**, close attempts, value statements, pricing mentions and competitor mentions, - whether a **next step was secured**, and the next steps, which become tasks for review, - a **payment agreement**, only when an amount was said out loud, - the contact's **sentiment**: positive, neutral or negative, - the call **outcome** and **type**, from your organization's lists only, otherwise `null`, - **highlights**, strengths and coaching areas, - **proposed record changes**, which wait for a person to approve them. Every item carries the quote and the time it came from. Talk metrics are worked out from the transcript's timing: `talk_ratio`, `longest_monologue_seconds`, `interruption_count`, `words_per_minute` and `filler_word_count`. See [Get analysis](/docs/api-reference/recordings/get-analysis/) for the exact shape. ## Retries and duplicates Always send an `external_id`. If your request times out, send it again with the same value: you get the first recording back and pay once. --- URL: https://valeron.io/docs/guides/sync-valeron-into-your-crm/ # Sync Valeron into your CRM Load your contacts and companies, keep them current, and write changes back. This walkthrough keeps a custom CRM and Valeron in step. You load everything once, then fetch only what changed, and you send your own changes back. ## 1. Create a key In [Settings › Developers](https://app.valeron.io/settings/developers), create a key with `contacts:read`, `companies:read` and `schema:read`. Add `contacts:write` and `companies:write` if you will write back. ## 2. Learn the fields Valeron's contacts and companies have fields, some built in and some your organization created. List them so you can map them to your CRM's columns. ```bash title="cURL" curl "https://api.valeron.io/v1/fields?object=contacts" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` Each field has a `key`, a `label` and a type. Pipelines and stages come from `GET /v1/pipelines`. ## 3. Load everything Page through `GET /v1/contacts` and `GET /v1/companies` with `limit=200` until `has_more` is `false`. Each record is `{ id, object, fields, processing, archived_at }`, and `fields` holds each value with its label and type. Store the Valeron `id` next to your own ID so later runs update the same row. Contacts are `ct_…` and companies are `co_…`. ## 4. Fetch changes Before each run, record the current time. Pass the previous run's time as `updated_since`. The code is in [Pagination and syncing](/docs/pagination-and-syncing/). ## 5. Write back Send changes with `PATCH /v1/contacts/{record_id}`. The body is `{ "fields": { … } }`, with `null` to clear a field. ```js title="JavaScript" await fetch("https://api.valeron.io/v1/contacts/ct_01JEX4R7Q2", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ fields: { phone: "+14155550132" } }), }); ``` ```python title="Python" import os import requests requests.patch( "https://api.valeron.io/v1/contacts/ct_01JEX4R7Q2", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={"fields": {"phone": "+14155550132"}}, ).raise_for_status() ``` To create a contact, `POST /v1/contacts` with the same body and an `Idempotency-Key` so a retry cannot create it twice. If a contact with the same email address or phone number already exists, Valeron adds your values to it and answers `200` with `is_matched: true`, instead of creating a duplicate. To move a contact through your pipeline, `POST /v1/contacts/{contact_id}/stage` with `{ "stage_id": "stg_…" }`. To remove one, `DELETE /v1/contacts/{record_id}` archives it, and `POST /v1/contacts/{record_id}/restore` brings it back. ## 6. Stay current Polling works, and webhooks are faster. See [Keep your CRM up to date with webhooks](/docs/guides/keep-your-crm-up-to-date-with-webhooks/). --- URL: https://valeron.io/docs/guides/keep-your-crm-up-to-date-with-webhooks/ # Keep your CRM up to date with webhooks Get changes pushed to your server instead of polling for them. This walkthrough builds a receiver that updates your CRM when Valeron analyzes a call. It uses the same pattern for every event. ## 1. Build the receiver Your endpoint needs to: 1. accept `POST` requests over HTTPS, 2. verify the signature on the raw body, 3. skip events it has already handled, 4. answer `2xx` within 10 seconds, and do the real work afterward. ```js title="Node.js" import crypto from "node:crypto"; import express from "express"; const app = express(); const seen = new Set(); // use your database in production app.post("/hooks/valeron", express.raw({ type: "application/json" }), async (req, res) => { const rawBody = req.body.toString("utf8"); const header = req.get("Valeron-Signature") ?? ""; const parts = Object.fromEntries(header.split(",").map((part) => part.trim().split("="))); const expected = crypto.createHmac("sha256", process.env.VALERON_WEBHOOK_SECRET) .update(`${parts.t}.${rawBody}`).digest("hex"); const valid = parts.v1 && parts.v1.length === expected.length && crypto.timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected)); if (!valid) return res.status(400).send("Invalid signature"); const event = JSON.parse(rawBody); if (seen.has(event.id)) return res.sendStatus(200); // a repeat seen.add(event.id); res.sendStatus(200); if (event.type === "recording.analyzed") await saveAnalysis(event.data); if (event.type === "contact.stage_changed") await updateContact(event.data); }); ``` The full signature code, with Python, is in [Verify signatures](/docs/webhooks/verify-signatures/). ## 2. Register the endpoint Create it with `POST /v1/webhook-endpoints`, using the events you handle. Store the `whsec_…` secret from the response: it is shown once. ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/webhook-endpoints" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url":"https://crm.example.com/hooks/valeron","events":["recording.analyzed","contact.stage_changed"]}' ``` ## 3. Send a test Call `POST /v1/webhook-endpoints/{endpoint_id}/test`. Valeron sends a `ping`. Check that your receiver verifies it and answers `200`. ## 4. Handle ordering Events can arrive out of order and more than once. Before you overwrite a record, compare its `updated_at` with the one you hold, and ignore the event if yours is newer. See [Delivery and retries](/docs/webhooks/delivery/). ## 5. Recover from outages If your receiver is down, Valeron retries for about 24 hours. If every delivery fails for 3 days, the endpoint is switched off and the Owner is notified. After you fix the receiver: 1. turn the endpoint back on with `PATCH /v1/webhook-endpoints/{endpoint_id}` and `{ "is_enabled": true }`, 2. run an `updated_since` sync from the time it stopped, to catch what you missed. See [Pagination and syncing](/docs/pagination-and-syncing/). You can see every attempt of the last 30 days with `GET /v1/webhook-endpoints/{endpoint_id}/deliveries`, and send a missed one again with `POST /v1/webhook-deliveries/{delivery_id}/retry`. --- URL: https://valeron.io/docs/ # Introduction Read and write your organization's data, send call transcripts to Valeron's analysis, and receive webhooks. The Valeron API gives your own software the same data the Valeron app works with. Use it when you run a custom CRM, or any internal tool, and want Valeron's call intelligence inside it. ## What you can build - **A two-way CRM sync.** Pull contacts and companies, fetch only what changed since your last run, and write changes back. See [Sync Valeron into your CRM](/docs/guides/sync-valeron-into-your-crm/). - **Call analysis for calls Valeron did not record.** Send a transcript to `POST /v1/analyses` and get the score, summary, objections, next steps and coaching points. See [Send calls for analysis](/docs/guides/send-calls-for-analysis/). - **Live updates.** Receive a webhook when a contact is created or changes, a call is analyzed, a meeting is booked, a message arrives or a payment succeeds. See [Webhooks](/docs/webhooks/). - **Reporting.** Read recordings, transcripts, analyses, payments and metrics into your own dashboards. ## Base URL All requests go to one base URL. Every route lives under `/v1`. ```text https://api.valeron.io/v1 ``` ## Make your first request Create an API key in the Valeron app (see [Authentication](/docs/authentication/)), then fetch your organization: ```bash title="cURL" curl "https://api.valeron.io/v1/organization" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/organization", { headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}` }, }); console.log(await response.json()); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/organization", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) print(response.json()) ``` ## Conventions | Topic | Rule | |---|---| | Format | JSON in, JSON out. Keys are `snake_case`. | | IDs | Prefixed strings that tell you the type: `ct_` contact, `co_` company, `rec_` recording, `tsk_` task, `mtg_` meeting, `usr_` member. | | Times | ISO 8601 in UTC, ending in `Z`, such as `2026-12-03T14:30:00Z`. | | Money | Integer minor units with a currency: `{ "amount": 2400000, "currency": "USD" }`. | | Unknown values | `null`. Valeron never guesses or fills in a default. | | Enums | Values that people see carry a label: `{ "value": "price_too_high", "label": "Price too high" }`. | | Creating | `POST` accepts an `Idempotency-Key` header. A retried request returns the first result. | | Request ID | Every response has an `X-Request-Id` header. Quote it when you ask Valeron for help. | | Versioning | A breaking change gets a new path, such as `/v2`. Changes that only add are made in `/v1`. See the [changelog](/docs/changelog/). | ## Plans The API is available on every plan, Individual, Team and Enterprise. Using it costs nothing. What it causes is charged as usual: see [Billing and charges](/docs/billing-and-charges/). ## For AI coding agents These docs are written to be read by machines too. Every page has a Markdown copy at the same address with `.md` added (or `index.md` for a folder), and there are two index files. - [`/docs/llms.txt`](/docs/llms.txt): an index of every page with a one-line description. - [`/docs/llms-full.txt`](/docs/llms-full.txt): all the documentation in one Markdown file. - [`/docs/openapi.json`](/docs/openapi.json): the OpenAPI 3.1 description of every public route. --- URL: https://valeron.io/docs/pagination-and-syncing/ # Pagination and syncing Page through lists with cursors, and fetch only what changed with updated_since. ## Cursor pagination Every list is paged with a cursor. Send `limit` (1 to 200, default 50) and, for the next page, the `cursor` from the last response. ```json { "data": [], "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "has_more": true } ``` Keep requesting with `cursor=` while `has_more` is `true`. Treat a cursor as opaque. A cursor Valeron did not issue returns `400 invalid_cursor`. ## Table queries Contacts, companies, recordings, members, tasks, meetings and conversations also answer to `POST /v1//query`. It takes one shape everywhere: ```json { "columns": ["name", "email", "stage"], "filters": [{ "field": "stage", "op": "eq", "value": "Qualified" }], "sort": [{ "field": "updated_at", "direction": "desc" }], "limit": 100, "cursor": null } ``` A filter is `{ field, op, value }`. The operators are `eq`, `neq`, `contains`, `starts_with`, `in`, `gt`, `gte`, `lt`, `lte`, `is_empty` and `is_not_empty`. You can sort by up to five keys. The response is `{ columns, data, groups, next_cursor, has_more, total }`, where `columns` describes each column with its label and type. `GET /v1/fields?object=contacts` lists the columns you can ask for. ## Fetch only what changed `GET /v1/contacts` and `GET /v1/companies` take `updated_since`, an ISO 8601 time. They return records changed at or after that moment, in the order they changed, paged by cursor. The query endpoints accept the same thing as a filter on `updated_at`. The time is inclusive, so a record can appear in two consecutive syncs. Upsert by `id` and the repeat does no harm. To avoid gaps, record the time before you start each run, and use it as `updated_since` for the next one: ```js title="JavaScript" async function syncContacts(since) { const startedAt = new Date().toISOString(); let cursor = null; do { const url = new URL("https://api.valeron.io/v1/contacts"); url.searchParams.set("limit", "200"); if (since) url.searchParams.set("updated_since", since); if (cursor) url.searchParams.set("cursor", cursor); const response = await fetch(url, { headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}` }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const page = await response.json(); for (const contact of page.data) await upsertIntoYourCrm(contact); cursor = page.has_more ? page.next_cursor : null; } while (cursor); return startedAt; // pass this as `since` next time } ``` ```python title="Python" import os from datetime import datetime, timezone import requests def sync_contacts(since=None): started_at = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ") cursor = None while True: params = {"limit": 200} if since: params["updated_since"] = since if cursor: params["cursor"] = cursor response = requests.get( "https://api.valeron.io/v1/contacts", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params=params, ) response.raise_for_status() page = response.json() for contact in page["data"]: upsert_into_your_crm(contact) if not page["has_more"]: return started_at # pass this as `since` next time cursor = page["next_cursor"] ``` Do the first run without `updated_since` to load everything. Run a full sync now and then to catch anything you missed, or use [webhooks](/docs/webhooks/) to hear about changes as they happen. --- URL: https://valeron.io/docs/rate-limits/ # Rate limits Each key can make 600 requests in 60 seconds. Limits apply to each API key separately. The current limit is **600 requests in 60 seconds** per key. When you go over it, the request fails with `429` and the error code `rate_limited`. The response carries a `Retry-After` header with the number of seconds to wait. ```http HTTP/1.1 429 Too Many Requests Retry-After: 12 Content-Type: application/json {"error":{"code":"rate_limited","message":"Too many requests.","field":null,"request_id":"req_01JEX4R7Q2K8M3"}} ``` If Valeron cannot check the limit, it refuses the request with `503 rate_limit_unavailable` rather than letting it through. Retry after a short delay. ## Back off and retry ```js title="JavaScript" async function valeron(path, options = {}, attempt = 0) { const response = await fetch(`https://api.valeron.io${path}`, { ...options, headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, ...options.headers }, }); if ((response.status === 429 || response.status === 503) && attempt < 5) { const wait = Number(response.headers.get("Retry-After")) || 2 ** attempt; await new Promise((resolve) => setTimeout(resolve, wait * 1000)); return valeron(path, options, attempt + 1); } return response; } ``` ```python title="Python" import os import time import requests def valeron(method, path, attempt=0, **kwargs): response = requests.request( method, f"https://api.valeron.io{path}", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, **kwargs, ) if response.status_code in (429, 503) and attempt < 5: time.sleep(int(response.headers.get("Retry-After", 2 ** attempt))) return valeron(method, path, attempt + 1, **kwargs) return response ``` ## Staying under the limit - Ask for the most you can per request: `limit=200` on lists. - Sync with `updated_since` so you fetch only what changed. See [Pagination and syncing](/docs/pagination-and-syncing/). - Use [webhooks](/docs/webhooks/) instead of polling. --- URL: https://valeron.io/docs/scopes/ # Scopes A scope lets a key reach one group of routes. Give each key only what it needs. You choose a key's scopes when you create it. A write scope includes its read scope, so `contacts:write` also lets the key read contacts. A key with `["*"]` can reach every public route. A route that needs a scope the key lacks returns `403 missing_scope` and names the scope. ## Scope reference This table is generated from the API reference, so it always matches the routes. | Scope | Routes it allows | |---|---| | `analyses:write` | [`POST /v1/analyses`](/docs/api-reference/analyses/create-analysis/) | | `analytics:read` | [`POST /v1/analytics/query`](/docs/api-reference/analytics/query-analytics/), [`GET /v1/metrics`](/docs/api-reference/analytics/list-metrics/) | | `companies:read` | [`GET /v1/companies`](/docs/api-reference/companies/list-companies/), [`POST /v1/companies/query`](/docs/api-reference/companies/query-companies/), [`GET /v1/companies/{company_id}/people`](/docs/api-reference/companies/list-company-people/), [`GET /v1/companies/{record_id}`](/docs/api-reference/companies/get-companies/), [`GET /v1/companies/{record_id}/history`](/docs/api-reference/companies/history-companies/), [`GET /v1/companies/{record_id}/timeline`](/docs/api-reference/companies/timeline-companies/) | | `companies:write` | [`POST /v1/companies`](/docs/api-reference/companies/create-companies/), [`PATCH /v1/companies/{record_id}`](/docs/api-reference/companies/update-companies/), [`DELETE /v1/companies/{record_id}`](/docs/api-reference/companies/archive-companies/), [`POST /v1/companies/{record_id}/restore`](/docs/api-reference/companies/restore-companies/) | | `contacts:read` | [`GET /v1/contacts`](/docs/api-reference/contacts/list-contacts/), [`POST /v1/contacts/query`](/docs/api-reference/contacts/query-contacts/), [`GET /v1/contacts/{contact_id}/sequence-enrollments`](/docs/api-reference/contacts/list-contact-enrollments/), [`GET /v1/contacts/{record_id}`](/docs/api-reference/contacts/get-contacts/), [`GET /v1/contacts/{record_id}/history`](/docs/api-reference/contacts/history-contacts/), [`GET /v1/contacts/{record_id}/timeline`](/docs/api-reference/contacts/timeline-contacts/) | | `contacts:read companies:read` | [`GET /v1/lists`](/docs/api-reference/lists/list-lists/), [`GET /v1/lists/{list_id}/members`](/docs/api-reference/lists/list-list-members/) | | `contacts:write` | [`POST /v1/contacts`](/docs/api-reference/contacts/create-contacts/), [`POST /v1/contacts/{contact_id}/stage`](/docs/api-reference/contacts/move-contact/), [`PATCH /v1/contacts/{record_id}`](/docs/api-reference/contacts/update-contacts/), [`DELETE /v1/contacts/{record_id}`](/docs/api-reference/contacts/archive-contacts/), [`POST /v1/contacts/{record_id}/restore`](/docs/api-reference/contacts/restore-contacts/) | | `contacts:write companies:write` | [`POST /v1/lists/{list_id}/members`](/docs/api-reference/lists/add-list-members/), [`DELETE /v1/lists/{list_id}/members/{record_id}`](/docs/api-reference/lists/remove-list-member/) | | `meetings:read` | [`GET /v1/calendar`](/docs/api-reference/meetings/get-calendar/), [`GET /v1/meetings`](/docs/api-reference/meetings/list-meetings/), [`POST /v1/meetings/query`](/docs/api-reference/meetings/query-meetings/) | | `messages:read` | [`GET /v1/texting/lines`](/docs/api-reference/messages/list-lines/), [`POST /v1/threads/query`](/docs/api-reference/messages/query-threads/), [`GET /v1/threads/{thread_id}/messages`](/docs/api-reference/messages/list-messages/) | | `messages:write` | [`POST /v1/threads`](/docs/api-reference/messages/create-thread/), [`PATCH /v1/threads/{thread_id}`](/docs/api-reference/messages/update-thread/), [`POST /v1/threads/{thread_id}/messages`](/docs/api-reference/messages/send-message/) | | `notes:read` | [`GET /v1/notes`](/docs/api-reference/notes/list-notes/) | | `notes:write` | [`POST /v1/notes`](/docs/api-reference/notes/create-note/), [`PATCH /v1/notes/{note_id}`](/docs/api-reference/notes/update-note/), [`DELETE /v1/notes/{note_id}`](/docs/api-reference/notes/delete-note/) | | `organization:read` | [`POST /v1/members/query`](/docs/api-reference/organization/query-members/), [`GET /v1/members/{user_id}`](/docs/api-reference/organization/get-member/), [`GET /v1/organization`](/docs/api-reference/organization/get-organization/), [`GET /v1/positions`](/docs/api-reference/organization/list-positions/), [`GET /v1/teams`](/docs/api-reference/organization/list-teams/) | | `payments:read` | [`POST /v1/payments/query`](/docs/api-reference/payments/query-payments/), [`GET /v1/payments/{payment_id}`](/docs/api-reference/payments/get-payment/) | | `payments:write` | [`POST /v1/payments`](/docs/api-reference/payments/log-payment/), [`PATCH /v1/payments/{payment_id}`](/docs/api-reference/payments/update-payment/), [`DELETE /v1/payments/{payment_id}`](/docs/api-reference/payments/delete-payment/) | | `recordings:read` | [`GET /v1/highlights`](/docs/api-reference/recordings/list-highlights/), [`POST /v1/recordings/query`](/docs/api-reference/recordings/query-recordings/), [`GET /v1/recordings/{recording_id}`](/docs/api-reference/recordings/get-recording/), [`GET /v1/recordings/{recording_id}/analysis`](/docs/api-reference/recordings/get-analysis/), [`GET /v1/recordings/{recording_id}/media`](/docs/api-reference/recordings/get-media/), [`GET /v1/recordings/{recording_id}/transcript`](/docs/api-reference/recordings/get-transcript/) | | `recordings:write` | [`PATCH /v1/recordings/{recording_id}`](/docs/api-reference/recordings/update-recording/), [`POST /v1/recordings/{recording_id}/reanalyze`](/docs/api-reference/recordings/reanalyze/), [`PATCH /v1/recordings/{recording_id}/transcript`](/docs/api-reference/recordings/edit-transcript/) | | `schema:read` | [`GET /v1/call-outcomes`](/docs/api-reference/fields-and-pipelines/list-outcomes/), [`GET /v1/call-types`](/docs/api-reference/fields-and-pipelines/list-call-types/), [`GET /v1/fields`](/docs/api-reference/fields-and-pipelines/list-fields/), [`GET /v1/picklists`](/docs/api-reference/fields-and-pipelines/list-picklists/), [`GET /v1/pipelines`](/docs/api-reference/fields-and-pipelines/list-pipelines/), [`GET /v1/tags`](/docs/api-reference/fields-and-pipelines/list-tags/) | | `schema:write` | [`POST /v1/call-outcomes`](/docs/api-reference/fields-and-pipelines/add-outcome/), [`PUT /v1/call-outcomes/order`](/docs/api-reference/fields-and-pipelines/order-outcomes/), [`PATCH /v1/call-outcomes/{key}`](/docs/api-reference/fields-and-pipelines/change-outcome/), [`POST /v1/call-types`](/docs/api-reference/fields-and-pipelines/add-call-type/), [`PUT /v1/call-types/order`](/docs/api-reference/fields-and-pipelines/order-call-types/), [`PATCH /v1/call-types/{key}`](/docs/api-reference/fields-and-pipelines/change-call-type/), [`POST /v1/fields`](/docs/api-reference/fields-and-pipelines/create-field/), [`PUT /v1/fields/order`](/docs/api-reference/fields-and-pipelines/order-fields/), [`PATCH /v1/fields/{field_id}`](/docs/api-reference/fields-and-pipelines/update-field/), [`DELETE /v1/fields/{field_id}`](/docs/api-reference/fields-and-pipelines/delete-field/), [`POST /v1/picklists`](/docs/api-reference/fields-and-pipelines/create-picklist/), [`PATCH /v1/picklists/{picklist_id}`](/docs/api-reference/fields-and-pipelines/update-picklist/), [`DELETE /v1/picklists/{picklist_id}`](/docs/api-reference/fields-and-pipelines/delete-picklist/), [`POST /v1/pipelines`](/docs/api-reference/fields-and-pipelines/create-pipeline/), [`PATCH /v1/pipelines/{pipeline_id}`](/docs/api-reference/fields-and-pipelines/update-pipeline/), [`DELETE /v1/pipelines/{pipeline_id}`](/docs/api-reference/fields-and-pipelines/delete-pipeline/), [`PATCH /v1/tags/{name}`](/docs/api-reference/fields-and-pipelines/update-tag/) | | `tasks:read` | [`POST /v1/tasks/query`](/docs/api-reference/tasks/query-tasks/) | | `tasks:write` | [`POST /v1/tasks`](/docs/api-reference/tasks/create-task/), [`POST /v1/tasks/bulk`](/docs/api-reference/tasks/bulk-tasks/), [`PATCH /v1/tasks/{task_id}`](/docs/api-reference/tasks/update-task/) | | `webhooks:read` | [`GET /v1/webhook-endpoints`](/docs/api-reference/webhooks/list-webhook-endpoints/), [`GET /v1/webhook-endpoints/{endpoint_id}/deliveries`](/docs/api-reference/webhooks/list-webhook-deliveries/) | | `webhooks:write` | [`POST /v1/webhook-deliveries/{delivery_id}/retry`](/docs/api-reference/webhooks/retry-webhook-delivery/), [`POST /v1/webhook-endpoints`](/docs/api-reference/webhooks/create-webhook-endpoint/), [`PATCH /v1/webhook-endpoints/{endpoint_id}`](/docs/api-reference/webhooks/update-webhook-endpoint/), [`DELETE /v1/webhook-endpoints/{endpoint_id}`](/docs/api-reference/webhooks/delete-webhook-endpoint/), [`POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret`](/docs/api-reference/webhooks/rotate-webhook-secret/), [`POST /v1/webhook-endpoints/{endpoint_id}/test`](/docs/api-reference/webhooks/test-webhook-endpoint/) | ## Choosing scopes | You want to | Scopes | |---|---| | Sync contacts and companies into your CRM | `contacts:read`, `companies:read`, `schema:read` | | Write changes back to Valeron | `contacts:write`, `companies:write` | | Send calls for analysis and read the results | `analyses:write`, `recordings:read` | | Manage webhook endpoints from code | `webhooks:read`, `webhooks:write` | Create one key per integration. If one is ever exposed, you revoke that key and nothing else stops. --- URL: https://valeron.io/docs/webhooks/delivery/ # Delivery and retries How Valeron retries a failed delivery, what order to expect, and when an endpoint is switched off. ## Success A delivery succeeds when your server answers with a `2xx` status within 10 seconds. Any other status, a timeout or a connection error is a failure. ## Retries Each delivery gets up to 8 attempts over about 24 hours: one right away, then 1 minute, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 24 hours after the event. Redirects are not followed, and an address that resolves to a private network is refused. A test `ping` is sent once and never retried. A manual retry is sent at once; if it fails, the delivery carries on with its schedule while attempts remain. ## Delivery log Valeron keeps every attempt for 30 days. List them with `GET /v1/webhook-endpoints/{endpoint_id}/deliveries`, and send one again with `POST /v1/webhook-deliveries/{delivery_id}/retry`. ```bash title="cURL" curl "https://api.valeron.io/v1/webhook-endpoints/whe_01JEX5A2K4/deliveries?limit=20" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ## Ordering and repeats Order is **not guaranteed**, and the same event can arrive more than once. Build your receiver for that: - Store the event `id` and ignore an event you have already handled. - Compare the object's `updated_at` with what you hold, and ignore a state that is older than yours. - When in doubt, fetch the object from the API: it is the source of truth. ## When an endpoint is switched off If every delivery to an endpoint has failed for 3 days, Valeron switches it off. The endpoint shows `is_enabled: false` and a `disabled_reason`, and the Owner is notified. Deliveries due to it wait, and go out once you fix your receiver and turn it back on. Retrying a delivery while the endpoint is off is `409 endpoint_disabled`. ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/webhook-endpoints/whe_01JEX5A2K4" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{"is_enabled": true}' ``` After a gap, run an `updated_since` sync to catch what you missed. See [Pagination and syncing](/docs/pagination-and-syncing/). --- URL: https://valeron.io/docs/webhooks/events/ # Events The events Valeron can send, and what each one carries. Pick the events an endpoint receives when you create it, or use `["*"]` for all of them. Every event uses the same envelope: `id`, `type`, `created_at`, `organization_id` and `data`. See [Webhooks](/docs/webhooks/). | Event | When it is sent | `data` | |---|---|---| | `recording.analyzed` | The analysis of a call with a contact is stored, including calls you sent to `POST /v1/analyses`. | `recording`, `analysis` and `contact`, plus `score` (0 to 100), `is_next_step_secured` and `objection_count`. | | `contact.created` | A contact is created by any route: the app, the API, an import, a CRM sync or `POST /v1/analyses`. Matches and merges raise nothing. | `contact` and `source` (`manual`, `api`, `import` or the CRM's key). | | `contact.updated` | A contact's fields, emails, phones, owner, tags or stage change. Changes are combined: at most one event per contact each minute. Not sent for the creation itself. | `contact` and `changed_fields` (field keys). | | `contact.stage_changed` | A contact moves to another pipeline stage. | `contact`, `from_stage` (null when it had none), `to_stage` and `to_stage_type`. | | `meeting.booked` | A meeting with a contact appears on a member's connected calendar. | `contact`, `title` and `starts_at`. | | `message.received` | A contact sends a text or an email. | `contact`, `channel` (`sms` or `email`) and `body`. | | `payment.succeeded` | A payment from a contact is first collected (Stripe, Whop, Commas or a manual payment). Once per payment. | `payment` and `contact` (null when the payment has no contact). | | `ping` | You call `POST /v1/webhook-endpoints/{endpoint_id}/test`. Never retried. | `endpoint_id`. | `contact` has the same shape as `GET /v1/contacts/{record_id}`, `payment` as `GET /v1/payments/{payment_id}`, `recording` as `GET /v1/recordings/{recording_id}` and `analysis` as `GET /v1/recordings/{recording_id}/analysis` (the latest version), as they are when the delivery is made. ## Example: recording.analyzed ```json { "id": "evt_01JEX5B6Z9", "type": "recording.analyzed", "created_at": "2026-12-03T14:31:02Z", "organization_id": "org_01JEX1A4C7", "data": { "score": 78, "is_next_step_secured": true, "objection_count": 2, "recording": { "id": "rec_01JEX4S9M8", "title": "Discovery call with Jordan Rivera" }, "analysis": { "summary": "Jordan wants to replace their spreadsheet pipeline before Q1." }, "contact": { "id": "ct_01JEX3QW2B", "updated_at": "2026-12-03T14:30:58Z" } } } ``` The objects are shortened here. For their full shape, read [Get a recording](/docs/api-reference/recordings/get-recording/) and [Get an analysis](/docs/api-reference/recordings/get-analysis/). ## Events are not a log Events can arrive more than once and out of order. Read [Delivery and retries](/docs/webhooks/delivery/) before you build on them. --- URL: https://valeron.io/docs/webhooks/verify-signatures/ # Verify signatures Check that every delivery really came from Valeron before you trust it. Anyone can send a request to your webhook URL. Valeron signs each delivery with your endpoint's secret (`whsec_…`) so you can tell its requests from anyone else's. ## The signature header Every delivery has a `Valeron-Signature` header: ```http Valeron-Signature: t=1796308262,v1=5f1c0e9b8a7d6c5b4a3928170615243342516071809a0b1c2d3e4f5061728394 ``` - `t` is a Unix time in seconds. - `v1` is the hex HMAC-SHA256 of the string `.`, using the endpoint's signing secret as the key. `` is the **raw request body**, exactly as received. ## Steps 1. Read the raw body as text. Do not parse and re-serialize the JSON: that changes the bytes and the signature will not match. 2. Split the header on `,` and read `t` and `v1`. 3. Compute the HMAC-SHA256 of `t + "." + body` with your secret and compare it with `v1` in constant time. 4. Reject the request with `400` when they differ. The timestamp lets you reject replays. Retries can arrive hours after the event, so if you check it, keep the window wide, or skip it and ignore repeats by event `id` instead. ## Node.js ```js title="Node.js" import crypto from "node:crypto"; import express from "express"; const app = express(); function verifyValeronSignature(rawBody, header, secret) { const parts = Object.fromEntries( String(header ?? "").split(",").map((part) => part.trim().split("=")), ); if (!parts.t || !parts.v1) return false; const expected = crypto .createHmac("sha256", secret) .update(`${parts.t}.${rawBody}`) .digest("hex"); const given = Buffer.from(parts.v1, "hex"); const wanted = Buffer.from(expected, "hex"); return given.length === wanted.length && crypto.timingSafeEqual(given, wanted); } // express.raw keeps the body exactly as it arrived. app.post("/hooks/valeron", express.raw({ type: "application/json" }), (req, res) => { const rawBody = req.body.toString("utf8"); if (!verifyValeronSignature(rawBody, req.get("Valeron-Signature"), process.env.VALERON_WEBHOOK_SECRET)) { return res.status(400).send("Invalid signature"); } const event = JSON.parse(rawBody); queueForProcessing(event); // do the slow work after you respond res.sendStatus(200); }); ``` ## Python ```python title="Python" import hashlib import hmac import os from flask import Flask, abort, request app = Flask(__name__) def verify_valeron_signature(raw_body: bytes, header: str, secret: str) -> bool: parts = dict(part.strip().split("=", 1) for part in (header or "").split(",") if "=" in part) if "t" not in parts or "v1" not in parts: return False signed = f"{parts['t']}.".encode() + raw_body expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, parts["v1"]) @app.post("/hooks/valeron") def valeron_hook(): raw_body = request.get_data() # the exact bytes Valeron sent if not verify_valeron_signature(raw_body, request.headers.get("Valeron-Signature"), os.environ["VALERON_WEBHOOK_SECRET"]): abort(400) event = request.get_json(force=True) queue_for_processing(event) # do the slow work after you respond return "", 200 ``` ## Test it Call `POST /v1/webhook-endpoints/{endpoint_id}/test`. Valeron sends a signed `ping` to your URL. If verification fails, check that you use the secret of that endpoint, and that your framework hands you the raw body. If a secret leaks, call `POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret` and update your receiver. --- URL: https://valeron.io/docs/webhooks/ # Webhooks Valeron calls your server when something happens, so you do not have to poll. An outgoing webhook is an HTTPS request Valeron sends to a URL you choose when an event happens, such as a call being analyzed. ## Set up an endpoint You can manage endpoints in [Settings › Developers](https://app.valeron.io/settings/developers) as the Owner, or with the API using a key that has `webhooks:write`. An organization can have up to 10 endpoints. ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/webhook-endpoints" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://crm.example.com/hooks/valeron", "events": ["recording.analyzed"], "description": "Production CRM" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-endpoints", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ url: "https://crm.example.com/hooks/valeron", events: ["recording.analyzed"], description: "Production CRM", }), }); const endpoint = await response.json(); console.log(endpoint.secret); // whsec_… shown once ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/webhook-endpoints", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "url": "https://crm.example.com/hooks/valeron", "events": ["recording.analyzed"], "description": "Production CRM", }, ) response.raise_for_status() print(response.json()["secret"]) # whsec_… shown once ``` The URL must be HTTPS. The response includes the signing secret, `whsec_…`, **once**. Store it now, because you need it to [verify signatures](/docs/webhooks/verify-signatures/). To replace a secret, call `POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret`. An endpoint lists the event types it wants, or `["*"]` for all of them. See [Events](/docs/webhooks/events/). ## Send a test event `POST /v1/webhook-endpoints/{endpoint_id}/test` sends a `ping` event to the endpoint, so you can check your receiver and your signature code before real events arrive. ## What a delivery looks like Valeron sends a `POST` with a JSON body: ```json { "id": "evt_01JEX5B6Z9", "type": "recording.analyzed", "created_at": "2026-12-03T14:31:02Z", "organization_id": "org_01JEX1A4C7", "data": { "id": "rec_01JEX4S9M8", "object": "recordings" } } ``` | Field | Meaning | |---|---| | `id` | The event ID. A repeat of the same event has the same ID. | | `type` | The event type. | | `created_at` | When the event happened. | | `organization_id` | Your organization. | | `data` | The object the event is about, in the same shape its `GET` route returns (a contact, a recording with its analysis, and so on), as it is at the moment of delivery. | The example above shortens `data` to two fields. In a real delivery it is the full object. ## Headers | Header | Value | |---|---| | `Valeron-Event-Id` | The same as `id` in the body. | | `Valeron-Event-Type` | The same as `type` in the body. | | `Valeron-Signature` | `t=,v1=`. See [Verify signatures](/docs/webhooks/verify-signatures/). | ## Respond quickly Answer with any `2xx` status within 10 seconds. Do the slow work after you respond: put the event on a queue and acknowledge it. Anything else, or no answer in time, is a failure and Valeron retries it. See [Delivery and retries](/docs/webhooks/delivery/). ## Related API routes - [List webhook endpoints](/docs/api-reference/webhooks/list-webhook-endpoints/) - [Create a webhook endpoint](/docs/api-reference/webhooks/create-webhook-endpoint/) - [Update a webhook endpoint](/docs/api-reference/webhooks/update-webhook-endpoint/) - [List deliveries](/docs/api-reference/webhooks/list-webhook-deliveries/) - [Retry a delivery](/docs/api-reference/webhooks/retry-webhook-delivery/) --- URL: https://valeron.io/docs/api-reference/ # API reference Every public route, with its scope, parameters and examples. The Valeron API is a JSON REST API. Every route is under one base URL and needs an API key. ```text https://api.valeron.io/v1 ``` Send the key as `Authorization: Bearer vk_live_…`. Each route below lists the [scope](/docs/scopes/) it needs. See [Authentication](/docs/authentication/) to create a key, and [Errors](/docs/errors/) for the error shape. The routes are also available as an OpenAPI 3.1 file: [`/docs/openapi.json`](/docs/openapi.json). ## Groups | Group | What it covers | Routes | |---|---|---| | [Organization](/docs/api-reference/organization/) | The organization, its teams, positions and members. | 5 | | [Contacts](/docs/api-reference/contacts/) | People, with every field, their history and timeline. | 11 | | [Companies](/docs/api-reference/companies/) | Companies, with every field, their people and history. | 10 | | [Lists](/docs/api-reference/lists/) | Lists of contacts or companies and who is on them. | 4 | | [Fields and pipelines](/docs/api-reference/fields-and-pipelines/) | Pipelines and stages, fields, picklists, tags, call types and call outcomes. | 23 | | [Recordings](/docs/api-reference/recordings/) | Recorded calls, their transcripts and their analyses. | 9 | | [Analyses](/docs/api-reference/analyses/) | Send calls Valeron did not record to the analysis. | 1 | | [Meetings](/docs/api-reference/meetings/) | Booked meetings and the calendar. | 3 | | [Tasks](/docs/api-reference/tasks/) | Tasks, including the next steps the analysis finds. | 4 | | [Notes](/docs/api-reference/notes/) | Notes on contacts and companies. | 4 | | [Messages](/docs/api-reference/messages/) | Text and email conversations with contacts. | 6 | | [Payments](/docs/api-reference/payments/) | Payments from contacts, including manual ones. | 5 | | [Analytics](/docs/api-reference/analytics/) | Metrics and their values. | 2 | | [Webhooks](/docs/api-reference/webhooks/) | Webhook endpoints, their deliveries, and the events they receive. | 8 | --- URL: https://valeron.io/docs/api-reference/organization/ # Organization The organization, its teams, positions and members. The organization, its teams, positions and members. | Method | Path | What it does | Scope | |---|---|---|---| | `POST` | `/v1/members/query` | [Query members](/docs/api-reference/organization/query-members/) | `organization:read` | | `GET` | `/v1/members/{user_id}` | [Get a member](/docs/api-reference/organization/get-member/) | `organization:read` | | `GET` | `/v1/organization` | [Get the organization](/docs/api-reference/organization/get-organization/) | `organization:read` | | `GET` | `/v1/positions` | [List positions](/docs/api-reference/organization/list-positions/) | `organization:read` | | `GET` | `/v1/teams` | [List teams](/docs/api-reference/organization/list-teams/) | `organization:read` | --- URL: https://valeron.io/docs/api-reference/contacts/ # Contacts People, with every field, their history and timeline. People, with every field, their history and timeline. | Method | Path | What it does | Scope | |---|---|---|---| | `GET` | `/v1/contacts` | [List contacts](/docs/api-reference/contacts/list-contacts/) | `contacts:read` | | `POST` | `/v1/contacts` | [Create a contact](/docs/api-reference/contacts/create-contacts/) | `contacts:write` | | `POST` | `/v1/contacts/query` | [Query contacts](/docs/api-reference/contacts/query-contacts/) | `contacts:read` | | `GET` | `/v1/contacts/{contact_id}/sequence-enrollments` | [List a contact's sequence enrollments](/docs/api-reference/contacts/list-contact-enrollments/) | `contacts:read` | | `POST` | `/v1/contacts/{contact_id}/stage` | [Move a contact to a stage](/docs/api-reference/contacts/move-contact/) | `contacts:write` | | `GET` | `/v1/contacts/{record_id}` | [Get a contact](/docs/api-reference/contacts/get-contacts/) | `contacts:read` | | `PATCH` | `/v1/contacts/{record_id}` | [Update a contact](/docs/api-reference/contacts/update-contacts/) | `contacts:write` | | `DELETE` | `/v1/contacts/{record_id}` | [Archive a contact](/docs/api-reference/contacts/archive-contacts/) | `contacts:write` | | `GET` | `/v1/contacts/{record_id}/history` | [List a contact's history](/docs/api-reference/contacts/history-contacts/) | `contacts:read` | | `POST` | `/v1/contacts/{record_id}/restore` | [Restore a contact](/docs/api-reference/contacts/restore-contacts/) | `contacts:write` | | `GET` | `/v1/contacts/{record_id}/timeline` | [List a contact's timeline](/docs/api-reference/contacts/timeline-contacts/) | `contacts:read` | --- URL: https://valeron.io/docs/api-reference/companies/ # Companies Companies, with every field, their people and history. Companies, with every field, their people and history. | Method | Path | What it does | Scope | |---|---|---|---| | `GET` | `/v1/companies` | [List companies](/docs/api-reference/companies/list-companies/) | `companies:read` | | `POST` | `/v1/companies` | [Create a company](/docs/api-reference/companies/create-companies/) | `companies:write` | | `POST` | `/v1/companies/query` | [Query companies](/docs/api-reference/companies/query-companies/) | `companies:read` | | `GET` | `/v1/companies/{company_id}/people` | [List a company's people](/docs/api-reference/companies/list-company-people/) | `companies:read` | | `GET` | `/v1/companies/{record_id}` | [Get a company](/docs/api-reference/companies/get-companies/) | `companies:read` | | `PATCH` | `/v1/companies/{record_id}` | [Update a company](/docs/api-reference/companies/update-companies/) | `companies:write` | | `DELETE` | `/v1/companies/{record_id}` | [Archive a company](/docs/api-reference/companies/archive-companies/) | `companies:write` | | `GET` | `/v1/companies/{record_id}/history` | [List a company's history](/docs/api-reference/companies/history-companies/) | `companies:read` | | `POST` | `/v1/companies/{record_id}/restore` | [Restore a company](/docs/api-reference/companies/restore-companies/) | `companies:write` | | `GET` | `/v1/companies/{record_id}/timeline` | [List a company's timeline](/docs/api-reference/companies/timeline-companies/) | `companies:read` | --- URL: https://valeron.io/docs/api-reference/lists/ # Lists Lists of contacts or companies and who is on them. Lists of contacts or companies and who is on them. | Method | Path | What it does | Scope | |---|---|---|---| | `GET` | `/v1/lists` | [List lists](/docs/api-reference/lists/list-lists/) | `contacts:read companies:read` | | `GET` | `/v1/lists/{list_id}/members` | [List the records in a list](/docs/api-reference/lists/list-list-members/) | `contacts:read companies:read` | | `POST` | `/v1/lists/{list_id}/members` | [Add records to a list](/docs/api-reference/lists/add-list-members/) | `contacts:write companies:write` | | `DELETE` | `/v1/lists/{list_id}/members/{record_id}` | [Take a record off a list](/docs/api-reference/lists/remove-list-member/) | `contacts:write companies:write` | --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/ # Fields and pipelines Pipelines and stages, fields, picklists, tags, call types and call outcomes. Pipelines and stages, fields, picklists, tags, call types and call outcomes. | Method | Path | What it does | Scope | |---|---|---|---| | `GET` | `/v1/call-outcomes` | [List call outcomes](/docs/api-reference/fields-and-pipelines/list-outcomes/) | `schema:read` | | `POST` | `/v1/call-outcomes` | [Add a call outcome](/docs/api-reference/fields-and-pipelines/add-outcome/) | `schema:write` | | `PUT` | `/v1/call-outcomes/order` | [Order call outcomes](/docs/api-reference/fields-and-pipelines/order-outcomes/) | `schema:write` | | `PATCH` | `/v1/call-outcomes/{key}` | [Update a call outcome](/docs/api-reference/fields-and-pipelines/change-outcome/) | `schema:write` | | `GET` | `/v1/call-types` | [List call types](/docs/api-reference/fields-and-pipelines/list-call-types/) | `schema:read` | | `POST` | `/v1/call-types` | [Add a call type](/docs/api-reference/fields-and-pipelines/add-call-type/) | `schema:write` | | `PUT` | `/v1/call-types/order` | [Order call types](/docs/api-reference/fields-and-pipelines/order-call-types/) | `schema:write` | | `PATCH` | `/v1/call-types/{key}` | [Update a call type](/docs/api-reference/fields-and-pipelines/change-call-type/) | `schema:write` | | `GET` | `/v1/fields` | [List fields](/docs/api-reference/fields-and-pipelines/list-fields/) | `schema:read` | | `POST` | `/v1/fields` | [Create a field](/docs/api-reference/fields-and-pipelines/create-field/) | `schema:write` | | `PUT` | `/v1/fields/order` | [Order fields](/docs/api-reference/fields-and-pipelines/order-fields/) | `schema:write` | | `PATCH` | `/v1/fields/{field_id}` | [Update a field](/docs/api-reference/fields-and-pipelines/update-field/) | `schema:write` | | `DELETE` | `/v1/fields/{field_id}` | [Archive a field](/docs/api-reference/fields-and-pipelines/delete-field/) | `schema:write` | | `GET` | `/v1/picklists` | [List picklists](/docs/api-reference/fields-and-pipelines/list-picklists/) | `schema:read` | | `POST` | `/v1/picklists` | [Create a picklist](/docs/api-reference/fields-and-pipelines/create-picklist/) | `schema:write` | | `PATCH` | `/v1/picklists/{picklist_id}` | [Update a picklist](/docs/api-reference/fields-and-pipelines/update-picklist/) | `schema:write` | | `DELETE` | `/v1/picklists/{picklist_id}` | [Delete a picklist](/docs/api-reference/fields-and-pipelines/delete-picklist/) | `schema:write` | | `GET` | `/v1/pipelines` | [List pipelines](/docs/api-reference/fields-and-pipelines/list-pipelines/) | `schema:read` | | `POST` | `/v1/pipelines` | [Create a pipeline](/docs/api-reference/fields-and-pipelines/create-pipeline/) | `schema:write` | | `PATCH` | `/v1/pipelines/{pipeline_id}` | [Update a pipeline](/docs/api-reference/fields-and-pipelines/update-pipeline/) | `schema:write` | | `DELETE` | `/v1/pipelines/{pipeline_id}` | [Delete a pipeline](/docs/api-reference/fields-and-pipelines/delete-pipeline/) | `schema:write` | | `GET` | `/v1/tags` | [List tags](/docs/api-reference/fields-and-pipelines/list-tags/) | `schema:read` | | `PATCH` | `/v1/tags/{name}` | [Update a tag](/docs/api-reference/fields-and-pipelines/update-tag/) | `schema:write` | --- URL: https://valeron.io/docs/api-reference/recordings/ # Recordings Recorded calls, their transcripts and their analyses. Recorded calls, their transcripts and their analyses. | Method | Path | What it does | Scope | |---|---|---|---| | `GET` | `/v1/highlights` | [List highlights](/docs/api-reference/recordings/list-highlights/) | `recordings:read` | | `POST` | `/v1/recordings/query` | [Query recordings](/docs/api-reference/recordings/query-recordings/) | `recordings:read` | | `GET` | `/v1/recordings/{recording_id}` | [Get a recording](/docs/api-reference/recordings/get-recording/) | `recordings:read` | | `PATCH` | `/v1/recordings/{recording_id}` | [Update a recording](/docs/api-reference/recordings/update-recording/) | `recordings:write` | | `GET` | `/v1/recordings/{recording_id}/analysis` | [Get an analysis](/docs/api-reference/recordings/get-analysis/) | `recordings:read` | | `GET` | `/v1/recordings/{recording_id}/media` | [Get a media link](/docs/api-reference/recordings/get-media/) | `recordings:read` | | `POST` | `/v1/recordings/{recording_id}/reanalyze` | [Run the analysis again](/docs/api-reference/recordings/reanalyze/) | `recordings:write` | | `GET` | `/v1/recordings/{recording_id}/transcript` | [Get a transcript](/docs/api-reference/recordings/get-transcript/) | `recordings:read` | | `PATCH` | `/v1/recordings/{recording_id}/transcript` | [Correct a transcript](/docs/api-reference/recordings/edit-transcript/) | `recordings:write` | --- URL: https://valeron.io/docs/api-reference/analyses/ # Analyses Send calls Valeron did not record to the analysis. Send calls Valeron did not record to the analysis. | Method | Path | What it does | Scope | |---|---|---|---| | `POST` | `/v1/analyses` | [Send a call to the analysis](/docs/api-reference/analyses/create-analysis/) | `analyses:write` | --- URL: https://valeron.io/docs/api-reference/meetings/ # Meetings Booked meetings and the calendar. Booked meetings and the calendar. | Method | Path | What it does | Scope | |---|---|---|---| | `GET` | `/v1/calendar` | [Get the calendar](/docs/api-reference/meetings/get-calendar/) | `meetings:read` | | `GET` | `/v1/meetings` | [List meetings](/docs/api-reference/meetings/list-meetings/) | `meetings:read` | | `POST` | `/v1/meetings/query` | [Query meetings](/docs/api-reference/meetings/query-meetings/) | `meetings:read` | --- URL: https://valeron.io/docs/api-reference/tasks/ # Tasks Tasks, including the next steps the analysis finds. Tasks, including the next steps the analysis finds. | Method | Path | What it does | Scope | |---|---|---|---| | `POST` | `/v1/tasks` | [Create a task](/docs/api-reference/tasks/create-task/) | `tasks:write` | | `POST` | `/v1/tasks/bulk` | [Update many tasks](/docs/api-reference/tasks/bulk-tasks/) | `tasks:write` | | `POST` | `/v1/tasks/query` | [Query tasks](/docs/api-reference/tasks/query-tasks/) | `tasks:read` | | `PATCH` | `/v1/tasks/{task_id}` | [Update a task](/docs/api-reference/tasks/update-task/) | `tasks:write` | --- URL: https://valeron.io/docs/api-reference/notes/ # Notes Notes on contacts and companies. Notes on contacts and companies. | Method | Path | What it does | Scope | |---|---|---|---| | `GET` | `/v1/notes` | [List notes](/docs/api-reference/notes/list-notes/) | `notes:read` | | `POST` | `/v1/notes` | [Write a note](/docs/api-reference/notes/create-note/) | `notes:write` | | `PATCH` | `/v1/notes/{note_id}` | [Update a note](/docs/api-reference/notes/update-note/) | `notes:write` | | `DELETE` | `/v1/notes/{note_id}` | [Delete a note](/docs/api-reference/notes/delete-note/) | `notes:write` | --- URL: https://valeron.io/docs/api-reference/messages/ # Messages Text and email conversations with contacts. Text and email conversations with contacts. | Method | Path | What it does | Scope | |---|---|---|---| | `GET` | `/v1/texting/lines` | [List texting lines](/docs/api-reference/messages/list-lines/) | `messages:read` | | `POST` | `/v1/threads` | [Message a contact](/docs/api-reference/messages/create-thread/) | `messages:write` | | `POST` | `/v1/threads/query` | [Query conversations](/docs/api-reference/messages/query-threads/) | `messages:read` | | `PATCH` | `/v1/threads/{thread_id}` | [Update a conversation](/docs/api-reference/messages/update-thread/) | `messages:write` | | `GET` | `/v1/threads/{thread_id}/messages` | [List a conversation's messages](/docs/api-reference/messages/list-messages/) | `messages:read` | | `POST` | `/v1/threads/{thread_id}/messages` | [Send a message](/docs/api-reference/messages/send-message/) | `messages:write` | --- URL: https://valeron.io/docs/api-reference/payments/ # Payments Payments from contacts, including manual ones. Payments from contacts, including manual ones. | Method | Path | What it does | Scope | |---|---|---|---| | `POST` | `/v1/payments` | [Log a payment](/docs/api-reference/payments/log-payment/) | `payments:write` | | `POST` | `/v1/payments/query` | [Query payments](/docs/api-reference/payments/query-payments/) | `payments:read` | | `GET` | `/v1/payments/{payment_id}` | [Get a payment](/docs/api-reference/payments/get-payment/) | `payments:read` | | `PATCH` | `/v1/payments/{payment_id}` | [Update a payment](/docs/api-reference/payments/update-payment/) | `payments:write` | | `DELETE` | `/v1/payments/{payment_id}` | [Delete a payment](/docs/api-reference/payments/delete-payment/) | `payments:write` | --- URL: https://valeron.io/docs/api-reference/analytics/ # Analytics Metrics and their values. Metrics and their values. | Method | Path | What it does | Scope | |---|---|---|---| | `POST` | `/v1/analytics/query` | [Query analytics](/docs/api-reference/analytics/query-analytics/) | `analytics:read` | | `GET` | `/v1/metrics` | [List metrics](/docs/api-reference/analytics/list-metrics/) | `analytics:read` | --- URL: https://valeron.io/docs/api-reference/webhooks/ # Webhooks Webhook endpoints, their deliveries, and the events they receive. Webhook endpoints, their deliveries, and the events they receive. | Method | Path | What it does | Scope | |---|---|---|---| | `POST` | `/v1/webhook-deliveries/{delivery_id}/retry` | [Retry a delivery](/docs/api-reference/webhooks/retry-webhook-delivery/) | `webhooks:write` | | `GET` | `/v1/webhook-endpoints` | [List webhook endpoints](/docs/api-reference/webhooks/list-webhook-endpoints/) | `webhooks:read` | | `POST` | `/v1/webhook-endpoints` | [Create a webhook endpoint](/docs/api-reference/webhooks/create-webhook-endpoint/) | `webhooks:write` | | `PATCH` | `/v1/webhook-endpoints/{endpoint_id}` | [Update a webhook endpoint](/docs/api-reference/webhooks/update-webhook-endpoint/) | `webhooks:write` | | `DELETE` | `/v1/webhook-endpoints/{endpoint_id}` | [Delete a webhook endpoint](/docs/api-reference/webhooks/delete-webhook-endpoint/) | `webhooks:write` | | `GET` | `/v1/webhook-endpoints/{endpoint_id}/deliveries` | [List an endpoint's deliveries](/docs/api-reference/webhooks/list-webhook-deliveries/) | `webhooks:read` | | `POST` | `/v1/webhook-endpoints/{endpoint_id}/rotate-secret` | [Rotate a signing secret](/docs/api-reference/webhooks/rotate-webhook-secret/) | `webhooks:write` | | `POST` | `/v1/webhook-endpoints/{endpoint_id}/test` | [Send a test ping](/docs/api-reference/webhooks/test-webhook-endpoint/) | `webhooks:write` | --- URL: https://valeron.io/docs/api-reference/analyses/create-analysis/ # Send a call to the analysis `POST /v1/analyses` Required scope: `analyses:write` Store a call Valeron did not record, from its transcript, and analyze it like any recording. `external_id` is your own ID for the call: sending it again returns the first recording with a 200 and charges nothing more. The call's minutes are `duration_seconds`, or else the last segment's `end_seconds`; with neither the answer is `422 duration_required`. The analysis costs $0.014 per started minute, charged when it is stored; the request is refused with `402 insufficient_balance` when the balance can't cover the whole call. The answer is a 202 with the recording's ID: fetch the result from `GET /v1/recordings/{id}/analysis`, or wait for the `recording.analyzed` webhook event. ## Request body (application/json) - `contact` (object or null, optional): The contact the call was with: `id`, or an `email` and/or `phone` matched like any contact. `first_name` and `last_name` are used only when `create_contact` makes it. - `email` (string or null, optional) - `first_name` (string or null, optional) - `id` (string or null, optional) - `last_name` (string or null, optional) - `phone` (string or null, optional) - `create_contact` (boolean, optional) Default: `false`. - `duration_seconds` (integer or null, optional) - `external_id` (string, required) - `member` (string, required) - `participants` (object[], optional) Default: `[]`. - `email` (string or null, optional) - `is_member` (boolean, required) - `name` (string, required) - `phone` (string or null, optional) - `started_at` (string (date-time), required) - `title` (string or null, optional) - `transcript` (object[], required) - `end_seconds` (number or null, optional) - `is_member` (boolean or null, optional) - `speaker` (string, required) - `start_seconds` (number or null, optional) - `text` (string, required) - `type` (string, optional) Allowed values: `"meeting"`, `"phone_call"`. Default: `"meeting"`. ## Responses - `200`: This `external_id` was sent before: the first recording, and how far its analysis is. Nothing more is charged. - `202`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/analyses" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contact": { "email": "jordan@example.com", "first_name": "Jordan", "id": "rec_01JCRZFXEH", "last_name": "Rivera", "phone": "+14155550132" }, "create_contact": false, "duration_seconds": 1260, "external_id": "rec_01JAHQMWM0", "member": "maya@acme.com", "participants": [ { "email": "jordan@example.com", "is_member": true, "name": "Jordan Rivera", "phone": "+14155550132" } ], "started_at": "2026-12-03T14:30:00Z", "transcript": [ { "end_seconds": 12, "is_member": true, "speaker": "Maya Chen", "start_seconds": 12, "text": "Thanks for your time today. Here is what we agreed." } ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/analyses", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "contact": { "email": "jordan@example.com", "first_name": "Jordan", "id": "rec_01JCRZFXEH", "last_name": "Rivera", "phone": "+14155550132" }, "create_contact": false, "duration_seconds": 1260, "external_id": "rec_01JAHQMWM0", "member": "maya@acme.com", "participants": [ { "email": "jordan@example.com", "is_member": true, "name": "Jordan Rivera", "phone": "+14155550132" } ], "started_at": "2026-12-03T14:30:00Z", "transcript": [ { "end_seconds": 12, "is_member": true, "speaker": "Maya Chen", "start_seconds": 12, "text": "Thanks for your time today. Here is what we agreed." } ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/analyses", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "contact": { "email": "jordan@example.com", "first_name": "Jordan", "id": "rec_01JCRZFXEH", "last_name": "Rivera", "phone": "+14155550132", }, "create_contact": False, "duration_seconds": 1260, "external_id": "rec_01JAHQMWM0", "member": "maya@acme.com", "participants": [ { "email": "jordan@example.com", "is_member": True, "name": "Jordan Rivera", "phone": "+14155550132", }, ], "started_at": "2026-12-03T14:30:00Z", "transcript": [ { "end_seconds": 12, "is_member": True, "speaker": "Maya Chen", "start_seconds": 12, "text": "Thanks for your time today. Here is what we agreed.", }, ], }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "recording_id": "rec_01JR70S5VT", "status": "queued" } ``` ### Response 202 ```json { "recording_id": "rec_01JR70S5VT", "status": "queued" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/analytics/query-analytics/ # Query analytics `POST /v1/analytics/query` Required scope: `analytics:read` Metric values for a period, by member, team or not grouped. Each value comes with its sample size; below a metric's minimum sample it is null with the reason `not_enough_data`. ## Request body (application/json) - `compare_previous` (boolean, optional) Default: `false`. - `filters` (object, required): The days a query covers: a `period`, or a custom range `from` to `to` (both dates included, at most 731 days). - `from` (string (date) or null, optional) - `members` (string[], optional) - `owner` (string or null, optional) - `period` (string or null, optional) Allowed values: `"7d"`, `"30d"`, `"90d"`, `"365d"`, `"all"`. - `positions` (string[], optional) - `teams` (string[], optional) - `to` (string (date) or null, optional) - `group_by` (string or null, optional) Allowed values: `"member"`, `"position"`, `"team"`, `"source"`, `"day"`, `"week"`, `"month"`, `"stage"`, `"category"`. - `metrics` (string[], required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/analytics/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "compare_previous": false, "filters": { "from": "2026-12-03", "members": [ "maya@acme.com" ], "owner": "example", "period": "7d", "positions": [ "example" ], "teams": [ "example" ] }, "group_by": "member", "metrics": [ "example" ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/analytics/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "compare_previous": false, "filters": { "from": "2026-12-03", "members": [ "maya@acme.com" ], "owner": "example", "period": "7d", "positions": [ "example" ], "teams": [ "example" ] }, "group_by": "member", "metrics": [ "example" ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/analytics/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "compare_previous": False, "filters": { "from": "2026-12-03", "members": [ "maya@acme.com", ], "owner": "example", "period": "7d", "positions": [ "example", ], "teams": [ "example", ], }, "group_by": "member", "metrics": [ "example", ], }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "group": { "key": "example_key", "label": "Example" }, "metrics": { "example_key": { "previous": { "reason": null, "sample_size": 1, "unknown_count": 3, "value": 1 }, "reason": null, "sample_size": 1, "unknown_count": 3, "value": 1 } } } ], "group_by": "example", "metrics": [ { "description": "A short description.", "key": "example_key", "label": "Example", "unit": "example" } ], "owner": "example", "period": { "ends_on": "2026-12-03", "label": "Example", "starts_on": "2026-12-03", "time_zone": "America/New_York", "value": "example" }, "previous_period": { "ends_on": "2026-12-03", "label": "Example", "starts_on": "2026-12-03", "time_zone": "America/New_York", "value": "example" } } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/meetings/get-calendar/ # Get the calendar `GET /v1/calendar` Required scope: `meetings:read` Events from every connected calendar and tasks due between `start` and `end` (at most 62 days), in time order. ## Query parameters - `start` (string (date-time), required) - `end` (string (date-time), required) - `owner` (string, optional) Default: `"mine"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/calendar?start=2026-12-03T14%3A30%3A00Z&end=2026-12-03T14%3A30%3A00Z" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/calendar?start=2026-12-03T14%3A30%3A00Z&end=2026-12-03T14%3A30%3A00Z", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/calendar", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "start": "2026-12-03T14:30:00Z", "end": "2026-12-03T14:30:00Z", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "ends_at": "2026-12-03T14:30:00Z", "event": { "attendees": [ { "email": "jordan@example.com", "name": "Jordan Rivera", "response": "example" } ], "calendar_id": "cal_01JN4XEMPV", "contact": { "id": "_01J8FC10VR", "name": "Jordan Rivera" }, "description": "A short description.", "join_url": "example", "location": "example", "provider": { "label": "Example", "value": "example" }, "recorder_status": { "label": "Example", "value": "example" }, "recording_id": "rec_01JR70S5VT" }, "id": "_01J8FC10VR", "is_all_day": true, "kind": "event", "owner": { "id": "_01J8FC10VR", "name": "Jordan Rivera" }, "starts_at": "2026-12-03T14:30:00Z", "task": { "record": { "id": "_01J8FC10VR", "name": "Jordan Rivera", "object": "contacts" }, "status": { "label": "Example", "value": "example" } }, "title": "Discovery call" } ], "has_more": false } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/list-outcomes/ # List call outcomes `GET /v1/call-outcomes` Required scope: `schema:read` The outcomes a call can be given, in display order. ## Query parameters - `include_archived` (boolean, optional) Default: `false`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/call-outcomes" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/call-outcomes", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/call-outcomes", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "is_archived": false, "key": "example_key", "label": "Example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/add-outcome/ # Add a call outcome `POST /v1/call-outcomes` Required scope: `schema:write` Add a call outcome. ## Request body (application/json) - `label` (string, required) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/call-outcomes" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "label": "Example" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/call-outcomes", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "label": "Example" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/call-outcomes", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "label": "Example", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "is_archived": false, "key": "example_key", "label": "Example" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/order-outcomes/ # Order call outcomes `PUT /v1/call-outcomes/order` Required scope: `schema:write` Send every live key once, in the order to show them. ## Request body (application/json) - `keys` (string[], required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PUT "https://api.valeron.io/v1/call-outcomes/order" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "keys": [ "example_key" ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/call-outcomes/order", { method: "PUT", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "keys": [ "example_key" ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.put( "https://api.valeron.io/v1/call-outcomes/order", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "keys": [ "example_key", ], }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "is_archived": false, "key": "example_key", "label": "Example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/change-outcome/ # Update a call outcome `PATCH /v1/call-outcomes/{key}` Required scope: `schema:write` Rename, archive or restore a call outcome. ## Path parameters - `key` (string, required) ## Request body (application/json) - `is_archived` (boolean or null, optional) - `label` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/call-outcomes/example_key" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "is_archived": false, "label": "Example" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/call-outcomes/example_key", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "is_archived": false, "label": "Example" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/call-outcomes/example_key", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "is_archived": False, "label": "Example", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "is_archived": false, "key": "example_key", "label": "Example" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/list-call-types/ # List call types `GET /v1/call-types` Required scope: `schema:read` The call types a call can be given, in display order. ## Query parameters - `include_archived` (boolean, optional) Default: `false`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/call-types" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/call-types", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/call-types", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "is_archived": false, "key": "example_key", "label": "Example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/add-call-type/ # Add a call type `POST /v1/call-types` Required scope: `schema:write` Add a call type. ## Request body (application/json) - `label` (string, required) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/call-types" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "label": "Example" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/call-types", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "label": "Example" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/call-types", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "label": "Example", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "is_archived": false, "key": "example_key", "label": "Example" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/order-call-types/ # Order call types `PUT /v1/call-types/order` Required scope: `schema:write` Send every live key once, in the order to show them. ## Request body (application/json) - `keys` (string[], required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PUT "https://api.valeron.io/v1/call-types/order" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "keys": [ "example_key" ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/call-types/order", { method: "PUT", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "keys": [ "example_key" ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.put( "https://api.valeron.io/v1/call-types/order", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "keys": [ "example_key", ], }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "is_archived": false, "key": "example_key", "label": "Example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/change-call-type/ # Update a call type `PATCH /v1/call-types/{key}` Required scope: `schema:write` Rename, archive or restore a call type. ## Path parameters - `key` (string, required) ## Request body (application/json) - `is_archived` (boolean or null, optional) - `label` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/call-types/example_key" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "is_archived": false, "label": "Example" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/call-types/example_key", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "is_archived": false, "label": "Example" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/call-types/example_key", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "is_archived": False, "label": "Example", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "is_archived": false, "key": "example_key", "label": "Example" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/list-companies/ # List companies `GET /v1/companies` Required scope: `companies:read` Every company with all its fields, newest first. With `updated_since` (an ISO time, inclusive) only the companies changed since then come back, oldest change first, so a sync can fetch what changed since its last run and remember the `updated_at` of the last row. `owner` keeps one member's. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) - `owner` (string or null, optional) - `updated_since` (string (date-time) or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/companies?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/companies", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "co_01JPDT9JQF", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "co_01JPDT9JQF", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/create-companies/ # Create a company `POST /v1/companies` Required scope: `companies:write` Create a company from `fields`. When one with the same domain already exists, the values are added onto it and it comes back with `is_matched: true` and a 200 instead of a 201. Send an `Idempotency-Key` header to make a retry safe. The values are recorded with source `api`. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `fields` (object (values: string | integer | number | boolean | string[] | object), required) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/companies" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fields": { "email": { "amount": 2400000, "currency": "USD" } } }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "fields": { "email": { "amount": 2400000, "currency": "USD" } } }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/companies", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "fields": { "email": { "amount": 2400000, "currency": "USD", }, }, }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "co_01JPDT9JQF", "is_matched": true, "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/query-companies/ # Query companies `POST /v1/companies/query` Required scope: `companies:read` The companies table, filtered, sorted and grouped. The body is a table query: `columns`, `filters` (`{ field, op, value }`), `sort` (up to 5 keys), `group_by`, `cursor` and `limit`. `GET /v1/fields?object=` lists the columns you can ask for, filter, sort and group by. Filter on `updated_at` with `gte` to fetch what changed since a time. ## Request body (application/json) - `columns` (string[] or null, optional) - `cursor` (string or null, optional) - `filters` (object[] or null, optional) - `field` (string, required) - `op` (string, required) Allowed values: `"eq"`, `"neq"`, `"contains"`, `"starts_with"`, `"in"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"is_empty"`, `"is_not_empty"`. - `value` (string | integer | number | boolean | string[] or null, optional): What the field is compared with; a list for `in`. - `group_by` (string or null, optional) - `is_archived` (boolean, optional) Default: `false`. - `limit` (integer, optional) Default: `50`. - `list_id` (string or null, optional) - `offset` (integer or null, optional) - `sort` (object[] or null, optional) - `direction` (string, optional) Allowed values: `"asc"`, `"desc"`. Default: `"asc"`. - `field` (string, required) - `view_id` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/companies/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "is_archived": false, "limit": 50 }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "is_archived": false, "limit": 50 }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/companies/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "columns": [ "example", ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example", }, ], "group_by": "example", "is_archived": False, "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "co_01JPDT9JQF", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "co_01JPDT9JQF", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/list-company-people/ # List a company's people `GET /v1/companies/{company_id}/people` Required scope: `companies:read` The contacts that belong to the company, as a contacts table page. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `company_id` (string, required) ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/companies/co_01JJ4557J4/people?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies/co_01JJ4557J4/people?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/companies/co_01JJ4557J4/people", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "co_01JPDT9JQF", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "co_01JPDT9JQF", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/get-companies/ # Get a company `GET /v1/companies/{record_id}` Required scope: `companies:read` One company with every field: each value, where it came from and whether it has history. ## Path parameters - `record_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/companies/co_01JJYQZGBG" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies/co_01JJYQZGBG", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/companies/co_01JJYQZGBG", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "co_01JPDT9JQF", "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/update-companies/ # Update a company `PATCH /v1/companies/{record_id}` Required scope: `companies:write` Change the fields sent in `fields`; `null` clears one. The change is recorded with source `api` and goes to the connected CRM like any other. ## Path parameters - `record_id` (string, required) ## Request body (application/json) - `fields` (object (values: string | integer | number | boolean | string[] | object), required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/companies/co_01JJYQZGBG" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fields": { "email": { "amount": 2400000, "currency": "USD" } } }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies/co_01JJYQZGBG", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "fields": { "email": { "amount": 2400000, "currency": "USD" } } }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/companies/co_01JJYQZGBG", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "fields": { "email": { "amount": 2400000, "currency": "USD", }, }, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "co_01JPDT9JQF", "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/archive-companies/ # Archive a company `DELETE /v1/companies/{record_id}` Required scope: `companies:write` Archive the company. It can be brought back with the restore route. ## Path parameters - `record_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/companies/co_01JJYQZGBG" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies/co_01JJYQZGBG", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/companies/co_01JJYQZGBG", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/history-companies/ # List a company's history `GET /v1/companies/{record_id}/history` Required scope: `companies:read` Every value each field has had, newest first, with its source (`manual`, `api`, `import`, `ai`, …) and who set it. `field` and `source` narrow it. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `record_id` (string, required) ## Query parameters - `field` (string or null, optional) - `source` (string or null, optional) - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/companies/co_01JJYQZGBG/history?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies/co_01JJYQZGBG/history?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/companies/co_01JJYQZGBG/history", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "actor": { "id": "co_01JPDT9JQF", "name": "Jordan Rivera" }, "field": "example", "id": "co_01JPDT9JQF", "label": "Example", "old_value": { "amount": 2400000, "currency": "USD" }, "origin": { "ai_run_id": "co_01J130041N", "approval_id": "apr_01JF8N4TDJ", "automation_id": "aut_01J2VCPWXA", "event": "example", "external_id": "co_01JW0GTC1C", "import_id": "imp_01J0W1CQFN", "merge_id": "mrg_01J97JCXMN", "merged_from": "example", "message_id": "msg_01J31EX3KK", "object": "example", "payment_id": "pay_01J5M1MJA8", "provider": "example", "quote": "We need this live before the end of the quarter.", "recording_id": "rec_01JR70S5VT", "row": 1, "run_id": "run_01JKBHGW4W" }, "replaced_at": "2026-12-03T14:30:00Z", "seen_at": "2026-12-03T14:30:00Z", "source": { "label": "Example", "value": "example" }, "value": { "amount": 2400000, "currency": "USD" } } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/restore-companies/ # Restore a company `POST /v1/companies/{record_id}/restore` Required scope: `companies:write` Bring back an archived company. ## Path parameters - `record_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/companies/co_01JJYQZGBG/restore" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies/co_01JJYQZGBG/restore", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/companies/co_01JJYQZGBG/restore", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "co_01JPDT9JQF", "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/companies/timeline-companies/ # List a company's timeline `GET /v1/companies/{record_id}/timeline` Required scope: `companies:read` Calls, meetings, messages, tasks, notes, changes and merges on the record, newest first. `types` (repeat it) limits the kinds. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `record_id` (string, required) ## Query parameters - `types` (string[] or null, optional) Allowed values: `"note"`, `"change"`, `"merge"`, `"call"`, `"meeting"`, `"message"`, `"task_created"`, `"task_completed"`. - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/companies/co_01JJYQZGBG/timeline?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/companies/co_01JJYQZGBG/timeline?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/companies/co_01JJYQZGBG/timeline", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "at": "2026-12-03T14:30:00Z", "data": { "actor_id": "co_01JWZ6FGMN", "body": "Thanks for your time today. Here is what we agreed.", "source": "example" }, "id": "co_01JPDT9JQF", "kind": "note", "object": "contacts", "record_id": "co_01JJYQZGBG", "record_name": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/list-contacts/ # List contacts `GET /v1/contacts` Required scope: `contacts:read` Every contact with all its fields, newest first. With `updated_since` (an ISO time, inclusive) only the contacts changed since then come back, oldest change first, so a sync can fetch what changed since its last run and remember the `updated_at` of the last row. `owner` keeps one member's. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) - `owner` (string or null, optional) - `updated_since` (string (date-time) or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/contacts?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/contacts", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "ct_01J59XB017", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "ct_01J59XB017", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/create-contacts/ # Create a contact `POST /v1/contacts` Required scope: `contacts:write` Create a contact from `fields`. When one with the same email address or phone number already exists, the values are added onto it and it comes back with `is_matched: true` and a 200 instead of a 201. Send an `Idempotency-Key` header to make a retry safe. The values are recorded with source `api`. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `fields` (object (values: string | integer | number | boolean | string[] | object), required) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/contacts" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fields": { "email": { "amount": 2400000, "currency": "USD" } } }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "fields": { "email": { "amount": 2400000, "currency": "USD" } } }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/contacts", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "fields": { "email": { "amount": 2400000, "currency": "USD", }, }, }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "ct_01J59XB017", "is_matched": true, "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/query-contacts/ # Query contacts `POST /v1/contacts/query` Required scope: `contacts:read` The contacts table, filtered, sorted and grouped. The body is a table query: `columns`, `filters` (`{ field, op, value }`), `sort` (up to 5 keys), `group_by`, `cursor` and `limit`. `GET /v1/fields?object=` lists the columns you can ask for, filter, sort and group by. Filter on `updated_at` with `gte` to fetch what changed since a time. ## Request body (application/json) - `columns` (string[] or null, optional) - `cursor` (string or null, optional) - `filters` (object[] or null, optional) - `field` (string, required) - `op` (string, required) Allowed values: `"eq"`, `"neq"`, `"contains"`, `"starts_with"`, `"in"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"is_empty"`, `"is_not_empty"`. - `value` (string | integer | number | boolean | string[] or null, optional): What the field is compared with; a list for `in`. - `group_by` (string or null, optional) - `is_archived` (boolean, optional) Default: `false`. - `limit` (integer, optional) Default: `50`. - `list_id` (string or null, optional) - `offset` (integer or null, optional) - `sort` (object[] or null, optional) - `direction` (string, optional) Allowed values: `"asc"`, `"desc"`. Default: `"asc"`. - `field` (string, required) - `view_id` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/contacts/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "is_archived": false, "limit": 50 }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "is_archived": false, "limit": 50 }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/contacts/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "columns": [ "example", ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example", }, ], "group_by": "example", "is_archived": False, "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "ct_01J59XB017", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "ct_01J59XB017", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/list-contact-enrollments/ # List a contact's sequence enrollments `GET /v1/contacts/{contact_id}/sequence-enrollments` Required scope: `contacts:read` Every sequence the contact is in or has been in, newest first. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `contact_id` (string, required) ## Query parameters - `status` (string or null, optional) - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/contacts/ct_01JCH8XFQH/sequence-enrollments?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/ct_01JCH8XFQH/sequence-enrollments?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/contacts/ct_01JCH8XFQH/sequence-enrollments", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "contact_id": "ct_01JCH8XFQH", "contact_name": "example", "created_at": "2026-12-03T14:30:00Z", "enrolled_by": "example", "error": null, "finished_at": "2026-12-03T14:30:00Z", "id": "ct_01J59XB017", "line_id": "lin_01JCP6WF0H", "mailbox_id": "mbx_01JRJX4977", "next_due_at": "2026-12-03T14:30:00Z", "next_position": 1, "sequence_id": "ct_01JD1XA0MV", "sequence_name": "example", "status": { "label": "Example", "value": "example" }, "steps_sent": 1, "stop_reason": { "label": "Example", "value": "example" } } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/move-contact/ # Move a contact to a stage `POST /v1/contacts/{contact_id}/stage` Required scope: `contacts:write` Put the contact in a stage of a pipeline; `stage_id: null` takes it out of its pipeline. Raises the `contact.stage_changed` webhook event. ## Path parameters - `contact_id` (string, required) ## Request body (application/json) - `stage_id` (string or null, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/contacts/ct_01JCH8XFQH/stage" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "stage_id": "stg_01JFBXNN3J" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/ct_01JCH8XFQH/stage", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "stage_id": "stg_01JFBXNN3J" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/contacts/ct_01JCH8XFQH/stage", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "stage_id": "stg_01JFBXNN3J", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "ct_01J59XB017", "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/get-contacts/ # Get a contact `GET /v1/contacts/{record_id}` Required scope: `contacts:read` One contact with every field: each value, where it came from and whether it has history. ## Path parameters - `record_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/ct_01JBZ84GRF", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "ct_01J59XB017", "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/update-contacts/ # Update a contact `PATCH /v1/contacts/{record_id}` Required scope: `contacts:write` Change the fields sent in `fields`; `null` clears one. The change is recorded with source `api` and goes to the connected CRM like any other. ## Path parameters - `record_id` (string, required) ## Request body (application/json) - `fields` (object (values: string | integer | number | boolean | string[] | object), required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "fields": { "email": { "amount": 2400000, "currency": "USD" } } }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/ct_01JBZ84GRF", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "fields": { "email": { "amount": 2400000, "currency": "USD" } } }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "fields": { "email": { "amount": 2400000, "currency": "USD", }, }, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "ct_01J59XB017", "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/archive-contacts/ # Archive a contact `DELETE /v1/contacts/{record_id}` Required scope: `contacts:write` Archive the contact. It can be brought back with the restore route. ## Path parameters - `record_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/ct_01JBZ84GRF", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/history-contacts/ # List a contact's history `GET /v1/contacts/{record_id}/history` Required scope: `contacts:read` Every value each field has had, newest first, with its source (`manual`, `api`, `import`, `ai`, …) and who set it. `field` and `source` narrow it. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `record_id` (string, required) ## Query parameters - `field` (string or null, optional) - `source` (string or null, optional) - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/history?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/history?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/history", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "actor": { "id": "ct_01J59XB017", "name": "Jordan Rivera" }, "field": "example", "id": "ct_01J59XB017", "label": "Example", "old_value": { "amount": 2400000, "currency": "USD" }, "origin": { "ai_run_id": "ct_01JMDDF109", "approval_id": "apr_01JF8N4TDJ", "automation_id": "aut_01J2VCPWXA", "event": "example", "external_id": "ct_01JKSVW6K8", "import_id": "imp_01J0W1CQFN", "merge_id": "mrg_01J97JCXMN", "merged_from": "example", "message_id": "msg_01J31EX3KK", "object": "example", "payment_id": "pay_01J5M1MJA8", "provider": "example", "quote": "We need this live before the end of the quarter.", "recording_id": "rec_01JR70S5VT", "row": 1, "run_id": "run_01JKBHGW4W" }, "replaced_at": "2026-12-03T14:30:00Z", "seen_at": "2026-12-03T14:30:00Z", "source": { "label": "Example", "value": "example" }, "value": { "amount": 2400000, "currency": "USD" } } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/restore-contacts/ # Restore a contact `POST /v1/contacts/{record_id}/restore` Required scope: `contacts:write` Bring back an archived contact. ## Path parameters - `record_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/restore" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/restore", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/restore", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "archived_at": null, "fields": { "email": { "has_history": false, "items": [ { "is_primary": true, "source": "example", "value": "example" } ], "label": "Example", "source": "example", "type": "text", "value": { "amount": 2400000, "currency": "USD" } } }, "id": "ct_01J59XB017", "object": "contacts", "processing": { "error": null, "fields_pending": [ "example" ], "status": "pending" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/contacts/timeline-contacts/ # List a contact's timeline `GET /v1/contacts/{record_id}/timeline` Required scope: `contacts:read` Calls, meetings, messages, tasks, notes, changes and merges on the record, newest first. `types` (repeat it) limits the kinds. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `record_id` (string, required) ## Query parameters - `types` (string[] or null, optional) Allowed values: `"note"`, `"change"`, `"merge"`, `"call"`, `"meeting"`, `"message"`, `"task_created"`, `"task_completed"`. - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/timeline?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/timeline?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/contacts/ct_01JBZ84GRF/timeline", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "at": "2026-12-03T14:30:00Z", "data": { "actor_id": "ct_01JFYET9BF", "body": "Thanks for your time today. Here is what we agreed.", "source": "example" }, "id": "ct_01J59XB017", "kind": "note", "object": "contacts", "record_id": "ct_01JBZ84GRF", "record_name": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/list-fields/ # List fields `GET /v1/fields` Required scope: `schema:read` Every column of a table (`object`): its key, label, description and type, and whether it can be filtered, sorted and grouped. Contacts and companies include their custom fields. ## Query parameters - `object` (string, required) Allowed values: `"contacts"`, `"companies"`, `"recordings"`, `"members"`, `"tasks"`, `"meetings"`, `"automation_runs"`, `"threads"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/fields?object=contacts" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/fields?object=contacts", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/fields", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "object": "contacts", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "create_rules": [ { "fields": [ { "label": "Example", "value": "example" } ], "kind": "one_of", "message": "example" } ], "data": [ { "ai_prompt": "example", "can_filter": true, "can_group": true, "can_sort": true, "description": "A short description.", "group": "example", "id": "fld_01JW2FN60M", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "is_required": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" } } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/create-field/ # Create a field `POST /v1/fields` Required scope: `schema:write` A custom field on contacts or companies. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `ai_prompt` (string or null, optional) - `description` (string or null, optional) - `group` (string, optional) Default: `"Custom"`. - `label` (string, required) - `link_object` (string or null, optional) Allowed values: `"contacts"`, `"companies"`. - `object` (string, required) Allowed values: `"contacts"`, `"companies"`. - `picklist_id` (string or null, optional) - `type` (string, required) Allowed values: `"text"`, `"long_text"`, `"number"`, `"currency"`, `"date"`, `"datetime"`, `"checkbox"`, `"picklist"`, `"multi_picklist"`, `"url"`, `"phone"`, `"email"`, `"user"`, `"record_link"`. ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/fields" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ai_prompt": "example", "description": "A short description.", "group": "Custom", "label": "Example", "link_object": "contacts", "object": "contacts", "type": "text" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/fields", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "ai_prompt": "example", "description": "A short description.", "group": "Custom", "label": "Example", "link_object": "contacts", "object": "contacts", "type": "text" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/fields", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "ai_prompt": "example", "description": "A short description.", "group": "Custom", "label": "Example", "link_object": "contacts", "object": "contacts", "type": "text", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "ai_prompt": "example", "can_filter": true, "can_group": true, "can_sort": true, "description": "A short description.", "group": "example", "id": "fld_01JW2FN60M", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "is_required": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" } } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/order-fields/ # Order fields `PUT /v1/fields/order` Required scope: `schema:write` Save the order of an object's fields. `keys` names every field once. ## Request body (application/json) - `keys` (string[], required) - `object` (string, required) Allowed values: `"contacts"`, `"companies"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PUT "https://api.valeron.io/v1/fields/order" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "keys": [ "example_key" ], "object": "contacts" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/fields/order", { method: "PUT", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "keys": [ "example_key" ], "object": "contacts" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.put( "https://api.valeron.io/v1/fields/order", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "keys": [ "example_key", ], "object": "contacts", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "create_rules": [ { "fields": [ { "label": "Example", "value": "example" } ], "kind": "one_of", "message": "example" } ], "data": [ { "ai_prompt": "example", "can_filter": true, "can_group": true, "can_sort": true, "description": "A short description.", "group": "example", "id": "fld_01JW2FN60M", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "is_required": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" } } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/update-field/ # Update a field `PATCH /v1/fields/{field_id}` Required scope: `schema:write` Change a custom field's label, description, group or AI prompt. ## Path parameters - `field_id` (string, required) ## Request body (application/json) - `ai_prompt` (string or null, optional) - `description` (string or null, optional) - `group` (string or null, optional) - `label` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/fields/fld_01J1N64RG6" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ai_prompt": "example", "description": "A short description.", "group": "example", "label": "Example" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/fields/fld_01J1N64RG6", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "ai_prompt": "example", "description": "A short description.", "group": "example", "label": "Example" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/fields/fld_01J1N64RG6", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "ai_prompt": "example", "description": "A short description.", "group": "example", "label": "Example", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "ai_prompt": "example", "can_filter": true, "can_group": true, "can_sort": true, "description": "A short description.", "group": "example", "id": "fld_01JW2FN60M", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "is_required": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" } } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/delete-field/ # Archive a field `DELETE /v1/fields/{field_id}` Required scope: `schema:write` Archive a custom field. Its values stay in every record's history. ## Path parameters - `field_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/fields/fld_01J1N64RG6" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/fields/fld_01J1N64RG6", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/fields/fld_01J1N64RG6", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/list-highlights/ # List highlights `GET /v1/highlights` Required scope: `recordings:read` Coaching clips, newest first. `member` keeps one member's, `recording` one recording's. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `member` (string or null, optional) - `recording` (string or null, optional) - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/highlights?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/highlights?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/highlights", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "created_at": "2026-12-03T14:30:00Z", "created_by": "example", "created_by_name": "example", "end_seconds": 12, "id": "hlt_01JY2FD3VN", "member": { "id": "hlt_01JY2FD3VN", "name": "Jordan Rivera" }, "mentions": [ { "id": "hlt_01JY2FD3VN", "name": "Jordan Rivera" } ], "note": "Thanks for your time today. Here is what we agreed.", "recording_id": "rec_01JR70S5VT", "recording_title": "example", "start_seconds": 12, "title": "Discovery call" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/lists/list-lists/ # List lists `GET /v1/lists` Required scope: `contacts:read companies:read` The saved lists of contacts and companies. `object` keeps one kind. A key needs the read scope of either kind. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `object` (string or null, optional) Allowed values: `"contacts"`, `"companies"`. - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/lists?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/lists?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/lists", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "created_at": "2026-12-03T14:30:00Z", "id": "lst_01J7MVGV5X", "name": "Jordan Rivera", "object": "contacts", "record_count": 3 } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/lists/list-list-members/ # List the records in a list `GET /v1/lists/{list_id}/members` Required scope: `contacts:read companies:read` The IDs of the records in a list. For the records themselves, send `list_id` to the object's table query. A key needs the read scope of the list's kind. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `list_id` (string, required) ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/lists/lst_01JPT0K379/members?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/lists/lst_01JPT0K379/members?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/lists/lst_01JPT0K379/members", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "id": "lst_01J7MVGV5X" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/lists/add-list-members/ # Add records to a list `POST /v1/lists/{list_id}/members` Required scope: `contacts:write companies:write` Add contacts or companies (of the list's kind) to a list. A key needs the write scope of the list's kind. ## Path parameters - `list_id` (string, required) ## Request body (application/json) - `record_ids` (string[], required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/lists/lst_01JPT0K379/members" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "record_ids": [ "lst_01J34N6R3F" ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/lists/lst_01JPT0K379/members", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "record_ids": [ "lst_01J34N6R3F" ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/lists/lst_01JPT0K379/members", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "record_ids": [ "lst_01J34N6R3F", ], }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "created_at": "2026-12-03T14:30:00Z", "id": "lst_01J7MVGV5X", "name": "Jordan Rivera", "object": "contacts", "record_count": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/lists/remove-list-member/ # Take a record off a list `DELETE /v1/lists/{list_id}/members/{record_id}` Required scope: `contacts:write companies:write` A key needs the write scope of the list's kind. ## Path parameters - `list_id` (string, required) - `record_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/lists/lst_01JPT0K379/members/lst_01J34N6R3F" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/lists/lst_01JPT0K379/members/lst_01J34N6R3F", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/lists/lst_01JPT0K379/members/lst_01J34N6R3F", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/meetings/list-meetings/ # List meetings `GET /v1/meetings` Required scope: `meetings:read` Booked meetings with someone outside the organization: `when=upcoming` (soonest first) or `past` (latest first). `owner` keeps one member's. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) - `when` (string, optional) Allowed values: `"upcoming"`, `"past"`. Default: `"upcoming"`. - `owner` (string, optional) Default: `"mine"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/meetings?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/meetings?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/meetings", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "attendees": [ { "email": "jordan@example.com", "name": "Jordan Rivera", "response": "example" } ], "contact": { "id": "mtg_01J4B8J0WY", "name": "Jordan Rivera" }, "ends_at": "2026-12-03T14:30:00Z", "id": "mtg_01J4B8J0WY", "join_url": "example", "owner": { "id": "mtg_01J4B8J0WY", "name": "Jordan Rivera" }, "recorder_status": { "label": "Example", "value": "example" }, "recording_id": "rec_01JR70S5VT", "starts_at": "2026-12-03T14:30:00Z", "title": "Discovery call" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/meetings/query-meetings/ # Query meetings `POST /v1/meetings/query` Required scope: `meetings:read` The meetings table. Upcoming and past are a filter on `starts_at`. The body is a table query: `columns`, `filters` (`{ field, op, value }`), `sort` (up to 5 keys), `group_by`, `cursor` and `limit`. `GET /v1/fields?object=` lists the columns you can ask for, filter, sort and group by. ## Request body (application/json) - `columns` (string[] or null, optional) - `cursor` (string or null, optional) - `filters` (object[] or null, optional) - `field` (string, required) - `op` (string, required) Allowed values: `"eq"`, `"neq"`, `"contains"`, `"starts_with"`, `"in"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"is_empty"`, `"is_not_empty"`. - `value` (string | integer | number | boolean | string[] or null, optional): What the field is compared with; a list for `in`. - `group_by` (string or null, optional) - `limit` (integer, optional) Default: `50`. - `offset` (integer or null, optional) - `owner` (string, optional) Default: `"mine"`. - `sort` (object[] or null, optional) - `direction` (string, optional) Allowed values: `"asc"`, `"desc"`. Default: `"asc"`. - `field` (string, required) - `view_id` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/meetings/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "limit": 50, "offset": 0 }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/meetings/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "limit": 50, "offset": 0 }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/meetings/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "columns": [ "example", ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example", }, ], "group_by": "example", "limit": 50, "offset": 0, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "mtg_01J4B8J0WY", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "mtg_01J4B8J0WY", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/organization/query-members/ # Query members `POST /v1/members/query` Required scope: `organization:read` The members table. The body is a table query: `columns`, `filters` (`{ field, op, value }`), `sort` (up to 5 keys), `group_by`, `cursor` and `limit`. `GET /v1/fields?object=` lists the columns you can ask for, filter, sort and group by. A column may be `metric:@` for each member's value of a metric. ## Request body (application/json) - `columns` (string[] or null, optional) - `cursor` (string or null, optional) - `filters` (object[] or null, optional) - `field` (string, required) - `op` (string, required) Allowed values: `"eq"`, `"neq"`, `"contains"`, `"starts_with"`, `"in"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"is_empty"`, `"is_not_empty"`. - `value` (string | integer | number | boolean | string[] or null, optional): What the field is compared with; a list for `in`. - `group_by` (string or null, optional) - `limit` (integer, optional) Default: `50`. - `offset` (integer or null, optional) - `sort` (object[] or null, optional) - `direction` (string, optional) Allowed values: `"asc"`, `"desc"`. Default: `"asc"`. - `field` (string, required) - `view_id` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/members/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "limit": 50, "offset": 0 }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/members/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "limit": 50, "offset": 0 }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/members/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "columns": [ "example", ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example", }, ], "group_by": "example", "limit": 50, "offset": 0, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "usr_01J4J85BKZ", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "usr_01J4J85BKZ", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/organization/get-member/ # Get a member `GET /v1/members/{user_id}` Required scope: `organization:read` One member: their connected mailboxes and calendar accounts (never their tokens), their recorder and Wingman status, and what their work cost this billing period. ## Path parameters - `user_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/members/usr_01J2DAY3X7" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/members/usr_01J2DAY3X7", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/members/usr_01J2DAY3X7", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "accounts": [ { "account_name": "example", "kind": "mailbox", "provider": { "label": "Example", "value": "example" }, "status": "connected" } ], "avatar_color": "purple", "email": "jordan@example.com", "id": "usr_01J4J85BKZ", "image_url": "example", "joined_at": "2026-12-03T14:30:00Z", "name": "Jordan Rivera", "positions": [ { "id": "usr_01J4J85BKZ", "name": "Jordan Rivera", "preset": { "label": "Example", "value": "example" } } ], "recorder": { "auto_join": { "label": "Example", "value": "example" }, "last_recorded_at": "2026-12-03T14:30:00Z" }, "role": { "label": "Example", "value": "example" }, "teams": [ { "id": "usr_01J4J85BKZ", "name": "Jordan Rivera" } ], "usage": { "by_kind": [ { "amount": { "amount_micros": 2400000, "currency": "USD", "display": "example" }, "use": { "label": "Example", "value": "example" } } ], "since": "2026-12-03T14:30:00Z", "total": { "amount_micros": 2400000, "currency": "USD", "display": "example" } }, "wingman": { "alerts_enabled": true, "last_used_at": "2026-12-03T14:30:00Z" } } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/analytics/list-metrics/ # List metrics `GET /v1/metrics` Required scope: `analytics:read` The metric catalogue: every metric with its label, description, unit and the groupings it supports. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/metrics" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/metrics", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/metrics", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "description": "A short description.", "groupings": [ { "label": "Example", "value": "example" } ], "is_stored_daily": true, "key": "example_key", "label": "Example", "minimum_sample": 1, "presets": [ "example" ], "section": { "label": "Example", "value": "example" }, "source": "example", "table_objects": [ "example" ], "unit": "example" } ], "groupings": [ { "label": "Example", "value": "example" } ], "max_range_days": 1, "periods": [ { "label": "Example", "value": "example" } ], "sections": [ { "key": "example_key", "label": "Example", "preset": { "label": "Example", "value": "example" } } ] } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/notes/list-notes/ # List notes `GET /v1/notes` Required scope: `notes:read` A record's notes (`record`), newest first. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `record` (string, required) - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/notes?record=example&limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/notes?record=example&limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/notes", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "record": "example", "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "author": { "id": "note_01J01FPSDJ", "name": "Jordan Rivera" }, "body": "Thanks for your time today. Here is what we agreed.", "created_at": "2026-12-03T14:30:00Z", "id": "note_01J01FPSDJ", "record_id": "note_01JMVPQQEP", "source": "example", "updated_at": "2026-12-03T14:30:00Z" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/notes/create-note/ # Write a note `POST /v1/notes` Required scope: `notes:write` A note on a contact or company, recorded with source `api`. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `body` (string, required) - `record_id` (string, required) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/notes" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "body": "Thanks for your time today. Here is what we agreed.", "record_id": "note_01JMVPQQEP" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/notes", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "body": "Thanks for your time today. Here is what we agreed.", "record_id": "note_01JMVPQQEP" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/notes", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "body": "Thanks for your time today. Here is what we agreed.", "record_id": "note_01JMVPQQEP", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "author": { "id": "note_01J01FPSDJ", "name": "Jordan Rivera" }, "body": "Thanks for your time today. Here is what we agreed.", "created_at": "2026-12-03T14:30:00Z", "id": "note_01J01FPSDJ", "record_id": "note_01JMVPQQEP", "source": "example", "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/notes/update-note/ # Update a note `PATCH /v1/notes/{note_id}` Required scope: `notes:write` Change a note's text. ## Path parameters - `note_id` (string, required) ## Request body (application/json) - `body` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/notes/note_01JVRDHC8V" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "body": "Thanks for your time today. Here is what we agreed." }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/notes/note_01JVRDHC8V", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "body": "Thanks for your time today. Here is what we agreed." }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/notes/note_01JVRDHC8V", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "body": "Thanks for your time today. Here is what we agreed.", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "author": { "id": "note_01J01FPSDJ", "name": "Jordan Rivera" }, "body": "Thanks for your time today. Here is what we agreed.", "created_at": "2026-12-03T14:30:00Z", "id": "note_01J01FPSDJ", "record_id": "note_01JMVPQQEP", "source": "example", "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/notes/delete-note/ # Delete a note `DELETE /v1/notes/{note_id}` Required scope: `notes:write` Delete a note. ## Path parameters - `note_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/notes/note_01JVRDHC8V" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/notes/note_01JVRDHC8V", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/notes/note_01JVRDHC8V", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/organization/get-organization/ # Get the organization `GET /v1/organization` Required scope: `organization:read` The organization the key belongs to: its ID, kind (`team` or `individual`), name, logo and time zone. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/organization" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/organization", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/organization", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "id": "_01J8FC10VR", "kind": "team", "logo_url": "example", "name": "Jordan Rivera", "time_zone": "America/New_York" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/payments/log-payment/ # Log a payment `POST /v1/payments` Required scope: `payments:write` Log a payment made outside a connected processor. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `amount` (integer, required) - `contact_id` (string or null, optional) - `currency` (string, required) - `note` (string or null, optional) - `paid_at` (string (date-time) or null, optional) - `status` (string, optional) Allowed values: `"succeeded"`, `"pending"`, `"failed"`. Default: `"succeeded"`. ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/payments" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount": 2400000, "contact_id": "ct_01JCH8XFQH", "currency": "USD", "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "status": "succeeded" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/payments", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "amount": 2400000, "contact_id": "ct_01JCH8XFQH", "currency": "USD", "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "status": "succeeded" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/payments", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "amount": 2400000, "contact_id": "ct_01JCH8XFQH", "currency": "USD", "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "status": "succeeded", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "amount": { "amount": 2400000, "currency": "USD" }, "contact": { "id": "pay_01JMVCNE28", "name": "Jordan Rivera" }, "created_at": "2026-12-03T14:30:00Z", "id": "pay_01JMVCNE28", "logged_by": { "id": "pay_01JMVCNE28", "name": "Jordan Rivera" }, "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "payer_email": "example", "payer_name": "example", "processor_payment_id": "pay_01JPFEETCF", "refunded_amount": 2400000, "source": { "label": "Example", "value": "example" }, "status": { "label": "Example", "value": "example" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/payments/query-payments/ # Query payments `POST /v1/payments/query` Required scope: `payments:read` Payments your contacts made, from Stripe, Whop, Commas or logged by hand. The body is a table query: `columns`, `filters` (`{ field, op, value }`), `sort` (up to 5 keys), `group_by`, `cursor` and `limit`. `GET /v1/fields?object=` lists the columns you can ask for, filter, sort and group by. ## Request body (application/json) - `columns` (string[] or null, optional) - `cursor` (string or null, optional) - `filters` (object[] or null, optional) - `field` (string, required) - `op` (string, required) Allowed values: `"eq"`, `"neq"`, `"contains"`, `"starts_with"`, `"in"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"is_empty"`, `"is_not_empty"`. - `value` (string | integer | number | boolean | string[] or null, optional): What the field is compared with; a list for `in`. - `group_by` (string or null, optional) - `limit` (integer, optional) Default: `50`. - `offset` (integer or null, optional) - `sort` (object[] or null, optional) - `direction` (string, optional) Allowed values: `"asc"`, `"desc"`. Default: `"asc"`. - `field` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/payments/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "limit": 50, "offset": 0 }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/payments/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "limit": 50, "offset": 0 }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/payments/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "columns": [ "example", ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example", }, ], "group_by": "example", "limit": 50, "offset": 0, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "pay_01JMVCNE28", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "pay_01JMVCNE28", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/payments/get-payment/ # Get a payment `GET /v1/payments/{payment_id}` Required scope: `payments:read` One payment. ## Path parameters - `payment_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/payments/pay_01J5M1MJA8" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/payments/pay_01J5M1MJA8", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/payments/pay_01J5M1MJA8", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "amount": { "amount": 2400000, "currency": "USD" }, "contact": { "id": "pay_01JMVCNE28", "name": "Jordan Rivera" }, "created_at": "2026-12-03T14:30:00Z", "id": "pay_01JMVCNE28", "logged_by": { "id": "pay_01JMVCNE28", "name": "Jordan Rivera" }, "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "payer_email": "example", "payer_name": "example", "processor_payment_id": "pay_01JPFEETCF", "refunded_amount": 2400000, "source": { "label": "Example", "value": "example" }, "status": { "label": "Example", "value": "example" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/payments/update-payment/ # Update a payment `PATCH /v1/payments/{payment_id}` Required scope: `payments:write` Change a payment that was logged by hand. ## Path parameters - `payment_id` (string, required) ## Request body (application/json) - `amount` (integer or null, optional) - `contact_id` (string or null, optional) - `currency` (string or null, optional) - `note` (string or null, optional) - `paid_at` (string (date-time) or null, optional) - `status` (string or null, optional) Allowed values: `"succeeded"`, `"pending"`, `"failed"`, `"refunded"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/payments/pay_01J5M1MJA8" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount": 2400000, "contact_id": "ct_01JCH8XFQH", "currency": "USD", "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "status": "succeeded" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/payments/pay_01J5M1MJA8", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "amount": 2400000, "contact_id": "ct_01JCH8XFQH", "currency": "USD", "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "status": "succeeded" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/payments/pay_01J5M1MJA8", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "amount": 2400000, "contact_id": "ct_01JCH8XFQH", "currency": "USD", "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "status": "succeeded", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "amount": { "amount": 2400000, "currency": "USD" }, "contact": { "id": "pay_01JMVCNE28", "name": "Jordan Rivera" }, "created_at": "2026-12-03T14:30:00Z", "id": "pay_01JMVCNE28", "logged_by": { "id": "pay_01JMVCNE28", "name": "Jordan Rivera" }, "note": "Thanks for your time today. Here is what we agreed.", "paid_at": "2026-12-03T14:30:00Z", "payer_email": "example", "payer_name": "example", "processor_payment_id": "pay_01JPFEETCF", "refunded_amount": 2400000, "source": { "label": "Example", "value": "example" }, "status": { "label": "Example", "value": "example" }, "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/payments/delete-payment/ # Delete a payment `DELETE /v1/payments/{payment_id}` Required scope: `payments:write` Delete a payment that was logged by hand. ## Path parameters - `payment_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/payments/pay_01J5M1MJA8" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/payments/pay_01J5M1MJA8", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/payments/pay_01J5M1MJA8", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/list-picklists/ # List picklists `GET /v1/picklists` Required scope: `schema:read` The organization's picklists and their options. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/picklists?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/picklists?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/picklists", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "id": "pkl_01JDE3MQX8", "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example" } ] } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/create-picklist/ # Create a picklist `POST /v1/picklists` Required scope: `schema:write` A picklist and its options. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `name` (string, required) - `options` (object[], required) - `label` (string, required) - `value` (string or null, optional) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/picklists" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example" } ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/picklists", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example" } ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/picklists", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example", }, ], }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "id": "pkl_01JDE3MQX8", "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example" } ] } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/update-picklist/ # Update a picklist `PATCH /v1/picklists/{picklist_id}` Required scope: `schema:write` Rename it, or change its options. ## Path parameters - `picklist_id` (string, required) ## Request body (application/json) - `name` (string or null, optional) - `options` (object[] or null, optional) - `label` (string, required) - `value` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/picklists/pkl_01J512YHXQ" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example" } ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/picklists/pkl_01J512YHXQ", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example" } ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/picklists/pkl_01J512YHXQ", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example", }, ], }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "id": "pkl_01JDE3MQX8", "name": "Jordan Rivera", "options": [ { "label": "Example", "value": "example" } ] } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/delete-picklist/ # Delete a picklist `DELETE /v1/picklists/{picklist_id}` Required scope: `schema:write` Refused with `409 picklist_in_use` while any field uses it. ## Path parameters - `picklist_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/picklists/pkl_01J512YHXQ" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/picklists/pkl_01J512YHXQ", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/picklists/pkl_01J512YHXQ", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/list-pipelines/ # List pipelines `GET /v1/pipelines` Required scope: `schema:read` Pipelines and their stages, in order. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/pipelines?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/pipelines?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/pipelines", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "id": "pl_01J4YY08DC", "is_default": true, "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": { "label": "Example", "value": "example" }, "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": { "label": "Example", "value": "example" } } ] } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/create-pipeline/ # Create a pipeline `POST /v1/pipelines` Required scope: `schema:write` A pipeline with its stages. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `name` (string, required) - `stages` (object[], required) - `color` (string or null, optional) Allowed values: `"purple"`, `"green"`, `"red"`, `"yellow"`, `"gray"`, `"pink"`, `"blue"`, `"orange"`. - `forecast_category` (string, required) Allowed values: `"pipeline"`, `"best_case"`, `"commit"`, `"closed"`, `"omitted"`. - `id` (string or null, optional) - `name` (string, required) - `probability` (number or null, optional) - `type` (string, required) Allowed values: `"open"`, `"won"`, `"lost"`. ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/pipelines" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": "pipeline", "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": "open" } ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/pipelines", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": "pipeline", "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": "open" } ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/pipelines", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": "pipeline", "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": "open", }, ], }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "id": "pl_01J4YY08DC", "is_default": true, "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": { "label": "Example", "value": "example" }, "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": { "label": "Example", "value": "example" } } ] } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/update-pipeline/ # Update a pipeline `PATCH /v1/pipelines/{pipeline_id}` Required scope: `schema:write` Rename it, replace its ordered stages (send each existing stage with its `id`; a stage left out is archived) or make it the default. ## Path parameters - `pipeline_id` (string, required) ## Request body (application/json) - `is_default` (boolean or null, optional) Allowed values: `true`. - `name` (string or null, optional) - `stages` (object[] or null, optional) - `color` (string or null, optional) Allowed values: `"purple"`, `"green"`, `"red"`, `"yellow"`, `"gray"`, `"pink"`, `"blue"`, `"orange"`. - `forecast_category` (string, required) Allowed values: `"pipeline"`, `"best_case"`, `"commit"`, `"closed"`, `"omitted"`. - `id` (string or null, optional) - `name` (string, required) - `probability` (number or null, optional) - `type` (string, required) Allowed values: `"open"`, `"won"`, `"lost"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/pipelines/pl_01JBF6F9AC" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "is_default": true, "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": "pipeline", "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": "open" } ] }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/pipelines/pl_01JBF6F9AC", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "is_default": true, "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": "pipeline", "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": "open" } ] }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/pipelines/pl_01JBF6F9AC", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "is_default": True, "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": "pipeline", "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": "open", }, ], }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "id": "pl_01J4YY08DC", "is_default": true, "name": "Jordan Rivera", "stages": [ { "color": "purple", "forecast_category": { "label": "Example", "value": "example" }, "id": "pl_01J4YY08DC", "name": "Jordan Rivera", "probability": 1.5, "type": { "label": "Example", "value": "example" } } ] } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/delete-pipeline/ # Delete a pipeline `DELETE /v1/pipelines/{pipeline_id}` Required scope: `schema:write` Refused with a 409 for the last pipeline, the default one, and while any contact is in one of its stages. ## Path parameters - `pipeline_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/pipelines/pl_01JBF6F9AC" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/pipelines/pl_01JBF6F9AC", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/pipelines/pl_01JBF6F9AC", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/organization/list-positions/ # List positions `GET /v1/positions` Required scope: `organization:read` Positions such as Setter and Closer, which tag members. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/positions?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/positions?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/positions", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "id": "pos_01JM9E23QD", "name": "Jordan Rivera", "preset": { "label": "Example", "value": "example" } } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/query-recordings/ # Query recordings `POST /v1/recordings/query` Required scope: `recordings:read` Meetings and phone calls, including the ones sent with `POST /v1/analyses`. The body is a table query: `columns`, `filters` (`{ field, op, value }`), `sort` (up to 5 keys), `group_by`, `cursor` and `limit`. `GET /v1/fields?object=` lists the columns you can ask for, filter, sort and group by. ## Request body (application/json) - `columns` (string[] or null, optional) - `cursor` (string or null, optional) - `filters` (object[] or null, optional) - `field` (string, required) - `op` (string, required) Allowed values: `"eq"`, `"neq"`, `"contains"`, `"starts_with"`, `"in"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"is_empty"`, `"is_not_empty"`. - `value` (string | integer | number | boolean | string[] or null, optional): What the field is compared with; a list for `in`. - `group_by` (string or null, optional) - `is_archived` (boolean, optional) Default: `false`. - `limit` (integer, optional) Default: `50`. - `offset` (integer or null, optional) - `sort` (object[] or null, optional) - `direction` (string, optional) Allowed values: `"asc"`, `"desc"`. Default: `"asc"`. - `field` (string, required) - `view_id` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/recordings/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "is_archived": false, "limit": 50 }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/recordings/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "is_archived": false, "limit": 50 }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/recordings/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "columns": [ "example", ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example", }, ], "group_by": "example", "is_archived": False, "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "rec_01JCRZFXEH", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "rec_01JCRZFXEH", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/get-recording/ # Get a recording `GET /v1/recordings/{recording_id}` Required scope: `recordings:read` One meeting or phone call: who held it, when, how long, its participants, the records it is linked to and how far its processing is. ## Path parameters - `recording_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/recordings/rec_01JR70S5VT" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/recordings/rec_01JR70S5VT", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/recordings/rec_01JR70S5VT", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "analysis_status": { "label": "Example", "value": "example" }, "analysis_version": 1, "archived_at": null, "call_score": 82, "category": "example", "channel_count": 3, "company": { "id": "rec_01JCRZFXEH", "name": "Jordan Rivera" }, "contact": { "id": "rec_01JCRZFXEH", "name": "Jordan Rivera" }, "direction": { "label": "Example", "value": "example" }, "duration_seconds": 1260, "event_id": "evt_01JRTRTZRH", "from_number": "+14155550132", "has_share_link": false, "id": "rec_01JCRZFXEH", "is_member_speaker_known": true, "language": "example" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/update-recording/ # Update a recording `PATCH /v1/recordings/{recording_id}` Required scope: `recordings:write` Change the title, call type or outcome. `null` clears the outcome. ## Path parameters - `recording_id` (string, required) ## Request body (application/json) - `category` (string or null, optional) - `outcome` (string or null, optional) - `title` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/recordings/rec_01JR70S5VT" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "category": "example", "outcome": "example", "title": "Discovery call" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/recordings/rec_01JR70S5VT", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "category": "example", "outcome": "example", "title": "Discovery call" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/recordings/rec_01JR70S5VT", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "category": "example", "outcome": "example", "title": "Discovery call", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "analysis_status": { "label": "Example", "value": "example" }, "analysis_version": 1, "archived_at": null, "call_score": 82, "category": "example", "channel_count": 3, "company": { "id": "rec_01JCRZFXEH", "name": "Jordan Rivera" }, "contact": { "id": "rec_01JCRZFXEH", "name": "Jordan Rivera" }, "direction": { "label": "Example", "value": "example" }, "duration_seconds": 1260, "event_id": "evt_01JRTRTZRH", "from_number": "+14155550132", "has_share_link": false, "id": "rec_01JCRZFXEH", "is_member_speaker_known": true, "language": "example" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/get-analysis/ # Get an analysis `GET /v1/recordings/{recording_id}/analysis` Required scope: `recordings:read` The call analysis, latest version unless `version` is given: the score and its four sub-scores, summary, objections, questions, next steps and more. Every item carries the quote and time it came from. Also delivered by the `recording.analyzed` webhook event. ## Path parameters - `recording_id` (string, required) ## Query parameters - `version` (integer or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/analysis" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/recordings/rec_01JR70S5VT/analysis", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/analysis", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "call_score": 82, "created_at": "2026-12-03T14:30:00Z", "latest_version": 1, "metrics": { "filler_word_count": 3, "interruption_count": 3, "longest_monologue_seconds": 12, "talk_ratio": 0.42, "words_per_minute": 1 }, "model": "example", "result": { "call_type": { "label": "Example", "value": "example" }, "close_attempts": [ { "at_seconds": 12, "note": "Thanks for your time today. Here is what we agreed.", "quote": "We need this live before the end of the quarter." } ], "coaching_areas": [ { "area": "example", "do_instead": "example", "evidence": [ { "at_seconds": 12, "quote": "We need this live before the end of the quarter." } ], "explanation": "example", "try_saying": "example" } ], "competitor_mentions": [ { "at_seconds": 12, "is_known": true, "name": "Jordan Rivera", "quote": "We need this live before the end of the quarter." } ], "contact_sentiment": { "label": "Example", "value": "example" }, "discovery_questions": [ { "at_seconds": 12, "is_open": true, "quote": "We need this live before the end of the quarter." } ], "highlights": [ { "at_seconds": 12, "end_seconds": 12, "quote": "We need this live before the end of the quarter.", "title": "Discovery call" } ], "is_next_step_secured": true, "next_call_focus": "example", "next_steps": [ { "at_seconds": 12, "due_at": "2026-12-03T14:30:00Z", "kind": { "label": "Example", "value": "example" }, "owner": { "label": "Example", "value": "example" }, "quote": "We need this live before the end of the quarter.", "title": "Discovery call" } ], "objections": [ { "at_seconds": 12, "category": { "label": "Example", "value": "example" }, "is_resolved": true, "quote": "We need this live before the end of the quarter.", "response": "example" } ], "outcome": { "label": "Example", "value": "example" }, "payment_agreement": { "amount": 2400000, "amount_paid": 2400000, "at_seconds": 12, "currency": "USD", "quote": "We need this live before the end of the quarter.", "terms": "example" }, "pricing_mentions": [ { "at_seconds": 12, "note": "Thanks for your time today. Here is what we agreed.", "quote": "We need this live before the end of the quarter." } ], "proposed_changes": [ { "at_seconds": 12, "field": "example", "object": { "label": "Example", "value": "example" }, "quote": "We need this live before the end of the quarter.", "value": "example" } ], "scores": [ { "evidence": [ { "at_seconds": 12, "quote": "We need this live before the end of the quarter." } ], "name": { "label": "Example", "value": "example" }, "reason": null, "score": 82 } ] }, "status": { "label": "Example", "value": "example" }, "transcript_version": 1, "version": 1 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/get-media/ # Get a media link `GET /v1/recordings/{recording_id}/media` Required scope: `recordings:read` A link to the recording's audio or video that works for 10 minutes. `source` chooses the primary or the backup file. ## Path parameters - `recording_id` (string, required) ## Query parameters - `source` (string or null, optional) Allowed values: `"primary"`, `"backup"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/media" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/recordings/rec_01JR70S5VT/media", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/media", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "content_type": "example", "expires_in_seconds": 12, "kind": "example", "sources": [ { "content_type": "example", "kind": "primary" } ], "url": "https://example.com" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/reanalyze/ # Run the analysis again `POST /v1/recordings/{recording_id}/reanalyze` Required scope: `recordings:write` Analyze the recording again as a new version; earlier versions are kept. Charged as call analysis. `402 insufficient_balance` when the balance can't cover it. ## Path parameters - `recording_id` (string, required) ## Responses - `202`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/reanalyze" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/recordings/rec_01JR70S5VT/reanalyze", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/reanalyze", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 202 ```json { "status": "queued" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/get-transcript/ # Get a transcript `GET /v1/recordings/{recording_id}/transcript` Required scope: `recordings:read` The transcript, latest version unless `version` is given: segments with speaker, times and text. ## Path parameters - `recording_id` (string, required) ## Query parameters - `version` (integer or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/transcript" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/recordings/rec_01JR70S5VT/transcript", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/transcript", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "created_at": "2026-12-03T14:30:00Z", "edited_by": { "id": "rec_01JCRZFXEH", "name": "Jordan Rivera" }, "language": "example", "latest_version": 1, "segments": [ { "end_seconds": 12, "id": 1, "is_edited": false, "is_member": true, "speaker": "Maya Chen", "start_seconds": 12, "text": "Thanks for your time today. Here is what we agreed." } ], "version": 1 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/recordings/edit-transcript/ # Correct a transcript `PATCH /v1/recordings/{recording_id}/transcript` Required scope: `recordings:write` Correct one segment. The edit is a new version; the original is kept. ## Path parameters - `recording_id` (string, required) ## Request body (application/json) - `segment_id` (integer, required) - `speaker` (string or null, optional) - `text` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/transcript" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "segment_id": 1, "speaker": "Maya Chen", "text": "Thanks for your time today. Here is what we agreed." }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/recordings/rec_01JR70S5VT/transcript", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "segment_id": 1, "speaker": "Maya Chen", "text": "Thanks for your time today. Here is what we agreed." }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/recordings/rec_01JR70S5VT/transcript", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "segment_id": 1, "speaker": "Maya Chen", "text": "Thanks for your time today. Here is what we agreed.", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "created_at": "2026-12-03T14:30:00Z", "edited_by": { "id": "rec_01JCRZFXEH", "name": "Jordan Rivera" }, "language": "example", "latest_version": 1, "segments": [ { "end_seconds": 12, "id": 1, "is_edited": false, "is_member": true, "speaker": "Maya Chen", "start_seconds": 12, "text": "Thanks for your time today. Here is what we agreed." } ], "version": 1 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/list-tags/ # List tags `GET /v1/tags` Required scope: `schema:read` Every tag in use, with its colour. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/tags?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/tags?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/tags", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "color": "purple", "name": "Jordan Rivera" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/fields-and-pipelines/update-tag/ # Update a tag `PATCH /v1/tags/{name}` Required scope: `schema:write` Set a tag's colour, or clear it with null. ## Path parameters - `name` (string, required) ## Request body (application/json) - `color` (string or null, required) Allowed values: `"purple"`, `"green"`, `"red"`, `"yellow"`, `"gray"`, `"pink"`, `"blue"`, `"orange"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/tags/Jordan Rivera" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "color": "purple" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/tags/Jordan Rivera", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "color": "purple" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/tags/Jordan Rivera", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "color": "purple", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "color": "purple", "name": "Jordan Rivera" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/tasks/create-task/ # Create a task `POST /v1/tasks` Required scope: `tasks:write` A task, optionally on a contact or company and with a due time. Recorded with source `api`. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `description` (string or null, optional) - `due_at` (string (date-time) or null, optional) - `owner_id` (string or null, optional) - `record_id` (string or null, optional) - `snoozed_until` (string (date-time) or null, optional) - `status` (string, optional) Allowed values: `"needs_review"`, `"snoozed"`, `"in_progress"`, `"resolved"`. Default: `"needs_review"`. - `title` (string, required) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/tasks" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "A short description.", "due_at": "2026-12-03T14:30:00Z", "owner_id": "usr_01J0ZTM2YK", "record_id": "tsk_01JRGDZNT1", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review", "title": "Discovery call" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/tasks", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "description": "A short description.", "due_at": "2026-12-03T14:30:00Z", "owner_id": "usr_01J0ZTM2YK", "record_id": "tsk_01JRGDZNT1", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review", "title": "Discovery call" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/tasks", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "description": "A short description.", "due_at": "2026-12-03T14:30:00Z", "owner_id": "usr_01J0ZTM2YK", "record_id": "tsk_01JRGDZNT1", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review", "title": "Discovery call", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "created_at": "2026-12-03T14:30:00Z", "created_by": { "id": "tsk_01JMR8F4VE", "name": "Jordan Rivera" }, "description": "A short description.", "due_at": "2026-12-03T14:30:00Z", "id": "tsk_01JMR8F4VE", "origin": { "at_seconds": 12, "automation_id": "aut_01J2VCPWXA", "kind": "meeting_booked", "kind_label": "example", "owner": "member", "quote": "We need this live before the end of the quarter.", "recording_id": "rec_01JR70S5VT", "run_id": "run_01JKBHGW4W", "step": 1 }, "owner": { "id": "tsk_01JMR8F4VE", "name": "Jordan Rivera" }, "record": { "id": "tsk_01JMR8F4VE", "name": "Jordan Rivera", "object": "contacts" }, "resolved_at": "2026-12-03T14:30:00Z", "snoozed_until": "2026-12-03T14:30:00Z", "source": { "label": "Example", "value": "example" }, "status": { "label": "Example", "value": "example" }, "title": "Discovery call", "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/tasks/bulk-tasks/ # Update many tasks `POST /v1/tasks/bulk` Required scope: `tasks:write` Resolve, snooze, set the status of or assign up to 200 tasks. All or none. ## Request body (application/json) - `action` (string, required) Allowed values: `"resolve"`, `"snooze"`, `"set_status"`, `"assign"`. - `ids` (string[], required) - `owner_id` (string or null, optional) - `snoozed_until` (string (date-time) or null, optional) - `status` (string or null, optional) Allowed values: `"needs_review"`, `"snoozed"`, `"in_progress"`, `"resolved"`. ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/tasks/bulk" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": "resolve", "ids": [ "tsk_01JMR8F4VE" ], "owner_id": "usr_01J0ZTM2YK", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/tasks/bulk", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "action": "resolve", "ids": [ "tsk_01JMR8F4VE" ], "owner_id": "usr_01J0ZTM2YK", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/tasks/bulk", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "action": "resolve", "ids": [ "tsk_01JMR8F4VE", ], "owner_id": "usr_01J0ZTM2YK", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "updated": [ "example" ] } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/tasks/query-tasks/ # Query tasks `POST /v1/tasks/query` Required scope: `tasks:read` The tasks table. The body is a table query: `columns`, `filters` (`{ field, op, value }`), `sort` (up to 5 keys), `group_by`, `cursor` and `limit`. `GET /v1/fields?object=` lists the columns you can ask for, filter, sort and group by. ## Request body (application/json) - `columns` (string[] or null, optional) - `cursor` (string or null, optional) - `filters` (object[] or null, optional) - `field` (string, required) - `op` (string, required) Allowed values: `"eq"`, `"neq"`, `"contains"`, `"starts_with"`, `"in"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"is_empty"`, `"is_not_empty"`. - `value` (string | integer | number | boolean | string[] or null, optional): What the field is compared with; a list for `in`. - `group_by` (string or null, optional) - `limit` (integer, optional) Default: `50`. - `offset` (integer or null, optional) - `owner` (string, optional) Default: `"mine"`. - `sort` (object[] or null, optional) - `direction` (string, optional) Allowed values: `"asc"`, `"desc"`. Default: `"asc"`. - `field` (string, required) - `view_id` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/tasks/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "limit": 50, "offset": 0 }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/tasks/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "limit": 50, "offset": 0 }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/tasks/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "columns": [ "example", ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example", }, ], "group_by": "example", "limit": 50, "offset": 0, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "tsk_01JMR8F4VE", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "tsk_01JMR8F4VE", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/tasks/update-task/ # Update a task `PATCH /v1/tasks/{task_id}` Required scope: `tasks:write` Change the title, description, status, due or snooze time, owner or linked record. ## Path parameters - `task_id` (string, required) ## Request body (application/json) - `description` (string or null, optional) - `due_at` (string (date-time) or null, optional) - `owner_id` (string or null, optional) - `record_id` (string or null, optional) - `snoozed_until` (string (date-time) or null, optional) - `status` (string or null, optional) Allowed values: `"needs_review"`, `"snoozed"`, `"in_progress"`, `"resolved"`. - `title` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/tasks/tsk_01J8RCXT24" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "A short description.", "due_at": "2026-12-03T14:30:00Z", "owner_id": "usr_01J0ZTM2YK", "record_id": "tsk_01JRGDZNT1", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/tasks/tsk_01J8RCXT24", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "description": "A short description.", "due_at": "2026-12-03T14:30:00Z", "owner_id": "usr_01J0ZTM2YK", "record_id": "tsk_01JRGDZNT1", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/tasks/tsk_01J8RCXT24", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "description": "A short description.", "due_at": "2026-12-03T14:30:00Z", "owner_id": "usr_01J0ZTM2YK", "record_id": "tsk_01JRGDZNT1", "snoozed_until": "2026-12-03T14:30:00Z", "status": "needs_review", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "created_at": "2026-12-03T14:30:00Z", "created_by": { "id": "tsk_01JMR8F4VE", "name": "Jordan Rivera" }, "description": "A short description.", "due_at": "2026-12-03T14:30:00Z", "id": "tsk_01JMR8F4VE", "origin": { "at_seconds": 12, "automation_id": "aut_01J2VCPWXA", "kind": "meeting_booked", "kind_label": "example", "owner": "member", "quote": "We need this live before the end of the quarter.", "recording_id": "rec_01JR70S5VT", "run_id": "run_01JKBHGW4W", "step": 1 }, "owner": { "id": "tsk_01JMR8F4VE", "name": "Jordan Rivera" }, "record": { "id": "tsk_01JMR8F4VE", "name": "Jordan Rivera", "object": "contacts" }, "resolved_at": "2026-12-03T14:30:00Z", "snoozed_until": "2026-12-03T14:30:00Z", "source": { "label": "Example", "value": "example" }, "status": { "label": "Example", "value": "example" }, "title": "Discovery call", "updated_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/organization/list-teams/ # List teams `GET /v1/teams` Required scope: `organization:read` The organization's teams. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/teams?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/teams?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/teams", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "created_at": "2026-12-03T14:30:00Z", "id": "tm_01JDGP9VFM", "member_count": 3, "name": "Jordan Rivera" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/messages/list-lines/ # List texting lines `GET /v1/texting/lines` Required scope: `messages:read` The numbers texts are sent from. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/texting/lines?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/texting/lines?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/texting/lines", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "created_at": "2026-12-03T14:30:00Z", "id": "_01J8FC10VR", "kind": { "label": "Example", "value": "example" }, "number": "example", "owner_id": "usr_01J0ZTM2YK", "provider": "example", "status": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/messages/create-thread/ # Message a contact `POST /v1/threads` Required scope: `messages:write` Send a text from a line, or an email from a mailbox. When a conversation with that number or address exists, the message goes into it and the answer is a 200. Texts are charged. ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `attachments` (object[], optional) Default: `[]`. - `content_type` (string, required) - `data` (string, required) - `name` (string, required) - `body` (string, required) - `contact_id` (string, required) - `html` (string or null, optional) - `line_id` (string or null, optional) - `mailbox_id` (string or null, optional) - `subject` (string or null, optional) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/threads" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "attachments": [ { "content_type": "example", "data": "example", "name": "Jordan Rivera" } ], "body": "Thanks for your time today. Here is what we agreed.", "contact_id": "ct_01JCH8XFQH", "html": "example", "line_id": "lin_01JCP6WF0H", "mailbox_id": "mbx_01JRJX4977" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/threads", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "attachments": [ { "content_type": "example", "data": "example", "name": "Jordan Rivera" } ], "body": "Thanks for your time today. Here is what we agreed.", "contact_id": "ct_01JCH8XFQH", "html": "example", "line_id": "lin_01JCP6WF0H", "mailbox_id": "mbx_01JRJX4977" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/threads", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "attachments": [ { "content_type": "example", "data": "example", "name": "Jordan Rivera", }, ], "body": "Thanks for your time today. Here is what we agreed.", "contact_id": "ct_01JCH8XFQH", "html": "example", "line_id": "lin_01JCP6WF0H", "mailbox_id": "mbx_01JRJX4977", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "id": "thr_01JWGG21AJ", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/messages/query-threads/ # Query conversations `POST /v1/threads/query` Required scope: `messages:read` Conversations with contacts by text and email. The body is a table query: `columns`, `filters` (`{ field, op, value }`), `sort` (up to 5 keys), `group_by`, `cursor` and `limit`. `GET /v1/fields?object=` lists the columns you can ask for, filter, sort and group by. ## Request body (application/json) - `columns` (string[] or null, optional) - `cursor` (string or null, optional) - `filters` (object[] or null, optional) - `field` (string, required) - `op` (string, required) Allowed values: `"eq"`, `"neq"`, `"contains"`, `"starts_with"`, `"in"`, `"gt"`, `"gte"`, `"lt"`, `"lte"`, `"is_empty"`, `"is_not_empty"`. - `value` (string | integer | number | boolean | string[] or null, optional): What the field is compared with; a list for `in`. - `group_by` (string or null, optional) - `is_archived` (boolean, optional) Default: `false`. - `limit` (integer, optional) Default: `50`. - `offset` (integer or null, optional) - `sort` (object[] or null, optional) - `direction` (string, optional) Allowed values: `"asc"`, `"desc"`. Default: `"asc"`. - `field` (string, required) - `view_id` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/threads/query" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "is_archived": false, "limit": 50 }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/threads/query", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "columns": [ "example" ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example" } ], "group_by": "example", "is_archived": false, "limit": 50 }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/threads/query", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "columns": [ "example", ], "cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "filters": [ { "field": "example", "op": "eq", "value": "example", }, ], "group_by": "example", "is_archived": False, "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "columns": [ { "description": "A short description.", "group": "example", "id": "thr_01JWGG21AJ", "is_ai": true, "is_custom": true, "is_multi": true, "is_read_only": true, "key": "example_key", "label": "Example", "link_object": "example", "metric": { "key": "example_key", "minimum_sample": 1, "period": "example", "unit": "example" }, "options": [ { "color": "purple", "label": "Example", "value": "example" } ], "type": { "label": "Example", "value": "example" } } ], "data": [ { "id": "thr_01JWGG21AJ", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ], "groups": [ { "amounts": [ { "amount": 2400000, "currency": "USD" } ], "record_count": 3, "value": "example" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ", "total": 3 } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/messages/update-thread/ # Update a conversation `PATCH /v1/threads/{thread_id}` Required scope: `messages:write` Archive a conversation or bring it back, mark it read or unread, or give it to another member. ## Path parameters - `thread_id` (string, required) ## Request body (application/json) - `is_archived` (boolean or null, optional) - `is_unread` (boolean or null, optional) - `owner_id` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/threads/thr_01JN8GXHCA" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "is_archived": false, "is_unread": true, "owner_id": "usr_01J0ZTM2YK" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/threads/thr_01JN8GXHCA", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "is_archived": false, "is_unread": true, "owner_id": "usr_01J0ZTM2YK" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/threads/thr_01JN8GXHCA", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "is_archived": False, "is_unread": True, "owner_id": "usr_01J0ZTM2YK", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "id": "thr_01JWGG21AJ", "values": { "example_key": { "amount": 2400000, "currency": "USD" } } } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/messages/list-messages/ # List a conversation's messages `GET /v1/threads/{thread_id}/messages` Required scope: `messages:read` The messages of one conversation. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `thread_id` (string, required) ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/threads/thr_01JN8GXHCA/messages?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/threads/thr_01JN8GXHCA/messages?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/threads/thr_01JN8GXHCA/messages", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "attachments": [ "example" ], "body": "Thanks for your time today. Here is what we agreed.", "created_at": "2026-12-03T14:30:00Z", "direction": "example", "error": null, "id": "thr_01JWGG21AJ", "provider": "example", "received_at": "2026-12-03T14:30:00Z", "sent_at": "2026-12-03T14:30:00Z", "sent_by": "example", "status": "example", "subject": "Discovery call", "thread_id": "thr_01JN8GXHCA" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/messages/send-message/ # Send a message `POST /v1/threads/{thread_id}/messages` Required scope: `messages:write` Send a text or email in a conversation. Texts are charged; a text the provider refuses is given back. ## Path parameters - `thread_id` (string, required) ## Header parameters - `Idempotency-Key` (string or null, optional) ## Request body (application/json) - `attachments` (object[], optional) Default: `[]`. - `content_type` (string, required) - `data` (string, required) - `name` (string, required) - `body` (string, required) - `html` (string or null, optional) - `line_id` (string or null, optional) - `mailbox_id` (string or null, optional) - `subject` (string or null, optional) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/threads/thr_01JN8GXHCA/messages" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "attachments": [ { "content_type": "example", "data": "example", "name": "Jordan Rivera" } ], "body": "Thanks for your time today. Here is what we agreed.", "html": "example", "line_id": "lin_01JCP6WF0H", "mailbox_id": "mbx_01JRJX4977", "subject": "Discovery call" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/threads/thr_01JN8GXHCA/messages", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "attachments": [ { "content_type": "example", "data": "example", "name": "Jordan Rivera" } ], "body": "Thanks for your time today. Here is what we agreed.", "html": "example", "line_id": "lin_01JCP6WF0H", "mailbox_id": "mbx_01JRJX4977", "subject": "Discovery call" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/threads/thr_01JN8GXHCA/messages", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "attachments": [ { "content_type": "example", "data": "example", "name": "Jordan Rivera", }, ], "body": "Thanks for your time today. Here is what we agreed.", "html": "example", "line_id": "lin_01JCP6WF0H", "mailbox_id": "mbx_01JRJX4977", "subject": "Discovery call", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "attachments": [ "example" ], "body": "Thanks for your time today. Here is what we agreed.", "created_at": "2026-12-03T14:30:00Z", "direction": "example", "error": null, "id": "thr_01JWGG21AJ", "provider": "example", "received_at": "2026-12-03T14:30:00Z", "sent_at": "2026-12-03T14:30:00Z", "sent_by": "example", "status": "example", "subject": "Discovery call", "thread_id": "thr_01JN8GXHCA" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/webhooks/retry-webhook-delivery/ # Retry a delivery `POST /v1/webhook-deliveries/{delivery_id}/retry` Required scope: `webhooks:write` Send a delivery again now, whatever its status, and answer with how it went. `409 endpoint_disabled` while the endpoint is switched off. ## Path parameters - `delivery_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/webhook-deliveries/whd_01JG3FGN99/retry" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-deliveries/whd_01JG3FGN99/retry", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/webhook-deliveries/whd_01JG3FGN99/retry", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "attempt_count": 3, "attempts": [ { "attempted_at": "2026-12-03T14:30:00Z", "duration_ms": 1260, "error": null, "status_code": 200 } ], "created_at": "2026-12-03T14:30:00Z", "endpoint_id": "whe_01JCB71ZCD", "event_id": "evt_01JRTRTZRH", "event_type": "recording.analyzed", "id": "whd_01JXKPPNKC", "last_error": "example", "last_status_code": 200, "next_attempt_at": "2026-12-03T14:30:00Z", "status": "pending", "succeeded_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/webhooks/list-webhook-endpoints/ # List webhook endpoints `GET /v1/webhook-endpoints` Required scope: `webhooks:read` Your webhook endpoints: where Valeron sends events, which event types each wants, and whether it is switched on. Paged with `limit` (at most 200) and `cursor`. ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/webhook-endpoints?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-endpoints?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/webhook-endpoints", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "created_at": "2026-12-03T14:30:00Z", "description": "A short description.", "disabled_reason": null, "events": [ "*" ], "failing_since": "2026-12-03T14:30:00Z", "id": "whe_01JGY5XV1J", "is_enabled": true, "updated_at": "2026-12-03T14:30:00Z", "url": "https://example.com" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/webhooks/create-webhook-endpoint/ # Create a webhook endpoint `POST /v1/webhook-endpoints` Required scope: `webhooks:write` Have events sent to an `https://` URL. `events` lists the event types to send (`contact.stage_changed`, `meeting.booked`, `message.received`, `recording.analyzed`), or `["*"]` for all. The answer carries the signing secret (`whsec_…`) this once: every delivery has a `Valeron-Signature: t=,v1=` header, where the signature is the hex HMAC-SHA256 of `.` keyed by the secret. Check it, and refuse a `t` more than 5 minutes old. A `2xx` within 10 seconds is success; otherwise the delivery is tried again 1 minute, 5 and 30 minutes, and 2, 5, 10 and 24 hours after the event. An endpoint whose deliveries all fail for 3 days is switched off and the Owner is told. Order is not guaranteed: use the event `id` to ignore a repeat and the object's `updated_at` to ignore an older state. At most 10 endpoints (`409 webhook_endpoint_limit`). ## Request body (application/json) - `description` (string or null, optional) - `events` (string[], required) Allowed values: `"*"`, `"recording.analyzed"`, `"contact.stage_changed"`, `"contact.created"`, `"contact.updated"`, `"meeting.booked"`, `"message.received"`, `"payment.succeeded"`. - `url` (string, required) ## Responses - `201`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/webhook-endpoints" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "A short description.", "events": [ "*" ], "url": "https://example.com" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-endpoints", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "description": "A short description.", "events": [ "*" ], "url": "https://example.com" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/webhook-endpoints", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "description": "A short description.", "events": [ "*", ], "url": "https://example.com", }, ) response.raise_for_status() data = response.json() ``` ### Response 201 ```json { "created_at": "2026-12-03T14:30:00Z", "description": "A short description.", "disabled_reason": null, "events": [ "*" ], "failing_since": "2026-12-03T14:30:00Z", "id": "whe_01JGY5XV1J", "is_enabled": true, "secret": "example", "updated_at": "2026-12-03T14:30:00Z", "url": "https://example.com" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/webhooks/update-webhook-endpoint/ # Update a webhook endpoint `PATCH /v1/webhook-endpoints/{endpoint_id}` Required scope: `webhooks:write` Change the URL, the event types or the description, or switch the endpoint off (`is_enabled: false`) or on again. ## Path parameters - `endpoint_id` (string, required) ## Request body (application/json) - `description` (string or null, optional) - `events` (string[] or null, optional) Allowed values: `"*"`, `"recording.analyzed"`, `"contact.stage_changed"`, `"contact.created"`, `"contact.updated"`, `"meeting.booked"`, `"message.received"`, `"payment.succeeded"`. - `is_enabled` (boolean or null, optional) - `url` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X PATCH "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD" \ -H "Authorization: Bearer $VALERON_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "description": "A short description.", "events": [ "*" ], "is_enabled": true, "url": "https://example.com" }' ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD", { method: "PATCH", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "description": "A short description.", "events": [ "*" ], "is_enabled": true, "url": "https://example.com" }), }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.patch( "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, json={ "description": "A short description.", "events": [ "*", ], "is_enabled": True, "url": "https://example.com", }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "created_at": "2026-12-03T14:30:00Z", "description": "A short description.", "disabled_reason": null, "events": [ "*" ], "failing_since": "2026-12-03T14:30:00Z", "id": "whe_01JGY5XV1J", "is_enabled": true, "updated_at": "2026-12-03T14:30:00Z", "url": "https://example.com" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/webhooks/delete-webhook-endpoint/ # Delete a webhook endpoint `DELETE /v1/webhook-endpoints/{endpoint_id}` Required scope: `webhooks:write` Delete the endpoint and its delivery history. ## Path parameters - `endpoint_id` (string, required) ## Responses - `204`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X DELETE "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD", { method: "DELETE", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); ``` ```python title="Python" import os import requests response = requests.delete( "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() ``` ### Response 204 No body. ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/webhooks/list-webhook-deliveries/ # List an endpoint's deliveries `GET /v1/webhook-endpoints/{endpoint_id}/deliveries` Required scope: `webhooks:read` The endpoint's deliveries of the last 30 days, newest first, each with every attempt: when, the status code that came back, the error and how long it took. Paged with `limit` (at most 200) and `cursor`. ## Path parameters - `endpoint_id` (string, required) ## Query parameters - `limit` (integer, optional) Default: `50`. - `cursor` (string or null, optional) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/deliveries?limit=50" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/deliveries?limit=50", { method: "GET", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.get( "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/deliveries", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, params={ "limit": 50, }, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "data": [ { "attempt_count": 3, "attempts": [ { "attempted_at": "2026-12-03T14:30:00Z", "duration_ms": 1260, "error": null, "status_code": 200 } ], "created_at": "2026-12-03T14:30:00Z", "endpoint_id": "whe_01JCB71ZCD", "event_id": "evt_01JRTRTZRH", "event_type": "recording.analyzed", "id": "whe_01JGY5XV1J", "last_error": "example", "last_status_code": 200, "next_attempt_at": "2026-12-03T14:30:00Z", "status": "pending", "succeeded_at": "2026-12-03T14:30:00Z" } ], "has_more": false, "next_cursor": "eyJ1cGRhdGVkX2F0IjoiMjAyNi0xMi0wM1QxNDozMDowMFoifQ" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/webhooks/rotate-webhook-secret/ # Rotate a signing secret `POST /v1/webhook-endpoints/{endpoint_id}/rotate-secret` Required scope: `webhooks:write` Replace the endpoint's signing secret. Deliveries from now on are signed with the new secret, which this answer shows once; the old one stops at once. ## Path parameters - `endpoint_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/rotate-secret" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/rotate-secret", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/rotate-secret", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "created_at": "2026-12-03T14:30:00Z", "description": "A short description.", "disabled_reason": null, "events": [ "*" ], "failing_since": "2026-12-03T14:30:00Z", "id": "whe_01JGY5XV1J", "is_enabled": true, "secret": "example", "updated_at": "2026-12-03T14:30:00Z", "url": "https://example.com" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ``` --- URL: https://valeron.io/docs/api-reference/webhooks/test-webhook-endpoint/ # Send a test ping `POST /v1/webhook-endpoints/{endpoint_id}/test` Required scope: `webhooks:write` Send a `ping` event to the endpoint now and answer with the delivery and its attempt, so you can check your receiver and its signature check. A ping is tried once. ## Path parameters - `endpoint_id` (string, required) ## Responses - `200`: Successful Response - `400`: The request is not valid. - `401`: Not signed in, or the credentials are not valid. - `402`: The balance is too low. - `403`: Not allowed to do this. - `404`: Not found. - `409`: Conflicts with the current state. - `413`: The request body is too large. - `415`: The content type is not supported. - `422`: A value in the request is not valid. - `429`: Too many requests. Wait for `Retry-After` seconds. - `500`: Something went wrong on our side. - `502`: A service Valeron depends on refused the request. - `503`: A service Valeron depends on is unavailable. ## Examples ### Request ```bash title="cURL" curl -X POST "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/test" \ -H "Authorization: Bearer $VALERON_API_KEY" ``` ```js title="JavaScript" const response = await fetch("https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/test", { method: "POST", headers: { Authorization: `Bearer ${process.env.VALERON_API_KEY}`, }, }); if (!response.ok) throw new Error(`Valeron returned ${response.status}`); const data = await response.json(); ``` ```python title="Python" import os import requests response = requests.post( "https://api.valeron.io/v1/webhook-endpoints/whe_01JCB71ZCD/test", headers={"Authorization": f"Bearer {os.environ['VALERON_API_KEY']}"}, ) response.raise_for_status() data = response.json() ``` ### Response 200 ```json { "attempt_count": 3, "attempts": [ { "attempted_at": "2026-12-03T14:30:00Z", "duration_ms": 1260, "error": null, "status_code": 200 } ], "created_at": "2026-12-03T14:30:00Z", "endpoint_id": "whe_01JCB71ZCD", "event_id": "evt_01JRTRTZRH", "event_type": "recording.analyzed", "id": "whe_01JGY5XV1J", "last_error": "example", "last_status_code": 200, "next_attempt_at": "2026-12-03T14:30:00Z", "status": "pending", "succeeded_at": "2026-12-03T14:30:00Z" } ``` ### Response 401 ```json { "error": null } ``` ### Response 402 ```json { "error": null } ``` ### Response 403 ```json { "error": null } ``` ### Response 404 ```json { "error": null } ```