PageSourceSearch

https://www.academicjobs.com/_next/static/chunks/5137.eae18665f6f78928.js

js academicjobs.com collected 2026-10-02 10:05:08 UTC 43,276 bytes, 19 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5137],{5137:(e,s,t)=>{t.r(s),t.d(s,{default:()=>I});var a=t(95155),n=t(12115),r=t(41463);let i="sk_test_jobelephant_sandbox";function o(){return r.env.NEXT_PUBLIC_PARTNER_API_SANDBOX_KEY??i}let l="https://api.academicjobs.com/api/v1/partner/jobs",c="partner_api_sandbox_jobs_v2",d="jobelephant-",x="JobElephant";class h extends Error{status;constructor(e,s){super(s),this.status=e}}function m(){return{jobs:{},seq:9e5}}function u(){try{let e=localStorage.getItem(c);if(!e)return m();return JSON.parse(e)}catch{return m()}}function p(e){localStorage.setItem(c,JSON.stringify(e))}function j(e){return d+String(e).trim()}function b(e){return new h(404,`Job with reference ${e} not found for partner ${x}`)}function y(e,s){let t,a=function(e){if(void 0===e)return{first:void 0,last:void 0};if(!e)return{first:null,last:null};let s=String(e).trim().split(/\s+/);return 1===s.length?{first:s[0],last:null}:{first:s[0],last:s.slice(1).join(" ")}}(e.contact_name);if(void 0!==e.expiration_date)t=e.expiration_date;else if(void 0!==e.days_to_advertise||!s){let s=Number(e.days_to_advertise)||30;t=new Date(Date.now()+24*s*36e5).toISOString()}return{title:e.job_title,description:e.job_description,how_to_apply:e.application_url||e.application_email,location:e.job_location,city:e.city,state:e.state,country:e.country,job_type:e.job_type,remote:e.remote,master_category_job_type:e.job_industry,currency:e.salary_currency?.toUpperCase(),salary_from:e.salary_from,salary_to:e.salary_to,salary_period:e.salary_per,firstName1:a.first,lastName1:a.last,email1:e.contact_email,phone1:e.contact_telephone,...s?{}:{activation_date:new Date().toISOString()},...void 0!==t?{expiration_date:t}:{}}}function f(e){let s=[e.title,e.city,e.state].filter(Boolean).join("-").toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");return`https://www.academicjobs.com/university-jobs/${s}/${e.id}`}function g(e){return{id:e.id,title:e.title??"",city:e.city,state:e.state,jobReference:e.sourceJobId,url:f(e)}}let N="[email protected]",v="sandbox-password",w={username:N,password:v,job:{external_id:"JE-2026-001234",job_title:"Assistant Professor of Biology",job_description:"<p>The Department of Biology invites applications for a tenure-track Assistant Professor position.</p><ul><li>PhD in Biology or related field</li><li>Strong teaching and research record</li></ul>",job_location:"Boston, Massachusetts, United States",city:"Boston",state:"Massachusetts",country:"US",job_type:"Full time",remote:"Onsite",job_industry:"Biology",salary_currency:"USD",salary_from:95e3,salary_to:12e4,salary_per:"annum",application_url:"https://careers.example.edu/apply/biology-ap-2026",contact_name:"Jane Smith",contact_email:"[email protected]",contact_telephone:"+1 617 555 0100",days_to_advertise:60}},_={username:N,password:v,job:{job_title:"Associate Professor of Biology (Updated)",salary_to:135e3,expiration_date:"2026-12-31"}},k=[{partnerField:"external_id",required:!0,description:"Your unique reference for this job. Pass the same value as {jobRef} for updates and takedowns. Create only — cannot be changed later."},{partnerField:"job_title",required:!0,description:"Job title shown in listings and SEO."},{partnerField:"job_description",required:!0,description:"HTML job description body."},{partnerField:"job_location",required:!1,description:"Free-text location string."},{partnerField:"city, state, country",required:!1,description:"Structured location for geo search and schema.org."},{partnerField:"job_type",required:!1,description:"Employment type, e.g. Full time, Part time, Contract."},{partnerField:"remote",required:!1,description:"Work arrangement: Onsite, Hybrid, or Remote."},{partnerField:"job_industry",required:!1,description:"AcademicJobs discipline (sub-category) name, e.g. Biology. Also sets the parent category. Values that don’t match a known discipline are ignored — the job still posts, just uncategorised."},{partnerField:"salary_currency",required:!1,description:"ISO currency code; stored uppercased."},{partnerField:"salary_from, salary_to",required:!1,description:"Salary range bounds."},{partnerField:"salary_per",required:!1,description:"Salary period, e.g. annum, hour."},{partnerField:"application_url",required:!1,description:"Where candidates apply. Takes precedence over application_email."},{partnerField:"application_email",required:!1,description:"Application email, used when no application_url is sent."},{partnerField:"contact_name",required:!1,description:"Contact full name; split into first and last name. Send an empty string to clear both."},{partnerField:"contact_email",required:!1,description:"Contact email address."},{partnerField:"contact_telephone",required:!1,description:"Contact phone number."},{partnerField:"expiration_date",required:!1,description:"Explicit expiry date, e.g. 2026-12-31. Takes precedence over days_to_advertise."},{partnerField:"days_to_advertise",required:!1,description:"Days the ad stays live from now (default 30 on create). On update, the expiry only changes when this or expiration_date is sent."}],A=[{category:"Academic / Faculty",disciplines:["Agricultural and Veterinary Scie
1nce","Anthropology","Architecture and Design","Arts and Culture","Biology","Business & Economics","Chemistry","Communications","Computer Science","Education","Engineering","Geoscience","Health Science","History","Law","Linguistics","Literature","Mathematics","Medicine","Philosophy","Physics","Political Science","Property and Construction","Psychology","Social Science","Space Science","Technical and Career","Theology"]},{category:"Executive",disciplines:["Academic Vice Presidents, DVCs, Provosts","Administrative Vice Presidents","Dean (Department / Faculty Heads)","Department Chairs & School Heads","Director / Manager","Executive Directors / C-level","Other","Presidents and Vice Chancellors"]},{category:"Human Resources",disciplines:["General HR","Industrial Employee Relations","Management Internal","Occupational Health Safety","Organisational Development","Other","Recruitment Internal","Remuneration Benefits","Training Development"]},{category:"Industry Jobs",disciplines:["biological biomedical sciences","biotechnology genetics","chemistry physics","energy","environmental earth geosciences","laboratory technical services","materials sciences","Other"]},{category:"Staff / Administration",disciplines:["Academic Advising","Administration Manager","Administrative Assistants","Admissions and Enrollment","Adult and Continuing Education Programs","Alumni Relations","Arts and Museum Administration","Assessment, Accreditation, and Compliance","Athletics","Broadcasting, Radio, and Television","Bursar and Student Accounts","Business and Financial Services","Career Development and Services","Child Care and Youth Programs","Communications, Marketing, and Public Affairs","Computer and Information Technology","Conference and Events Administration","Counseling and Psychological Services","Curriculum Design","Database Administrator","Development and Fundraising","Disability and Accessibility Services","Diversity, Equity, and Inclusion Services","Economic and Business Development","Executive Assistants","Extension and Outreach","Facilities Management","Faculty Affairs","Financial Aid","Food Services","Health and Medical Services","Institutional Research and Planning","Instructional Technology and Design","International Programs and Services","IT Manager/Director","IT Support and Training","Laboratory and Research","Legal Affairs","Libraries","Library Services Data Information Management","Multimedia and Audiovisual","Network/System Administrator","Occupational and Environmental Safety","Online and Distance Education Programs","Other Administrative Positions","Other IT","PhD Researcher","Police and Public Safety","Programmer/Analyst","Project Management Consulting","Publications and Editing","Registrars","Religious and Spiritual Life","Residence Life and Housing","Sales","Sponsored Programs, Grants, and Contracts","Sports Leisure","Student Affairs and Services","Sustainability","Tutors and Learning Resources","Volunteer Programs and Service Learning","Web Developer"]},{category:"Student / Phd Jobs",disciplines:["Nonprofit PhD Jobs","PhD Fellowship","PhD Studentship","Postdoctoral Jobs","Postgrad Student Opportunity","Science PhD Jobs","Undergrad Student Opportunity"]}];function S({children:e}){return(0,a.jsx)("pre",{className:"overflow-x-auto rounded-lg border border-slate-200 bg-slate-950 p-4 text-xs leading-relaxed text-slate-100",children:e})}function E({data:e}){return(0,a.jsx)(S,{children:JSON.stringify(e,null,2)})}function P({id:e,title:s,children:t}){return(0,a.jsxs)("section",{id:e,className:"mt-12 scroll-mt-8",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold underline-full mt-0 mb-4",children:s}),t]})}function T(e,s,t){return void 0===t?{success:e,message:s}:{success:e,message:s,data:t}}function C(e,s,t){if(!e.trim())return{ok:!1,status:401,body:T(!1,"Please include Authorization API key in headers")};if(e!==o())return{ok:!1,status:403,body:T(!1,"Please include a valid API key")};if(t){let{username:e,password:t}=s;if(!(e&&t))return{ok:!1,status:400,body:T(!1,"Missing user credentials")};if(e!==N||t!==v)return{ok:!1,status:401,body:T(!1,"Invalid user credentials")}}return null}function J(e,s,t,a,n,r){let i=C(e,s,t);if(i)return i;try{let e=r();return{ok:!0,status:a,body:T(!0,n,e)}}catch(e){if(e instanceof h)return{ok:!1,status:e.status,body:T(!1,e.message)};return{ok:!1,status:500,body:T(!1,"Internal server error")}}}function R(e){try{return{ok:!0,value:JSON.parse(e)}}catch{return{ok:!1,result:{ok:!1,status:0,body:T(!1,"Request body is not val
1id JSON")}}}}function I(){let[e,s]=(0,n.useState)(i),[t,r]=(0,n.useState)([]),[c,I]=(0,n.useState)(null),[O,D]=(0,n.useState)(!1),[q,B]=(0,n.useState)(JSON.stringify(w,null,2)),[F,L]=(0,n.useState)("JE-2026-001234"),[H,U]=(0,n.useState)(JSON.stringify(_,null,2)),[M,Y]=(0,n.useState)("JE-2026-001234"),[$,G]=(0,n.useState)(null),z=(0,n.useCallback)(async(s=e)=>{s!==o()?G("Invalid sandbox API key — jobs not loaded."):(r(function(){let{jobs:e}=u();return Object.values(e).sort((e,s)=>new Date(s.createdAt).getTime()-new Date(e.createdAt).getTime()).map(g)}()),G(null))},[e]);(0,n.useEffect)(()=>{z(i)},[]);let K=async e=>{D(!0);try{let s=await e();I(s),await z()}finally{D(!1)}},X=`curl -X GET '${l}/ping' \\
2  -H 'Authorization: Bearer YOUR_API_KEY'`,V=`curl -X GET '${l}' \\
3  -H 'Authorization: Bearer YOUR_API_KEY'`,W=`curl -X POST '${l}' \\
4  -H 'Authorization: Bearer YOUR_API_KEY' \\
5  -H 'Content-Type: application/json' \\
6  -d '${JSON.stringify(w)}'`,Q=`curl -X POST '${l}' \\
7  -H 'Authorization: Bearer YOUR_API_KEY' \\
8  -H 'Content-Type: application/json' \\
9  -d '${JSON.stringify({job:w.job})}'`,Z=`curl -X PATCH '${l}/${F}' \\
10  -H 'Authorization: Bearer YOUR_API_KEY' \\
11  -H 'Content-Type: application/json' \\
12  -d '${JSON.stringify(_)}'`,ee=`curl -X DELETE '${l}/${M}' \\
13  -H 'Authorization: Bearer YOUR_API_KEY'`;return(0,a.jsxs)("div",{className:"container content-grid py-12 max-w-5xl",children:[(0,a.jsx)("h1",{className:"underline-full mt-0",children:"JobElephant Job Distribution API"}),(0,a.jsx)("p",{className:"text-lg text-slate-600 mt-2 mb-0",children:"Publish, update, and remove university job listings on AcademicJobs programmatically."}),(0,a.jsxs)("div",{className:"rounded-lg border border-blue-200 bg-blue-50 px-4 py-3 text-sm text-blue-900 mt-6",children:[(0,a.jsx)("strong",{children:"Sandbox environment."})," Use this page to explore the API, copy example requests, and run test calls in your browser (stored in"," ",(0,a.jsx)("code",{className:"text-xs",children:"localStorage"})," — no server calls). Production base URL:"," ",(0,a.jsx)("code",{className:"text-xs",children:l}),"."]}),(0,a.jsx)("nav",{className:"mt-8 flex flex-wrap gap-2 text-sm",children:[["overview","Overview"],["auth","Authentication"],["endpoints","Endpoints"],["fields","Job fields"],["industries","Job industry values"],["errors","Errors"],["examples","cURL examples"],["tester","Try it"],["jobs","Sandbox jobs"]].map(([e,s])=>(0,a.jsx)("a",{href:`#${e}`,className:"rounded-full border border-slate-200 bg-white px-3 py-1 text-slate-700 hover:bg-slate-50",children:s},e))}),(0,a.jsxs)(P,{id:"overview",title:"Overview",children:[(0,a.jsxs)("p",{className:"text-slate-600 leading-relaxed",children:["The JobElephant Job Distribution API lets JobElephant post job ads to AcademicJobs on behalf of university clients. Use it to"," ",(0,a.jsx)("strong",{children:"create new listings"}),","," ",(0,a.jsx)("strong",{children:"update existing ads"}),", and"," ",(0,a.jsx)("strong",{children:"take down expired or filled roles"})," — all via REST."]}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Quick start"}),(0,a.jsxs)("ol",{className:"list-decimal space-y-2 pl-6 text-slate-600",children:[(0,a.jsxs)("li",{children:["Send your API key on every request (see"," ",(0,a.jsx)("a",{href:"#auth",className:"link link-aj",children:"Authentication"}),"). The key identifies you and, for a per-employer key, the hiring institution too."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"POST"})," a listing with the job fields nested under a"," ",(0,a.jsx)("code",{className:"text-xs",children:"job"})," key, including your own"," ",(0,a.jsx)("code",{className:"text-xs",children:"external_id"}),". On a"," ",(0,a.jsx)("strong",{children:"broker key"}),", also send the institution's"," ",(0,a.jsx)("code",{className:"text-xs",children:"username"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"password"})," alongside"," ",(0,a.jsx)("code",{className:"text-xs",children:"job"}),"."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"GET"}),", ",(0,a.jsx)("strong",{children:"PATCH"}),", or"," ",(0,a.jsx)("strong",{children:"DELETE"})," the listing later using that same"," ",(0,a.jsx)("code",{className:"text-xs",children:"external_id"})," as"," ",(0,a.jsx)("code",{className:"text-xs",children:"{jobRef}"})," in the URL."]})]}),(0,a.jsxs)("p",{className:"mt-4 text-slate-600",children:["Always supply an ",(0,a.jsx)("code",{className:"text-xs",children:"external_id"})," on create — it is your only handle for updates and takedowns."," ",(0,a.jsx)("code",{className:"text-xs",children:"{jobRef}"})," is your"," ",(0,a.jsx)("code",{className:"text-xs",children:"external_id"}),", not the AcademicJobs job ID; internally AcademicJobs stores it prefixed with your partner source prefix, and it cannot be changed after create. The hiring institution is identified by your key (per-employer) or by the"," ",(0,a.jsx)("code",{className:"text-xs",children:"username"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"password"})," login (broker) — never inside the ",(0,a.jsx)("code",{className:"text-xs",children:"job"})," object."]}),(0,a.jsxs)("p",{className:"mt-4 text-slate-600",children:["All responses use the envelope"," ",(0,a.jsx)("code",{className:"text-xs",children:'{ "success": boolean, "message": string, "data": … }'}),". Errors return ",(0,a.jsx)("code",{className:"text-xs",children:"success: false"})," with a human-readable ",(0,a.jsx)("code",{className:"text-xs",children:"message"}
13)," and no"," ",(0,a.jsx)("code",{className:"text-xs",children:"data"}),"."]})]}),(0,a.jsxs)(P,{id:"auth",title:"Authentication",children:[(0,a.jsxs)("p",{className:"text-slate-600 mb-4",children:["Authentication is by API key. Send it on ",(0,a.jsx)("strong",{children:"every"})," ","request as either an"," ",(0,a.jsx)("code",{className:"text-xs",children:"Authorization: Bearer YOUR_API_KEY"})," or an ",(0,a.jsx)("code",{className:"text-xs",children:"x-api-key"})," header. AcademicJobs issues separate keys for sandbox and production."]}),(0,a.jsxs)("p",{className:"text-slate-600 mb-2",children:["AcademicJobs issues one of ",(0,a.jsx)("strong",{children:"two key types"}),", and this is the only thing that changes how you authenticate a write:"]}),(0,a.jsxs)("ul",{className:"list-disc space-y-2 pl-6 text-slate-600 mb-4",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Per-employer key"})," — bound to a single institution. The employer is taken from the key, so you send"," ",(0,a.jsx)("strong",{children:"nothing but the key"}),", even on"," ",(0,a.jsx)("code",{className:"text-xs",children:"POST"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"PATCH"}),". The body is just"," ",(0,a.jsx)("code",{className:"text-xs",children:'{ "job": { … } }'}),"."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Broker key"})," (what JobElephant uses) — posts for many institutions. On writes (",(0,a.jsx)("code",{className:"text-xs",children:"POST"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"PATCH"}),") you must also send the hiring institution's AcademicJobs login as"," ",(0,a.jsx)("code",{className:"text-xs",children:"username"})," and"," ",(0,a.jsx)("code",{className:"text-xs",children:"password"})," at the top level of the body; the employer is resolved from that login. Reads and deletes (",(0,a.jsx)("code",{className:"text-xs",children:"GET"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"DELETE"}),") need only the key."]})]}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mb-2",children:"Broker write (POST/PATCH):"}),(0,a.jsx)(S,{children:`Authorization: Bearer ${i}
14Content-Type: application/json
15
16{ "username": "${N}", "password": "…", "job": { … } }`}),(0,a.jsx)("p",{className:"text-sm text-slate-500 mt-4 mb-2",children:"Per-employer write, or any read/delete — key only, no credentials:"}),(0,a.jsx)(S,{children:`Authorization: Bearer YOUR_API_KEY
17Content-Type: application/json
18
19{ "job": { … } }`}),(0,a.jsxs)("ul",{className:"mt-4 list-disc space-y-1 pl-6 text-sm text-slate-600",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{className:"text-xs",children:"401"})," — no API key header sent, or (on a broker write) the ",(0,a.jsx)("code",{className:"text-xs",children:"username"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"password"})," login is wrong (",(0,a.jsx)("em",{children:"Invalid user credentials"}),")."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{className:"text-xs",children:"403"})," — API key not recognised, or the key has been deactivated."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{className:"text-xs",children:"400"})," — key OK but a broker write is missing ",(0,a.jsx)("code",{className:"text-xs",children:"username"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"password"})," (",(0,a.jsx)("em",{children:"Missing user credentials"}),")."]})]}),(0,a.jsxs)("p",{className:"mt-3 text-sm text-slate-500",children:["The sandbox key below is a ",(0,a.jsx)("strong",{children:"broker"})," key. Writes accept the login ",(0,a.jsx)("code",{className:"text-xs",children:N})," /"," ",(0,a.jsx)("code",{className:"text-xs",children:v}),". If you change the key in the tester below, click ",(0,a.jsx)("strong",{children:"Refresh list"})," to use it."]}),(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mb-1",children:"API key for interactive tester"}),(0,a.jsx)("input",{type:"text",value:e,onChange:e=>s(e.target.value),className:"w-full rounded-lg border border-slate-300 px-3 py-2 text-sm font-mono",spell
19Check:!1})]})]}),(0,a.jsxs)(P,{id:"endpoints",title:"Endpoints",children:[(0,a.jsxs)("p",{className:"text-sm text-slate-600 mb-4",children:["Base URL: ",(0,a.jsx)("code",{className:"text-xs",children:l}),". All endpoints require your API key; writes on a broker key also need the institution login (see"," ",(0,a.jsx)("a",{href:"#auth",className:"link link-aj",children:"Authentication"}),")."]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"bg-slate-800 text-white text-left",children:[(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Method"}),(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Path"}),(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Purpose"}),(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Success"})]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-slate-200",children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono",children:"GET"}),(0,a.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:"/ping"}),(0,a.jsx)("td",{className:"px-3 py-2",children:"Connectivity and auth check."}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs",children:'200 \xb7 message "pong"'})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono",children:"GET"}),(0,a.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:"/"}),(0,a.jsx)("td",{className:"px-3 py-2",children:"List your jobs (id, title, city, state, jobReference, url). Returns an empty array when you have no live jobs."}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs",children:"200 \xb7 data is an array"})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono",children:"GET"}),(0,a.jsxs)("td",{className:"px-3 py-2 font-mono text-xs",children:["/","{jobRef}"]}),(0,a.jsx)("td",{className:"px-3 py-2",children:"Fetch one job by your external_id — returns id, title, city, state, jobReference and url."}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs",children:"200 \xb7 data is one row"})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono",children:"POST"}),(0,a.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:"/"}),(0,a.jsxs)("td",{className:"px-3 py-2",children:["Create a job from the ",(0,a.jsx)("code",{className:"text-xs",children:"job"})," ","object. 400 if ",(0,a.jsx)("code",{className:"text-xs",children:"job"})," or a required field is missing, or the external_id already exists."]}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs",children:"201 \xb7 data.job (incl. data.job.url)"})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono",children:"PATCH"}),(0,a.jsxs)("td",{className:"px-3 py-2 font-mono text-xs",children:["/","{jobRef}"]}),(0,a.jsx)("td",{className:"px-3 py-2",children:"Update fields on an existing job. Omitted fields keep their current values."}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs",children:"200 \xb7 data.job.externalJobId + data.job.url"})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono",children:"DELETE"}),(0,a.jsxs)("td",{className:"px-3 py-2 font-mono text-xs",children:["/","{jobRef}"]}),(0,a.jsxs)("td",{className:"px-3 py-2",children:["Take down a job. This ",(0,a.jsx)("strong",{children:"permanently deletes"})," the listing and frees its external_id for reuse."]}),(0,a.jsx)("td",{className:"px-3 py-2 text-xs",children:"200 \xb7 data.job.externalJobId"})]})]})]})}),(0,a.jsxs)("ul",{className:"mt-4 list-disc space-y-2 pl-6 text-sm text-slate-600",children:[(0,a.jsxs)("li",{children:[(0,a.jsxs)("strong",{children:["List, get, create and update responses include a"," ",(0,a.jsx)("code",{className:"text-xs",children:"url"})]})," ","— the public listing page on academicjobs.com, built from the job’s title, city and state plus its id. It is always a field of the job object: on ",(0,a.jsx)("strong",{children:"create"})," and ",(0,a.jsx)("strong",{children:"update"})," at"," ",(0,a.jsx)("code",{className:"text-xs",children:"data.job.url"}),"; on"," ",(0,a.jsx)("strong",{children:"list"})," and ",(0,a.jsx)("strong",{children:"get"})," on each row. Only"," ",(0,a.jsx)("strong",{children:"take-down"})," (",(0,a.jsx)("code",{className:"text-xs",children:"DELETE"}),") responses omit it. On update the"," ",(0,a.jsx)("code",{className:"text-xs",children:"url"})," reflects the job’s title, city and state as they stand after the patch — fields you don’t send keep their stored values."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"List returns every job under your API key"})," — across all institutions you have posted for, not just the one in the current request."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"Reads and deletes need only the key."})," Any request with a valid key can ",(0,a.jsx)("code",{className:"text-xs",children:"GET"})," or"," ",(0,a.jsx)("code",{className:"text-xs",children:"DELETE"})," any job posted with that key."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{children:"On a broker key, an update reassigns ownership."})," The institution whose login you authenticate a"," ",(0,a.jsx)("code",{className:"text-xs",children:"PATCH"})," with becomes the job's owning employer — authenticating with a different login moves the job to that institution."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("code",{className:"text-xs",children:"jobReference"})," in list and get responses is your ",(0,a.jsx)("code",{className:"text-xs",children:"external_id"})," with the partner source prefix prepended; you still pass the bare"," ",(0,a.jsx)("code",{className:"text-xs",children:"external_id"})," as"," ",(0,a.jsx)("code",{className:"text-xs",children:"{jobRef}"}),"."]}),(0,a.jsxs)("li",{children:["Unknown ",(0,a.jsx)("code",{className:"text-xs",children:"{jobRef}"})," values return"," ",(0,a.jsx)("code",{className:"text-xs",children:"404"})," with"," ",(0,a.jsx)("code",{className:"text-xs",children:"success: false"}),"."]})]})]}),(0,a.jsxs)(P,{id:"fields",title:"Job fields",children:[(0,a.jsxs)("p",{className:"text-sm text-slate-600 mb-4",children:["These fields go inside the ",(0,a.jsx)("code",{className:"text-xs",children:"job"})," object of POST and PATCH bodies. All are optional on PATCH — omitted fields keep their current values."]}),(0,a.jsxs)("div",{className:"rounded-lg border border-slate-200 bg-slate-50 px-4 py-3 text-sm text-slate-700 mb-4",children:[(0,a.jsx)("strong",{children:"Expiry:"})," on create, the ad runs for"," ",(0,a.jsx)("code",{className:"text-xs",children:"days_to_advertise"})," days (default 30) unless you send an explicit"," ",(0,a.jsx)("code",{className:"text-xs",children:"expiration_date"}),". On update, the expiry only changes when one of those fields is sent —"," ",(0,a.jsx)("code",{className:"text-xs",children:"days_to_advertise"})," counts from the time of the update."]}),(0,a.jsxs)("div",{className:"rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900 mb
19-4",children:[(0,a.jsx)("strong",{children:"Applications:"})," send at least one of"," ",(0,a.jsx)("code",{className:"text-xs",children:"application_url"})," or"," ",(0,a.jsx)("code",{className:"text-xs",children:"application_email"})," — with neither, candidates have no way to apply. When both are present,"," ",(0,a.jsx)("code",{className:"text-xs",children:"application_url"})," is used."]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"bg-slate-800 text-white text-left",children:[(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Field"}),(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Required"}),(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Description"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-slate-200",children:k.map(e=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:e.partnerField}),(0,a.jsx)("td",{className:"px-3 py-2",children:e.required?"Yes":"No"}),(0,a.jsxs)("td",{className:"px-3 py-2 text-slate-600",children:[e.description,"job_industry"===e.partnerField&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("a",{href:"#industries",className:"link link-aj whitespace-nowrap",children:"See available values →"})]})]})]},e.partnerField))})]})})]}),(0,a.jsxs)(P,{id:"industries",title:"Job industry values",children:[(0,a.jsxs)("p",{className:"text-sm text-slate-600 mb-4",children:["Set ",(0,a.jsx)("code",{className:"text-xs",children:"job_industry"})," to one of the AcademicJobs discipline names below. The value is matched against the discipline (sub-category) name and also sets the parent category shown in each heading. A value that doesn’t match any of these is ignored — the job still posts, just uncategorised."]}),(0,a.jsx)("div",{className:"space-y-6",children:A.map(e=>(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-base font-semibold mt-0 mb-2",children:e.category}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:e.disciplines.map(e=>(0,a.jsx)("code",{className:"rounded border border-slate-200 bg-slate-50 px-2 py-1 text-xs text-slate-700",children:e},e))})]},e.category))})]}),(0,a.jsxs)(P,{id:"errors",title:"Errors",children:[(0,a.jsxs)("p",{className:"text-sm text-slate-600 mb-4",children:["Every error returns ",(0,a.jsx)("code",{className:"text-xs",children:"success: false"})," ","and a human-readable ",(0,a.jsx)("code",{className:"text-xs",children:"message"}),", with no"," ",(0,a.jsx)("code",{className:"text-xs",children:"data"}),"."]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm border-collapse",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"bg-slate-800 text-white text-left",children:[(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Meaning"}),(0,a.jsx)("th",{className:"px-3 py-2 font-semibold",children:"Common causes"})]})}),(0,a.jsxs)("tbody",{className:"divide-y divide-slate-200",children:[(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono align-top",children:"400"}),(0,a.jsx)("td",{className:"px-3 py-2 align-top",children:"Something required is missing or invalid."}),(0,a.jsxs)("td",{className:"px-3 py-2 text-slate-600",children:["Missing ",(0,a.jsx)("code",{className:"text-xs",children:"job"})," object on create or update (",(0,a.jsx)("em",{children:"Missing job data"}),"); missing required field on create (",(0,a.jsx)("code",{className:"text-xs",children:"external_id"}),","," ",(0,a.jsx)("code",{className:"text-xs",children:"job_title"}),","," ",(0,a.jsx)("code",{className:"text-xs",children:"job_description"}),"); reused"," ",(0,a.jsx)("code",{className:"text-xs",children:"external_id"})," that already exists; or a broker write missing"," ",(0,a.jsx)("code",{className:"text-xs",children:"username"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"password"})," (",(0,a.jsx)("em",{children:"Missing user credentials"}),")."]})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono align-top",children:"401"}),(0,a.jsx)("td",{className:"px-3 py-2 align-top",children:"Not authenticated."}),(0,a.jsxs)("td",{className:"px-3 py-2 text-slate-600",children:["No API key header sent; or, on a broker write, the"," ",(0,a.jsx)("code",{className:"text-xs",children:"username"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"password"})," login is wrong (",(0,a.jsx)("em",{children:"Invalid user credentials"}),")."]})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono align-top",children:"403"}),(0,a.jsx)("td",{className:"px-3 py-2 align-top",children:"Authenticated but not authorised."}),(0,a.jsx)("td",{className:"px-3 py-2 text-slate-600",children:"API key doesn’t match any partner, or the key has been deactivated — contact AcademicJobs support."})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono align-top",children:"404"}),(0,a.jsx)("td",{className:"px-3 py-2 align-top",children:"Not found."}),(0,a.jsxs)("td",{className:"px-3 py-2 text-slate-600",children:[(0,a.jsx)("code",{className:"text-xs",children:"{jobRef}"})," doesn’t exist for your key — wrong"," ",(0,a.jsx)("code",{className:"text-xs",children:"external_id"}),", already deleted, or never created."]})]}),(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-3 py-2 font-mono align-top",children:"500"}),(0,a.jsx)("td",{className:"px-3 py-2 align-top",children:"Something went wrong on our side."}),(0,a.jsx)("td",{className:"px-3 py-2 text-slate-600",children:"Contact AcademicJobs support with the time of the request."})]})]})]})})]}),(0,a.jsxs)(P,{id:"examples",title:"cURL examples",children:[(0,a.jsxs)("p",{className:"text-sm text-slate-600 mb-4",children:["Production requests use"," ",(0,a.jsx)("code",{className:"text-xs",children:l}),". Replace"," ",(0,a.jsx)("code",{className:"text-xs",children:"YOUR_API_KEY"})," with the key AcademicJobs issues for your integration."," ",(0,a.jsx)("code",{className:"text-xs",children:"GET"})," and"," ",(0,a.jsx)("code",{className:"text-xs",children:"DELETE"})," carry no body."]}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-0 mb-2",children:"Check connectivity (ping)"}),(0,a.jsxs)("p",{className:"text-sm text-slate-500 mb-2",children:["Confirm your key works before anything else — a"," ",(0,a.jsx)("code",{className:"text-xs",children:"200"})," with message"," ",(0,a.jsx)("code",{className:"text-xs",children:'"pong"'})," means you’re good to go."]}),(0,a.jsx)(S,{children:X}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Create — broker key (with institution login)"}),(0,a.jsx)(S,{children:W}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Create — per-employer key (no login needed)"}),(0,a.jsx)(S,{children:Q}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Update"}),(0,a.jsx)(S,{children:Z}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Take down"}),(0,a.jsx)(S,{children:ee}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"List your jobs"}),(0,a.jsx)(S,{children:V}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Success response 
19(create, 201)"}),(0,a.jsx)(E,{data:{success:!0,message:"Job created successfully",data:{job:{id:912345,title:"Assistant Professor of Biology",description:"<p>The Department of Biology invites applications…</p>",employer_id:3753,sourceJobId:"jobelephant-JE-2026-001234",how_to_apply:"https://careers.example.edu/apply/biology-ap-2026",location:"Boston, Massachusetts, United States",city:"Boston",state:"Massachusetts",country:"US",job_type:"Full time",remote:"Onsite",currency:"USD",salary_from:95e3,salary_to:12e4,salary_period:"annum",firstName1:"Jane",lastName1:"Smith",email1:"[email protected]",phone1:"+1 617 555 0100",activation_date:"2026-07-02T04:00:00.000Z",expiration_date:"2026-08-31 04:00:00",url:"https://www.academicjobs.com/university-jobs/assistant-professor-of-biology-boston-massachusetts/912345"}}}}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Success response (list, 200)"}),(0,a.jsx)(E,{data:{success:!0,message:"Jobs retrieved successfully",data:[{id:912345,title:"Assistant Professor of Biology",city:"Boston",state:"Massachusetts",jobReference:"jobelephant-JE-2026-001234",url:"https://www.academicjobs.com/university-jobs/assistant-professor-of-biology-boston-massachusetts/912345"}]}}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Success response (get, 200)"}),(0,a.jsx)(E,{data:{success:!0,message:"Job retrieved successfully",data:{id:912345,title:"Assistant Professor of Biology",city:"Boston",state:"Massachusetts",jobReference:"jobelephant-JE-2026-001234",url:"https://www.academicjobs.com/university-jobs/assistant-professor-of-biology-boston-massachusetts/912345"}}}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Success response (update, 200)"}),(0,a.jsx)(E,{data:{success:!0,message:"Job updated successfully",data:{job:{externalJobId:"JE-2026-001234",url:"https://www.academicjobs.com/university-jobs/associate-professor-of-biology-updated-boston-massachusetts/912345"}}}}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Success response (take down, 200)"}),(0,a.jsx)(E,{data:{success:!0,message:"Job deleted successfully",data:{job:{externalJobId:"JE-2026-001234"}}}}),(0,a.jsx)("h3",{className:"text-base font-semibold mt-6 mb-2",children:"Error response"}),(0,a.jsx)(E,{data:{success:!1,message:"Job with reference JE-2026-999999 not found for partner JobElephant"}})]}),(0,a.jsxs)(P,{id:"tester",title:"Try it",children:[(0,a.jsxs)("p",{className:"text-slate-600 mb-6",children:["Send test requests in your browser — results are stored in"," ",(0,a.jsx)("code",{className:"text-xs",children:"localStorage"})," on this device only. Each textarea holds the ",(0,a.jsx)("strong",{children:"full request body"}),". The sandbox key is a broker key, so create and update carry the institution login (",(0,a.jsx)("code",{className:"text-xs",children:"username"}),"/",(0,a.jsx)("code",{className:"text-xs",children:"password"}),") alongside the nested"," ",(0,a.jsx)("code",{className:"text-xs",children:"job"})," object, exactly like production."]}),(0,a.jsxs)("div",{className:"space-y-8",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-slate-200 p-4",children:[(0,a.jsx)("h3",{className:"mt-0 text-base font-semibold",children:"1. Create job — POST /"}),(0,a.jsx)("textarea",{value:q,onChange:e=>B(e.target.value),rows:18,className:"mt-2 w-full rounded-lg border border-slate-300 p-3 font-mono text-xs",spellCheck:!1}),(0,a.jsx)("button",{type:"button",onClick:()=>K(async()=>{let s=R(q);return!1===s.ok?s.result:J(e,s.value,!0,201,"Job created successfully",()=>{if(!s.value.job)throw new h(400,"Missing job data");return function(e){let s=["external_id","job_title","job_description"].filter(s=>!e[s]);if(s.length>0)throw new h(400,`Missing required job field(s): ${s.join(", ")}`);let t=u(),a=j(e.external_id);if(t.jobs[a])throw new h(400,`Job with sourceJobId ${a} already exists for partner ${x}`);t.seq+=1;let n=new Date().toISOString(),r={...y(e,!1),id:t.seq,employer_id:3753,sourceJobId:a,createdAt:n,updatedAt:n};return t.jobs[a]=r,p(t),{job:{...r,url:f(r)}}}(s.value.job)})}),disabled:O,className:"btn btn-blue mt-3",children:"POST create"})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-slate-200 p-4",children:[(0,a.jsxs)("h3",{className:"mt-0 text-base font-semibold",children:["2. Update job — PATCH /","{jobRef}"]}),(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mt-2",children:"jobRef (your external_id)"}),(0,a.jsx)("input",{type:"text",value:F,onChange:e=>L(e.target.value),className:"mt-1 w-full rounded-lg border border-slate-300 px-3 py-2 text-sm font-mono"}),(0,a.jsx)("textarea",{value:H,onChange:e=>U(e.target.value),rows:9,className:"mt-3 w-full rounded-lg border border-slate-300 p-3 font-mono text-xs",spellCheck:!1}),(0,a.jsx)("button",{type:"button",onClick:()=>K(async()=>{let s=R(H);if(!1===s.ok)return s.result;let t=F.trim();return t?J(e,s.value,!0,200,"Job updated successfully",()=>{if(!s.value.job)throw new h(400,"Missing job data");return function(e,s){let t=u(),a=j(e),n=t.jobs[a];if(!n)throw b(e);let r=Object.fromEntries(Object.entries({...y(s,!0),employer_id:3753}).filter(([,e])=>void 0!==e)),i={...n,...r,id:n.id,sourceJobId:n.sourceJobId,createdAt:n.createdAt,updatedAt:new Date().toISOString()};return t.jobs[a]=i,p(t),{job:{externalJobId:e,url:f({title:i.title,city:i.city,state:i.state,id:i.id})}}}(t,s.value.job)}):{ok:!1,status:0,body:T(!1,"jobRef is required")}}),disabled:O,className:"btn btn-blue mt-3",children:"PATCH update"})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-slate-200 p-4",children:[(0,a.jsxs)("h3",{className:"mt-0 text-base font-semibold",children:["3. Take down job — DELETE /","{jobRef}"]}),(0,a.jsx)("label",{className:"block text-sm font-medium text-slate-700 mt-2",children:"jobRef (your external_id)"}),(0,a.jsx)("input",{type:"text",value:M,onChange:e=>Y(e.target.value),className:"mt-1 w-full max-w-md rounded-lg border border-slate-300 px-3 py-2 text-sm font-mono"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-slate-500",children:"DELETE carries no body — the API key alone authorises it."}),(0,a.jsx)("button",{type:"button",onClick:()=>K(async()=>{let s=M.trim();return s?J(e,{},!1,200,"Job deleted successfully",()=>(function(e){let s=u(),t=j(e);if(!s.jobs[t])throw b(e);return delete s.jobs[t],p(s),{job:{externalJobId:e}}})(s)):{ok:!1,status:0,body:T(!1,"jobRef is required")}}),disabled:O,className:"btn btn-blue mt-3",children:"DELETE take down"})]})]}),c&&(0,a.jsxs)("div",{className:"mt-8",children:[(0,a.jsxs)("h3",{className:"text-base font-semibold",children:["Last response"," ",(0,a.jsxs)("span",{className:c.ok?"text-green-700":"text-red-700",children:["HTTP ",c.status||"—"]}
19)]}),(0,a.jsx)(E,{data:c.body})]})]}),(0,a.jsxs)(P,{id:"jobs",title:"Sandbox jobs",children:[(0,a.jsxs)("p",{className:"text-sm text-slate-600 mb-4",children:["What ",(0,a.jsx)("code",{className:"text-xs",children:"GET /"})," returns for your sandbox store: ",(0,a.jsx)("code",{className:"text-xs",children:"id"}),","," ",(0,a.jsx)("code",{className:"text-xs",children:"title"}),","," ",(0,a.jsx)("code",{className:"text-xs",children:"city"}),","," ",(0,a.jsx)("code",{className:"text-xs",children:"state"}),","," ",(0,a.jsx)("code",{className:"text-xs",children:"jobReference"})," (your external_id stored with the partner prefix), and the public listing"," ",(0,a.jsx)("code",{className:"text-xs",children:"url"}),"."]}),(0,a.jsxs)("div",{className:"mb-4 flex flex-wrap gap-3",children:[(0,a.jsx)("button",{type:"button",onClick:()=>void z(),disabled:O,className:"btn btn-blue",children:"Refresh list"}),(0,a.jsx)("button",{type:"button",onClick:()=>K(async()=>{let s=C(e,{},!1);return s||(p(m()),{ok:!0,status:200,body:T(!0,"Sandbox job store cleared.")})}),disabled:O,className:"rounded-lg border border-red-200 bg-red-50 px-4 py-2 text-sm font-medium text-red-800 hover:bg-red-100",children:"Clear sandbox store"})]}),$&&(0,a.jsx)("p",{className:"mb-4 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800",children:$}),0===t.length?(0,a.jsx)("p",{className:"text-slate-500",children:$?"No jobs loaded.":"No sandbox jobs yet. Create one above."}):(0,a.jsx)("ul",{className:"m-0 list-none space-y-3 p-0",children:t.map(e=>{let s=e.jobReference.startsWith(d)?e.jobReference.slice(d.length):e.jobReference;return(0,a.jsxs)("li",{className:"rounded-lg border border-slate-200 bg-white p-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,a.jsx)("span",{className:"font-semibold text-slate-900",children:e.title}),(0,a.jsxs)("span",{className:"text-xs text-slate-500",children:["id ",e.id]})]}),(0,a.jsxs)("p",{className:"mt-2 font-mono text-xs text-slate-400",children:["jobReference: ",e.jobReference]}),(0,a.jsx)("a",{href:e.url,target:"_blank",rel:"noopener",className:"mt-1 block break-all font-mono text-xs link link-aj",children:e.url}),(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:(0,a.jsx)("button",{type:"button",className:"text-xs link link-aj",onClick:()=>{L(s),Y(s)},children:"Use as jobRef"})})]},e.jobReference)})})]})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.