{"openapi":"3.1.0","info":{"title":"Tsenta agent API","version":"1.0.0","description":"Create or connect a Tsenta account and drive every Tsenta tool with plain HTTP, no MCP client needed.\n\nPersonal agents that support the Personal Agent Protocol (Poppy) sign the person in through Tsenta instead, starting from https://tsenta.com/.well-known/poppy.json, and call the tools below with the access token they get. Other agents use agent signup:\n\n1. POST /api/v1/agent-signup/start with the email of the person. They get a 6-digit code by email.\n\n2. POST /api/v1/agent-signup/verify with the code for an access token.\n\n3. GET /api/v1/agent/tools for the tools and their input schemas, then POST /api/v1/agent/tools/{name} to call one.\n\n4. When the access token expires, refresh it at POST /oauth/token."},"externalDocs":{"description":"Quickstart for agents","url":"https://www.tsenta.com/agents"},"servers":[{"url":"https://api.autojobs.me"}],"tags":[{"name":"Agent signup","description":"Create or connect an account with an emailed code."},{"name":"OAuth","description":"Keep the access token fresh."},{"name":"Tools","description":"The Tsenta MCP tools over plain HTTP."},{"name":"Meta"}],"paths":{"/api/v1/agent-signup/start":{"post":{"operationId":"startAgentSignup","tags":["Agent signup"],"summary":"Email the person a 6-digit sign-in code","description":"Creates or connects the Tsenta account for this email with no UI. A 6-digit code is emailed to the person (to the address on file for an existing account). The response is the same whether or not an account exists. Read the code from their inbox if you can, or ask them for it, then call POST /api/v1/agent-signup/verify.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","agent_name"],"properties":{"email":{"type":"string","format":"email","description":"The email address of the person the account is for."},"agent_name":{"type":"string","minLength":1,"maxLength":80,"description":"Your name as the person will see it on their connected apps (for example Claude Code). No control characters."},"name":{"type":"string","maxLength":120,"description":"Full name for a new account. Ignored for an existing one."}}}}}},"responses":{"200":{"description":"Code sent.","content":{"application/json":{"schema":{"type":"object","required":["signup_id","sent_to","expires_in","next"],"properties":{"signup_id":{"type":"string","pattern":"^as_","description":"Send it with the code to POST /api/v1/agent-signup/verify."},"sent_to":{"type":"string","description":"The masked address the code went to, for example j...@gmail.com."},"expires_in":{"type":"integer","description":"Seconds the code stays valid (600)."},"next":{"type":"string","description":"What to do next, in one sentence."}}}}}},"400":{"description":"The body is not valid JSON with the fields above, or the email is not one usable address.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["invalid_request","invalid_email"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"403":{"description":"This agent_name may not connect to Tsenta.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["agent_not_allowed"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"422":{"description":"Tsenta cannot create an account for this email (for example a temporary inbox).","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["signup_refused"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"423":{"description":"This email is paused after too many wrong codes. Try again later.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["paused"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"429":{"description":"Too many codes requested. Wait for retry_after seconds.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string","description":"One human sentence, safe to show the person."},"retry_after":{"type":"integer","description":"Seconds to wait before retrying."}}}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"description":"The code email could not be sent. Retry in a moment.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["send_failed"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"503":{"description":"Signup is briefly unavailable. Retry in a moment.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["unavailable"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}}}}},"/api/v1/agent-signup/verify":{"post":{"operationId":"verifyAgentSignup","tags":["Agent signup"],"summary":"Exchange the emailed code for tokens","description":"Checks the 6-digit code and returns an access token for the account, created or existing, plus the URLs to use next. Only the digits of code count, so \"482 913\" works.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["signup_id","code"],"properties":{"signup_id":{"type":"string","description":"From POST /api/v1/agent-signup/start."},"code":{"type":"string","description":"The 6-digit code from the email."}}}}}},"responses":{"200":{"description":"Signed in. Store the refresh_token and client_id to refresh later.","content":{"application/json":{"schema":{"type":"object","required":["account","access_token","token_type","expires_in","refresh_token","client_id","mcp_url","tools_url","openapi_url","token_url"],"properties":{"account":{"type":"string","enum":["created","existing"]},"access_token":{"type":"string","description":"Send as Authorization: Bearer <access_token>."},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"integer","description":"Seconds the access token lasts (3600)."},"refresh_token":{"type":"string","description":"Keep it secret. Exchange it at POST /oauth/token for a new access token."},"client_id":{"type":"string","description":"Send it with the refresh_token to POST /oauth/token."},"mcp_url":{"type":"string","format":"uri","description":"The MCP endpoint, for agents that speak MCP."},"tools_url":{"type":"string","format":"uri","description":"GET it for the tools and their input schemas."},"openapi_url":{"type":"string","format":"uri"},"token_url":{"type":"string","format":"uri"},"docs_url":{"type":"string","format":"uri"},"next_steps":{"type":"array","items":{"type":"string"},"description":"What to do next, in order."}}}}}},"400":{"description":"The code is not 6 digits, or it is wrong (tries_left says how many tries remain).","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["invalid_code","wrong_code"]},"message":{"type":"string","description":"One human sentence, safe to show the person."},"tries_left":{"type":"integer","description":"With wrong_code: tries left before the code stops working."}}}}}},"403":{"description":"The account is deleted, suspended or refused.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["account_unavailable"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"409":{"description":"The email belongs to an unfinished web signup. The person must sign in once at the Tsenta website.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["email_conflict"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"410":{"description":"The code expired, was replaced, or took too many wrong tries. Start again.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["code_expired"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"423":{"description":"This email is paused after too many wrong codes. Try again later.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["paused"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"503":{"description":"Signup is briefly unavailable. Retry in a moment.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["unavailable"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}}}}},"/oauth/token":{"post":{"operationId":"refreshAccessToken","tags":["OAuth"],"summary":"Refresh the access token","description":"The OAuth 2.1 token endpoint. Agents send grant_type=refresh_token with the refresh_token and client_id from verify. The refresh token is not rotated: the response returns the same one, with its 30 day lifetime renewed. The endpoint also takes the authorization_code grant of the MCP OAuth flow.","security":[],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["grant_type","refresh_token","client_id"],"properties":{"grant_type":{"type":"string","enum":["refresh_token"]},"refresh_token":{"type":"string"},"client_id":{"type":"string"}}}},"application/json":{"schema":{"type":"object","required":["grant_type","refresh_token","client_id"],"properties":{"grant_type":{"type":"string","enum":["refresh_token"]},"refresh_token":{"type":"string"},"client_id":{"type":"string"}}}}}},"responses":{"200":{"description":"A new access token.","content":{"application/json":{"schema":{"type":"object","required":["access_token","token_type","expires_in","refresh_token"],"properties":{"access_token":{"type":"string","description":"Send as Authorization: Bearer <access_token>."},"token_type":{"type":"string","enum":["Bearer"]},"expires_in":{"type":"integer","description":"Seconds the access token lasts (3600)."},"refresh_token":{"type":"string","description":"Keep it secret. Exchange it at POST /oauth/token for a new access token."},"scope":{"type":"string"}}}}}},"400":{"description":"The request or grant is invalid (RFC 6749 error body). Sign up again on invalid_grant.","content":{"application/json":{"schema":{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","enum":["invalid_request","invalid_grant","invalid_target","unsupported_grant_type"]},"error_description":{"type":"string"}}}}}},"429":{"description":"Too many requests. Wait for Retry-After seconds.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","enum":["temporarily_unavailable"]},"error_description":{"type":"string"}}}}}}}}},"/api/v1/agent/tools":{"get":{"operationId":"listTools","tags":["Tools"],"summary":"List the tools and their input schemas","description":"The same tools, descriptions and inputs as the Tsenta MCP server at /api/v1/mcp.","security":[{},{"bearerAuth":[]}],"responses":{"200":{"description":"The tools this account can call.","content":{"application/json":{"schema":{"type":"object","required":["tools"],"properties":{"tools":{"type":"array","items":{"type":"object","required":["name","title","description","input_schema","read_only","destructive","scope"],"properties":{"name":{"type":"string","description":"Use it in POST /api/v1/agent/tools/{name}."},"title":{"type":"string"},"description":{"type":"string","description":"When and how to use the tool."},"input_schema":{"type":"object","description":"JSON Schema of the tool input, the body of POST /api/v1/agent/tools/{name}."},"read_only":{"type":"boolean","description":"The tool only reads."},"destructive":{"type":"boolean","description":"The tool may change or delete something. Ask the person first."},"scope":{"type":["string","null"],"enum":["jobs:read","jobs:write","apply","profile:read","profile:write","inbox:read","inbox:write","networking",null],"description":"The scope a personal agent signed in with Poppy needs to call the tool (the first, when it needs more). null when any scope works, or when no personal agent may call it. Agent signup tokens need no scope."}}}}}}}}},"429":{"description":"Too many tool requests for this account (the limit is shared with /api/v1/mcp). Wait for retry_after seconds.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string","description":"One human sentence, safe to show the person."},"retry_after":{"type":"integer","description":"Seconds to wait before retrying."}}}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/api/v1/agent/tools/{name}":{"post":{"operationId":"callTool","tags":["Tools"],"summary":"Call one tool","description":"Runs the tool with the same permissions, quotas and refusals as over MCP. Read input_schema from GET /api/v1/agent/tools. Ask the person before calling a destructive tool.","security":[{"bearerAuth":[]}],"parameters":[{"name":"name","in":"path","required":true,"description":"The tool name, from GET /api/v1/agent/tools.","schema":{"type":"string"}}],"requestBody":{"required":false,"description":"The tool input as a JSON object matching its input_schema. Send {} when it takes none.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"The tool ran.","content":{"application/json":{"schema":{"type":"object","required":["tool","ok","result"],"properties":{"tool":{"type":"string"},"ok":{"type":"boolean","enum":[true]},"result":{"description":"The tool result: parsed JSON when the tool returns JSON, else its text."}}}}}},"400":{"description":"The body is not a JSON object, or the input does not match the tool input_schema.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["invalid_input"]},"message":{"type":"string","description":"One human sentence, safe to show the person."},"issues":{"type":"array","items":{"type":"object","required":["path","message"],"properties":{"path":{"type":"string","description":"Dotted path of the field, for example items.0.title. Empty for the whole input."},"message":{"type":"string"}}}}}}}}},"401":{"description":"The bearer token is missing, invalid, expired, or its client was refused. Refresh it with POST /oauth/token, or sign in again.","headers":{"WWW-Authenticate":{"description":"Bearer challenge (RFC 6750). Without a token it names the scopes the tool needs (scope), or only realm when the tool needs no particular scope, and no error; with a bad token, error=\"invalid_token\".","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["error","error_description"],"properties":{"error":{"type":"string","enum":["invalid_token"]},"error_description":{"type":"string"}}}}}},"403":{"description":"A personal agent signed in with Poppy called a tool its token has no scope for (insufficient_scope: sign in again for the scopes in scope), or one no personal agent may call (not_available). Nothing ran. Agent signup tokens never get this.","headers":{"WWW-Authenticate":{"description":"With insufficient_scope: Bearer error=\"insufficient_scope\", scope=\"<the scopes the call needs>\" (RFC 6750).","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["tool","ok","error","message"],"properties":{"tool":{"type":"string"},"ok":{"type":"boolean","enum":[false]},"error":{"type":"string","enum":["insufficient_scope","not_available"]},"scope":{"type":"string","description":"With insufficient_scope: the scopes the call needs, space-separated."},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"404":{"description":"No tool has this name.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["unknown_tool"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"413":{"description":"The body is over 1 MB.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["body_too_large"]},"message":{"type":"string","description":"One human sentence, safe to show the person."}}}}}},"422":{"description":"The tool refused or failed. message says why and what to do, and is safe to show the person.","content":{"application/json":{"schema":{"type":"object","required":["tool","ok","error","message"],"properties":{"tool":{"type":"string"},"ok":{"type":"boolean","enum":[false]},"error":{"type":"string","enum":["tool_error"]},"message":{"type":"string"}}}}}},"429":{"description":"Too many tool requests for this account (the limit is shared with /api/v1/mcp). Wait for retry_after seconds.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string","description":"One human sentence, safe to show the person."},"retry_after":{"type":"integer","description":"Seconds to wait before retrying."}}}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}},"/api/v1/agent/openapi.json":{"get":{"operationId":"getOpenApi","tags":["Meta"],"summary":"This document","security":[],"responses":{"200":{"description":"The OpenAPI 3.1 document of the agent API.","content":{"application/json":{"schema":{"type":"object"}}}},"429":{"description":"Too many requests from this address. Wait for retry_after seconds.","content":{"application/json":{"schema":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","enum":["rate_limited"]},"message":{"type":"string","description":"One human sentence, safe to show the person."},"retry_after":{"type":"integer","description":"Seconds to wait before retrying."}}}}},"headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"The access_token from POST /api/v1/agent-signup/verify or POST /oauth/token."}}}}