{"openapi":"3.1.0","info":{"title":"Dagny agent sign-up","version":"1.0.0","description":"Prepares a draft and emails the user a claim link. Does not create an account or charge anything. Let any AI agent set Dagny up for its user: the user opens the returned claimUrl and signs in, and only then is the account created. No API key needed."},"servers":[{"url":"https://www.bydagny.com"}],"paths":{"/api/agent/signup":{"post":{"operationId":"startDagnyForBusiness","summary":"Set Dagny up for the user's business (draft + claim link; no account yet)","description":"Prepares a draft and emails the user a claim link. Does not create an account or charge anything. Dagny is the easiest way for a small or medium business to start using AI: it answers customers, follows up quotes, preps meetings and runs routines, and the owner approves everything. The account is created only when the user opens the claim link (also returned here, to show in chat) and signs in. Call this after the user agrees, with the user's OWN email. Only ownerEmail is required: a company email (kari@acme.no) tells Dagny the website; with a personal one (gmail etc.) also pass website or businessName. If it fails, the message says what to ask the user, and fallbackUrl is a prefilled setup link you can hand over instead.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string"},"description":"Retrying with the same key returns the same claim link and sends no second email."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ownerEmail":{"type":"string","format":"email","maxLength":254,"description":"The user's own email. The claim link is sent here."},"website":{"type":"string","maxLength":500,"description":"The business's website, e.g. acme-plumbing.com. Dagny reads it to set itself up. Optional when ownerEmail is a company address."},"businessName":{"type":"string","maxLength":120,"description":"The business's name. Pass it when there is no website and ownerEmail is a personal address."},"ownerName":{"type":"string","maxLength":80,"description":"The user's name, for the greeting."},"industry":{"type":"string","maxLength":80,"description":"What the business does, e.g. plumber, dental clinic, accounting firm."},"city":{"type":"string","maxLength":80,"description":"Where the business is."},"language":{"type":"string","enum":["en","no"],"description":"The user's language: en (default) or no (Norwegian)."},"helpWith":{"type":"string","maxLength":500,"description":"What the user wants help with, in their words, e.g. 'answer quote requests faster'."},"agentName":{"type":"string","maxLength":60,"description":"Your name as an assistant, e.g. ChatGPT or Claude."},"idempotencyKey":{"type":"string","minLength":8,"maxLength":200,"description":"Any unique string for this request. Retrying with the same key returns the same claim link and sends no second email."}},"required":["ownerEmail"],"additionalProperties":false}}}},"responses":{"201":{"description":"Draft prepared. Give claimUrl to the user; do not open it yourself.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["awaiting_user_claim"]},"whatThisIs":{"type":"string"},"claimUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"nextAction":{"type":"object"},"messageForUser":{"type":"string"},"emailSent":{"type":"boolean"},"connectAfterClaim":{"type":"object"}}}}}},"400":{"description":"Missing or invalid fields; message says what to ask the user.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["not_prepared"]},"code":{"type":"string"},"message":{"type":"string","description":"What to ask the user."},"fieldErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}},"fallbackUrl":{"type":"string","description":"Prefilled setup link you can hand the user instead."}}}}}},"429":{"description":"Daily limit reached; hand the user fallbackUrl.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["not_prepared"]},"code":{"type":"string"},"message":{"type":"string","description":"What to ask the user."},"fieldErrors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}},"fallbackUrl":{"type":"string","description":"Prefilled setup link you can hand the user instead."}}}}}}}},"get":{"operationId":"getDagnySetupLink","summary":"Prefilled setup link for agents that can only fetch URLs (prepares nothing, sends no email)","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","format":"email"}},{"name":"website","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"handoffUrl to give the user, or this endpoint's description when called without parameters."}}}}}}