{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"REST quickstart"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"rest-quickstart","__idx":0},"children":["REST quickstart"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["For IT and engineering teams."]}," This is the organization-level integration surface, authenticated with a key issued to your company. If you're an end user who wants to work with your own calls from an AI assistant, you want the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/mcp-connector"},"children":["MCP connector"]},"; it needs no code."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Junior REST API returns call (interview) records and their transcripts, and — where write access is enabled for your organization — creates projects and ingests calls from sources Junior has no direct integration with."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Base URL:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://api.junior.ai/v1\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"authentication","__idx":1},"children":["Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every request needs an API key, issued to your organization by the Junior team and sent as a bearer token:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl https://api.junior.ai/v1/calls \\\n  -H \"Authorization: Bearer jr_live_...\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Keys are shown once at issuance — store them in your secret manager. A missing or invalid key returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," with code ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unauthorized"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"your-first-request","__idx":2},"children":["Your first request"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List calls from a date range. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["start_date"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["end_date"]}," are both required"]}," — the endpoint returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," without them. Each is an RFC 3339 date-time; UTC (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["...Z"]},") or a numeric offset (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["...-05:00"]},") are both accepted:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -G \"https://api.junior.ai/v1/calls\" \\\n  --data-urlencode \"start_date=2026-01-01T00:00:00Z\" \\\n  --data-urlencode \"end_date=2026-12-31T23:59:59Z\" \\\n  --data-urlencode \"per_page=25\" \\\n  -H \"Authorization: Bearer $JUNIOR_API_KEY\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then fetch one call in full, using a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["call_id"]}," from that response:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl \"https://api.junior.ai/v1/calls/$CALL_ID\" \\\n  -H \"Authorization: Bearer $JUNIOR_API_KEY\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"creating-a-project","__idx":3},"children":["Creating a project"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/projects"]}," creates a project and its lead and member users, given their email addresses."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.junior.ai/v1/projects\" \\\n  -H \"Authorization: Bearer $JUNIOR_API_KEY\" \\\n  -H \"content-type: application/json\" \\\n  -d '{\n    \"name\": \"Project Atlas\",\n    \"lead_emails\": [\"lead@yourfirm.com\"],\n    \"member_emails\": [\"analyst@yourfirm.com\"],\n    \"billing_code\": \"ATLAS-2026\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}," and at least one ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lead_emails"]}," entry are required. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["billing_office_name"]}," takes an office name rather than an id — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/billing-offices"]}," lists the valid ones."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["People can join before or after project creation."]}," Existing users in your organization are added immediately. Addresses without an account receive a pending project invitation, without an invitation email; they are added automatically when they sign in. The response separates current ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lead_emails"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["member_emails"]}," from pending ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invited_lead_emails"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["invited_member_emails"]},". Compare both sets against your request to see who has access now and who is still pending."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The first address in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lead_emails"]}," is the designated project creator. If that person has not signed in yet, creator attribution stays empty until their lead membership is granted. A lead who already belongs only to another organization rejects the entire request with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]},"; members who belong only to another organization are skipped."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Retrying is safe."]}," Send the same body twice within 24 hours and the second request comes back with the first one's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["201"]}," and the same project, rather than a duplicate. You don't have to opt in to this: Junior fingerprints the request body, so a timeout you retry blindly can't leave you with two projects. It matters because there is no project delete in this API — a duplicate needs us to clean it up by hand."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create two projects with identical bodies deliberately, distinguish them with an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Idempotency-Key"]}," header:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.junior.ai/v1/projects\" \\\n  -H \"Authorization: Bearer $JUNIOR_API_KEY\" \\\n  -H \"Idempotency-Key: $(uuidgen)\" \\\n  -H \"content-type: application/json\" \\\n  -d '{ \"name\": \"Project Atlas\", \"lead_emails\": [\"lead@yourfirm.com\"] }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Two different keys mean two intended creates. A key you supply also doesn't expire after 24 hours, so it's the right tool if a retry might arrive days late. Reusing one key with a changed body returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["422"]}," rather than guessing which you meant; retrying while the first attempt is still running returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["409"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ingesting-a-call","__idx":4},"children":["Ingesting a call"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you have transcripts in a system Junior doesn't integrate with directly, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /v1/calls"]}," files them as real calls — they run the same processing pipeline as an upload through the app, so they end up cleaned, summarised into key takeaways, and searchable."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Requires write access to be enabled for your organization; without it the request returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["403"]}," with code ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_not_enabled"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["A call must arrive with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["project_id"]}," or at least one ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attendee_emails"]}," entry."]}," An API key authenticates your organization, not a person, so an ingested call has no creator. Give it no project and no attendees and nobody in Junior would be able to see it, so the request is rejected with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]},". Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["project_id"]}," to file it in a project, where every member of that project sees it, or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attendee_emails"]}," so the people who were on the call can find it."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Project ids come from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/projects"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -G \"https://api.junior.ai/v1/projects\" \\\n  --data-urlencode \"name=Project Atlas\" \\\n  -H \"Authorization: Bearer $JUNIOR_API_KEY\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Then ingest:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -X POST \"https://api.junior.ai/v1/calls\" \\\n  -H \"Authorization: Bearer $JUNIOR_API_KEY\" \\\n  -H \"content-type: application/json\" \\\n  -d '{\n    \"external_id\": \"your-system-call-4821\",\n    \"project_id\": \"'\"$PROJECT_ID\"'\",\n    \"name\": \"Jane Expert\",\n    \"job_title\": \"VP Engineering\",\n    \"expert_organization\": \"AcmeCo\",\n    \"date\": \"2026-01-02T10:00:00-05:00\",\n    \"source\": \"YourSystem\",\n    \"transcript\": \"Speaker 1: ...\\nSpeaker 2: ...\"\n  }'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transcript"]}," are required beyond the reachability rule above."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Send ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["external_id"]},". It's your own identifier for the call, and it's the deduplication key: re-sending the same one is a no-op, which is what makes retries safe. Omit it and Junior derives a fingerprint from the call's contents, so a corrected re-send lands as a brand-new call."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The response is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["202"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": {\n    \"external_id\": \"your-system-call-4821\",\n    \"project_id\": \"…\",\n    \"status\": \"processing\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The call is created asynchronously and takes a minute or two to appear. Poll ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /v1/calls"]}," to pick it up; it won't come back in this response."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Transcripts are plain text or markdown — this is not a file upload. Very large ones return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["413"]},"; note the limit applies to the serialized request, so escape-heavy text (lots of newlines or quotes) fits less than its raw length suggests."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"pagination","__idx":5},"children":["Pagination"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List endpoints are page-based. Pass ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page"]}," (1-indexed) and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["per_page"]},", and read the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pagination"]}," object to decide whether to keep going:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"data\": [{ \"call_id\": \"...\" }],\n  \"pagination\": {\n    \"page\": 1,\n    \"per_page\": 25,\n    \"total_items\": 412,\n    \"total_pages\": 17\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Keep requesting until ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page"]}," equals ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["total_pages"]},". List responses return call references — fetch ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/calls/{call_id}"]}," for the full record including the transcript."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"errors","__idx":6},"children":["Errors"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every error uses the same envelope:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"error\": {\n    \"code\": \"bad_request\",\n    \"message\": \"Human-readable explanation\",\n    \"request_id\": \"01HQ...\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["code"]}," is one of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bad_request"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unauthorized"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["forbidden"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rest_not_enabled"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_not_enabled"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_not_configured"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["not_found"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["payload_too_large"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idempotency_key_in_progress"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["idempotency_key_reused"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rate_limited"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["internal_error"]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Log ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["request_id"]}]}," — it's the fastest way for Junior support to trace a specific failed call."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Two of those are easy to mistake for a bad key: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rest_not_enabled"]}," (403) means the REST API isn't switched on for your organization yet, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["forbidden"]}," (403) means the key is valid but you're calling from an IP outside its allowlist. Neither is fixed by reissuing the key."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"rate-limits","__idx":7},"children":["Rate limits"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Responses carry ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-RateLimit-Limit"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-RateLimit-Remaining"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-RateLimit-Reset"]},". On ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}," (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rate_limited"]},"), back off until the reset timestamp."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"field-availability","__idx":8},"children":["Field availability"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Some fields on a call are gated by your organization's configuration — for example, participant emails are present only when your organization has enabled that field. A field that isn't enabled comes back omitted or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},", so treat these as optional in your client."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"full-reference","__idx":9},"children":["Full reference"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/openapi"},"children":["API reference"]}," for every endpoint, parameter, and response field."]}]},"headings":[{"value":"REST quickstart","id":"rest-quickstart","depth":1},{"value":"Authentication","id":"authentication","depth":2},{"value":"Your first request","id":"your-first-request","depth":2},{"value":"Creating a project","id":"creating-a-project","depth":2},{"value":"Ingesting a call","id":"ingesting-a-call","depth":2},{"value":"Pagination","id":"pagination","depth":2},{"value":"Errors","id":"errors","depth":2},{"value":"Rate limits","id":"rate-limits","depth":2},{"value":"Field availability","id":"field-availability","depth":2},{"value":"Full reference","id":"full-reference","depth":2}],"frontmatter":{"title":"REST quickstart","seo":{"title":"REST quickstart"}},"lastModified":"2026-09-18T19:03:37.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/rest","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}