Redstring Hiring API Documentation
Integrate Redstring’s complete hiring engine — JD extraction, saved roles, candidate discovery, AI matching, shortlists, personal-first contact reveals, outreach campaigns, and signed webhooks — directly into your ATS, CRM, or internal workflow.
Production Base URLs
https://api.redstring.co.in/api/v11. Generate a scoped key
Create a least-privilege rs_live_... Bearer key in Organization Settings.
2. Run searches & reveals
Call POST /api/v1/searches and POST /api/v1/contact-reveals with Idempotency-Key.
3. Receive signed webhooks
Subscribe HTTPS endpoints to search.completed, contact.revealed, and outreach.replied.
Authentication, Workspace Targeting & Scopes
Pass your API key in the Authorization header over HTTPS. For organization-wide keys, specify the target workspace in X-Workspace-Id (discoverable via GET /api/v1/workspaces).
Authorization: Bearer rs_live_a1b2c3d4_9f8e7d6c5b4a3f2e1d0c9b8a7f6e5d4c X-Workspace-Id: ws_01J9Z8A2B3C4D5E6 Idempotency-Key: 7c9e6679-7425-40de-944b-e07fc1f90ae7 Content-Type: application/json
| Scope | Workspace Role | Allowed Actions |
|---|---|---|
| hiring:read | Viewer, Editor, Owner | Read workspaces, credits, roles, shortlists, briefs, searches, candidates, contacts, campaigns, threads, and webhooks. |
| hiring:write | Editor, Owner | Create/update roles, create/refine searches, trigger AI matching, manage shortlists, add manual contacts, and manage webhooks. |
| contacts:reveal | Editor, Owner | Unlock personal-first emails (1 credit) and mobile numbers (5 credits). |
| outreach:write | Editor, Owner | Create campaigns, enroll candidates, and send/reply in outreach threads. |
Response Envelopes, Idempotency & Credit Schedule
Every /api/v1/* response includes X-API-Version: 1 and returns a { data, meta } or { error } JSON envelope. Paid actions draw from your company’s shared credit balance, respect personal monthly credit caps, and release holds at 0 credits when a contact is unavailable.
| Operation | Credits | Zero-Charge Guarantee |
|---|---|---|
Candidate search (POST /api/v1/searches) | 2 credits / batch (up to 10) | Released automatically if provider fails; Idempotency-Key prevents duplicate runs. |
AI profile matching (POST /api/v1/searches/:id/matches) | 6 credits / batch | Includes generative candidate summary & highlights; released if evaluation fails. |
Personal-first email reveal (revealEmail: true) | 1 credit | 0 credits charged when status === "no_data". |
Mobile phone reveal (revealPhone: true) | 5 credits | 0 credits charged when status === "no_data". |
End-to-End Workflow Recipes
Copy-paste examples for CLI scripts, backend services, ATS sync, and automation tools.
export REDSTRING_API_KEY="rs_live_a1b2c3d4_..."
export REDSTRING_WORKSPACE_ID="ws_01J9Z..."
export BASE_URL="https://api.redstring.co.in/api/v1"
# 1. Launch a candidate search directly from a Job Description
SEARCH_JSON=$(curl -sS -X POST "$BASE_URL/searches" \
-H "Authorization: Bearer $REDSTRING_API_KEY" \
-H "X-Workspace-Id: $REDSTRING_WORKSPACE_ID" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"title": "Senior Backend Engineer",
"brief": "Role: Senior Backend Engineer\nLocation: Bengaluru, India\nSkills: Node JS, PostgreSQL, Go\n5+ years building distributed systems.",
"targetCandidateCount": 20,
"runImmediately": true
}')
SEARCH_ID=$(echo "$SEARCH_JSON" | jq -r '.data.search.id')
# 2. List ranked candidates (includes generative summary & highlights)
CANDIDATE_ID=$(curl -sS "$BASE_URL/searches/$SEARCH_ID/candidates?limit=10" \
-H "Authorization: Bearer $REDSTRING_API_KEY" \
-H "X-Workspace-Id: $REDSTRING_WORKSPACE_ID" | jq -r '.data[0].id')
# 3. Reveal personal-first email (0 credits charged if no email is found)
curl -sS -X POST "$BASE_URL/contact-reveals" \
-H "Authorization: Bearer $REDSTRING_API_KEY" \
-H "X-Workspace-Id: $REDSTRING_WORKSPACE_ID" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"searchId\":\"$SEARCH_ID\",\"candidateId\":\"$CANDIDATE_ID\",\"revealEmail\":true}"Complete v1 Endpoint Reference
Workspaces & Credits
Inspect accessible projects, shared company credit allowance, and itemized operation settlements.
- hiring:readGET
/api/v1/workspacesList every workspace the API key owner can access and their role (owner, editor, viewer).
- hiring:readGET
/api/v1/creditsRead current subscription plan, shared credit balance (limit, used, reserved, remaining), and period end.
- hiring:readGET
/api/v1/credits/operationsCursor-paginated ledger of searches, AI matching, contact reveals, and zero-charge releases.
Roles & Shortlists
Manage hiring roles across lifecycle states and curate shortlisted candidates per role.
- hiring:readGET
/api/v1/rolesList active and paused roles in the workspace (?includeClosed=true includes filled & closed).
- hiring:writePOST
/api/v1/rolesCreate a saved hiring role and initial draft search from a title and optional brief/JD.
- hiring:writePATCH
/api/v1/roles/{roleId}Transition role status between active, paused, filled, and closed.
- hiring:readGET
/api/v1/roles/{roleId}/shortlistList all shortlisted candidate profiles on a role.
- hiring:writePOST
/api/v1/roles/{roleId}/shortlistAdd a search candidate to the role shortlist and emit candidate.shortlisted.
- hiring:writeDELETE
/api/v1/roles/{roleId}/shortlist/{profileId}Remove a candidate from the shortlist (resets decision to unreviewed; preserves contacts & threads).
Briefs, Candidate Searches & AI Matching
Parse JDs into grounded criteria, run candidate discovery, inspect ranked profiles, and evaluate criterion fit.
- hiring:readPOST
/api/v1/briefs/extractParse a raw hiring brief or multi-line JD into role, hierarchical locations, compound skills, and experience at 0 credits.
- hiring:readGET
/api/v1/searchesList saved candidate searches in the workspace.
- hiring:writePOST
/api/v1/searchesCreate a search from brief/criteria and launch discovery immediately when runImmediately=true (2 credits/batch).
- hiring:readGET
/api/v1/searches/{searchId}Read search criteria, version, and operation status (queued, running, completed, no_results, failed).
- hiring:writePATCH
/api/v1/searches/{searchId}Update saved search criteria and optionally trigger a recalibration run (rerun=true).
- hiring:readGET
/api/v1/searches/{searchId}/candidatesPaginated ranked candidates with filters (query, location, decision) and generative profileAnalysis summaries.
- hiring:readGET
/api/v1/searches/{searchId}/candidates/{candidateId}Read universal candidate profile context (personKey continuity across workspace searches).
- hiring:writePOST
/api/v1/searches/{searchId}/matchesTrigger AI criterion matching (6 credits/batch) + generative candidate summaries and highlights.
- hiring:readGET
/api/v1/searches/{searchId}/matchesPoll AI matching statuses and structured strengths/gaps for candidateIds.
Contact Reveals & Contacts Directory
Unlock verified personal-first emails and mobile numbers with 2.5s fast-path settlement and zero-charge misses.
- contacts:revealPOST
/api/v1/contact-revealsUnlock candidate email (1 credit) and/or mobile (5 credits). Settles to no_data at 0 credits if unavailable.
- hiring:readGET
/api/v1/contact-reveals/{searchId}/{candidateId}Read unlocked emails and phone numbers for a candidate at 0 credits.
- hiring:readGET
/api/v1/contactsCursor-paginated directory of unlocked and manually added contacts across the workspace.
- hiring:writePOST
/api/v1/contactsCreate a manual candidate contact on a hiring role at 0 credits.
Campaigns, Outreach Threads & Webhooks
Automate personalized email sequences, read correlated replies, and subscribe to HMAC-signed webhooks.
- hiring:readGET
/api/v1/campaignsList outreach campaigns in the workspace.
- outreach:writePOST
/api/v1/campaignsCreate a campaign from an existing templateId or inline subject + bodyText ({{first_name}}, {{company}}).
- hiring:readGET
/api/v1/campaigns/{campaignId}Get campaign template copy and enrolled members.
- outreach:write + contacts:revealPOST
/api/v1/campaigns/{campaignId}/enrollmentsAuto-shortlist, reveal email, and enroll candidate into a campaign.
- hiring:readGET
/api/v1/campaigns/enrollmentsCheck enrollment status for searchId + candidateId.
- hiring:readGET
/api/v1/outreach/messagesRead chronological outbound messages and inbound candidate replies (threadId-anchored).
- outreach:writePOST
/api/v1/outreach/messagesSend a direct outreach or follow-up email to a candidate.
- hiring:writePOST
/api/v1/webhooksRegister an HTTPS webhook endpoint and receive its whsec_... signing secret.
- hiring:writePOST
/api/v1/webhooks/{webhookId}/testDispatch a signed webhook.ping event.
- hiring:readGET
/api/v1/webhooks/{webhookId}/deliveriesInspect recent webhook delivery HTTP statuses and errors.
Outbound Webhooks & Signature Verification
Verify X-Redstring-Signature (HMAC-SHA256) using your endpoint’s whsec_... secret.
import { createHmac, timingSafeEqual } from "node:crypto"
export function verifyRedstringWebhook(
rawBody: string,
signatureHeader: string,
signingSecret: string,
toleranceSeconds = 300
): boolean {
const parts = Object.fromEntries(
signatureHeader.split(",").map((pair) => pair.trim().split("=", 2))
)
const ts = Number(parts.t)
const v1 = parts.v1
if (!Number.isFinite(ts) || !v1) return false
if (Math.abs(Math.floor(Date.now() / 1000) - ts) > toleranceSeconds) return false
const expected = createHmac("sha256", signingSecret)
.update(`${ts}.${rawBody}`)
.digest("hex")
const a = Buffer.from(v1, "hex")
const b = Buffer.from(expected, "hex")
return a.length === b.length && timingSafeEqual(a, b)
}Error Codes & Rate Limiting
Rate limits are keyed per API key prefix and returned via RateLimit-Limit, RateLimit-Remaining, RateLimit-Reset, and Retry-After.
| HTTP | Code | Resolution |
|---|---|---|
| 400 | VALIDATION_ERROR | Inspect error.details for invalid fields or non-UUID Idempotency-Key. |
| 401 | UNAUTHORIZED | Check Authorization: Bearer rs_live_... header and ensure the key is active. |
| 403 | FORBIDDEN | Grant required scope (hiring:write, contacts:reveal, outreach:write) or Editor access. |
| 404 | NOT_FOUND | Verify resource ID and X-Workspace-Id. |
| 429 | RATE_LIMITED | Wait Retry-After seconds before retrying. |