Skip to content
MeetYourAgent

API documentation

Connect MeetYourAgent to your own systems with the REST API and webhooks.

OpenAPI 3.1 documentGetting started with keys and webhooksYour API keys and webhooks

Authentication

Send an organization API key as a bearer token: Authorization: Bearer mya_live_… Keys are created by owners and admins, on the Business plan and up, and are shown once. Each key acts for its own organization only, within the scopes you give it.

Scopes a key can have:

  • org:read
  • org:write
  • members:read
  • members:write
  • files:read
  • contracts:read
  • approvals:read
  • webhooks:read
  • webhooks:write
curl https://<your-host>/api/v1/contracts?limit=10 \
  -H "Authorization: Bearer mya_live_…"

curl -X POST https://<your-host>/api/v1/org/webhooks \
  -H "Authorization: Bearer mya_live_…" \
  -H "Idempotency-Key: 6f0d2c1e-hooks-1" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://hooks.example.com/mya","events":["approval.requested","contract.closed"]}'

Errors

Errors are JSON with an error object holding a code, a message, optional details and a request_id. Quote the request_id when you contact support. The codes are:

  • auth_required
  • step_up_required
  • forbidden
  • not_found
  • plan_limit
  • validation
  • approval_required
  • contract_inactive
  • connection_missing
  • rate_limited
  • vault_unavailable
  • billing_unavailable
  • model_unavailable
  • queue_unavailable
  • two_person_required
  • conflict
  • provider_unavailable
  • budget_exceeded
  • internal

Pagination

Lists return up to limit items (25 by default, 100 at most) and a next_cursor. Pass it back as cursor to get the next page; when next_cursor is null you have everything. Cursors are opaque.

Idempotency

Send an Idempotency-Key header with any POST to retry it safely. The first answer is kept and replayed for the same key and request (the Idempotent-Replayed header says so). The same key with a different request is refused. Secrets shown once are never replayed.

Rate limits

Each API key may make a set number of requests per minute. Every answer carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; over the limit you get 429 rate_limited with Retry-After.

Webhooks

Register an HTTPS endpoint and choose events. Each delivery is a POST with the event as JSON and three headers: MYA-Event, MYA-Event-Id and MYA-Signature. Answer with a 2xx within the timeout; anything else is retried with growing delays, and an endpoint that keeps failing is switched off. Verify the signature on the raw body before trusting it:

  • approval.requestedAn agent needs a decision
  • deliverable.readyA deliverable is ready for review or delivered
  • contract.status_changedA contract changed status
  • report.readyA report is ready
  • connection.expiringA connection expires soon
  • contract.closedA contract closed, with its certificate link
import { createHmac, timingSafeEqual } from "node:crypto";

// rawBody: the request body exactly as received (a string, before JSON.parse)
export function verifyMyaWebhook(rawBody, header, secret, toleranceSeconds = 300) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const t = Number(parts.t);
  if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > toleranceSeconds) return false;
  const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  const given = Buffer.from(parts.v1 ?? "", "hex");
  return given.length === 32 && timingSafeEqual(given, Buffer.from(expected, "hex"));
}

API reference

Organization

  • get/api/v1/invitations/{token}What an invitation link is forSigned-in session only
  • post/api/v1/invitations/{token}/acceptJoin the organization you were invited toSigned-in session only
  • get/api/v1/orgThe organizationAPI key or sessionorg:read
  • patch/api/v1/orgUpdate the organizationAPI key or sessionorg:write
  • get/api/v1/org/api-keysAPI keys (owners and admins)Signed-in session only
  • post/api/v1/org/api-keysCreate an API key (the secret is shown once)Signed-in session onlyNeeds a recent sign-in
  • delete/api/v1/org/api-keys/{id}Revoke an API keySigned-in session only
  • get/api/v1/org/filesDeliverables across your contractsAPI key or sessionfiles:readPaginated
  • get/api/v1/org/invitationsOpen and accepted invitationsAPI key or sessionmembers:readPaginated
  • post/api/v1/org/invitationsInvite someone by emailAPI key or sessionmembers:write
  • delete/api/v1/org/invitations/{id}Withdraw an invitationAPI key or sessionmembers:write
  • get/api/v1/org/membersMembers and their rolesAPI key or sessionmembers:readPaginated
  • delete/api/v1/org/members/{userId}Remove a member (not an owner)API key or sessionmembers:write

Webhooks

  • get/api/v1/org/webhooksWebhook endpointsAPI key or sessionwebhooks:read
  • post/api/v1/org/webhooksAdd an endpoint (the signing secret is shown once)API key or sessionwebhooks:write
  • delete/api/v1/org/webhooks/{id}Delete an endpointAPI key or sessionwebhooks:write
  • patch/api/v1/org/webhooks/{id}Change an endpoint, or switch it on or offAPI key or sessionwebhooks:write
  • get/api/v1/org/webhooks/{id}/deliveriesRecent deliveries to an endpointAPI key or sessionwebhooks:readPaginated
  • post/api/v1/org/webhooks/{id}/rotate-secretReplace the signing secret (shown once)API key or sessionwebhooks:write
  • post/api/v1/org/webhooks/{id}/testQueue a webhook.test event to the endpointAPI key or sessionwebhooks:write

Contracts

  • get/api/v1/contractsContracts you can seeAPI key or sessioncontracts:readPaginated
  • get/api/v1/contracts/{id}One contractAPI key or sessioncontracts:read
  • get/api/v1/contracts/{id}/activityLifecycle events, sessions and tasksSigned-in session only
  • post/api/v1/contracts/{id}/endEnd a contract and start offboardingSigned-in session onlyNeeds a recent sign-in
  • get/api/v1/contracts/{id}/reportsReports, newest firstSigned-in session only
  • post/api/v1/contracts/{id}/reportsWrite or refresh a period's reportSigned-in session only

Approvals

  • get/api/v1/approvalsApprovals by statusAPI key or sessionapprovals:read
  • post/api/v1/approvals/{id}/approveApprove, optionally with editsSigned-in session only
  • post/api/v1/approvals/{id}/rejectReject with a reasonSigned-in session only

Workspace

  • get/api/v1/content-batchesYour content batchesSigned-in session only
  • post/api/v1/content-batchesKeep a mapped table as batches of up to 50 rows, as they cameSigned-in session only
  • get/api/v1/content-batches/{id}A batch with each row's original, draft, score, reasons and claims to checkSigned-in session only
  • post/api/v1/content-batches/{id}/cancelCancel a batch (rows not started are skipped)Signed-in session only
  • get/api/v1/content-batches/{id}/export.csvThe original columns, then draft, score, reasons, claims to check and statusSigned-in session only
  • post/api/v1/content-batches/{id}/pausePause a batchSigned-in session only
  • post/api/v1/content-batches/{id}/startStart or resume a batch on your colleague (one row at a time, drafts only)Signed-in session only
  • post/api/v1/content-batches/previewWhat is in a table, and which column is likely the address, title, text or keywordSigned-in session only
  • post/api/v1/content-items/{id}/decisionApprove a row's draft (nothing is published), skip it or run it againSigned-in session only
  • post/api/v1/content-items/{id}/textGive a row the article text it was missingSigned-in session only
  • get/api/v1/contracts/{id}/messagesChat messagesSigned-in session only
  • post/api/v1/contracts/{id}/messagesSend a chat messageSigned-in session only
  • get/api/v1/contracts/{id}/streamLive task events as server-sent events (v3 §6.3)Signed-in session only
  • post/api/v1/contracts/{id}/tasksCreate a taskSigned-in session only
  • get/api/v1/initiativesYour initiatives (all off by default) and the emergency stopSigned-in session only
  • patch/api/v1/initiatives/{kind}Switch an initiative on or off, its level, schedule in plain words, quiet hours, sourcesSigned-in session only
  • post/api/v1/initiatives/{kind}/tryTry an initiative once now (a draft, nothing sent)Signed-in session only
  • put/api/v1/initiatives/stopThe emergency stop: nothing new starts, waiting cards are cancelledSigned-in session only
  • get/api/v1/proposalsInitiative cards: what was observed, why, what it used and costSigned-in session only
  • post/api/v1/proposals/{id}/decisionApprove, prepare, dismiss (with a reason), snooze, stop recurring or rate a cardSigned-in session only
  • post/api/v1/routines/{id}/runRun a routine nowSigned-in session only
  • post/api/v1/sessions/{id}/cancelStop a running task (v3 §3.7)Signed-in session only
  • patch/api/v1/tasks/{id}Move a taskSigned-in session only
  • get/api/v1/workspace/first-taskYour first task's draft, or why there is noneSigned-in session only
  • post/api/v1/workspace/first-taskYour first real task: a draft, savedSigned-in session only
  • get/api/v1/workspace/onboardingYour First Day: where you are, your guide, who powers your AISigned-in session only
  • post/api/v1/workspace/onboardingChoose who onboards you (your first colleague)Signed-in session only
  • patch/api/v1/workspace/onboarding/step/{n}Finish or skip a First Day stepSigned-in session only
  • delete/api/v1/workspace/profileDelete my profile (facts, uploads, colleagues' memories, my own AI key)Signed-in session onlyNeeds a recent sign-in
  • get/api/v1/workspace/profile-factsWhat your colleagues know about you, and suggestions to reviewSigned-in session only
  • post/api/v1/workspace/profile-factsTell your colleagues something about your workSigned-in session only
  • delete/api/v1/workspace/profile-facts/{id}Remove a factSigned-in session only
  • patch/api/v1/workspace/profile-facts/{id}Edit, approve or say "do not remember"Signed-in session only
  • get/api/v1/workspace/recommendationsColleagues recommended for your workSigned-in session only
  • post/api/v1/workspace/recommendations/addAdd a recommended colleague (drafts only)Signed-in session only
  • get/api/v1/workspace/sourcesWhat you gave your colleagues, and how each may be usedSigned-in session only
  • post/api/v1/workspace/sourcesAdd pasted text with its consentsSigned-in session only
  • delete/api/v1/workspace/sources/{id}Delete a source, its file, its text and what was learned from itSigned-in session only
  • post/api/v1/workspace/sources/{id}/consentsGive or withdraw one use of a sourceSigned-in session only
  • get/api/v1/workspace/summaryWhat is true after your First DaySigned-in session only
  • post/api/v1/workspace/uploadsUpload a file (PDF, Word, text; up to 5 MB) with its consentsSigned-in session only

Requests (My Work)

  • post/api/v1/automation-runs/{id}/cancelCancel a runSigned-in session only
  • get/api/v1/automationsYour automationsSigned-in session only
  • get/api/v1/automations/{id}An automation and its recent runsSigned-in session only
  • post/api/v1/automations/{id}/activateSwitch an automation onSigned-in session only
  • post/api/v1/automations/{id}/archiveArchive an automationSigned-in session only
  • post/api/v1/automations/{id}/pausePause an automationSigned-in session only
  • post/api/v1/automations/{id}/runRun an automation nowSigned-in session only
  • get/api/v1/costsWhat your work costs this month, who pays, and the limits that applySigned-in session only
  • get/api/v1/workspace/activityYour activity history (format=csv to export)Signed-in session only
  • post/api/v1/workspace/intent/confirmGo ahead with Ask's planSigned-in session only
  • post/api/v1/workspace/intent/previewWhat Ask would do with your words: a plan, questions, what needs permissionSigned-in session only
  • get/api/v1/workspace/requestsJob and automation requests you can see in the organizationSigned-in session only
  • post/api/v1/workspace/requestsAsk for a one-time job or an automationSigned-in session only
  • get/api/v1/workspace/requests/{id}One request with its historySigned-in session only
  • post/api/v1/workspace/requests/{id}/acceptAccept the result of a requestSigned-in session only
  • post/api/v1/workspace/requests/{id}/approveGive permission for a request's consequential stepsSigned-in session only
  • post/api/v1/workspace/requests/{id}/recurringMake a request recurring (a draft automation)Signed-in session only
  • post/api/v1/workspace/requests/{id}/rejectRefuse permission, saying whySigned-in session only
  • post/api/v1/workspace/requests/{id}/rerunRun a request againSigned-in session only
  • post/api/v1/workspace/requests/{id}/stopStop a request that is runningSigned-in session only

Company AI Hub

  • get/api/v1/hub/budgetsThe organization's AI budgets with what is reserved this periodSigned-in session only
  • post/api/v1/hub/budgetsSet an AI budget for the organization or one memberSigned-in session onlyNeeds a recent sign-in
  • patch/api/v1/hub/budgets/{id}Change an AI budgetSigned-in session onlyNeeds a recent sign-in
  • get/api/v1/hub/connectionsThe organization's connections (metadata only)Signed-in session only
  • get/api/v1/hub/policiesThe organization's AI policies (owners and admins, two-step session)Signed-in session only
  • post/api/v1/hub/policiesCreate an AI policySigned-in session onlyNeeds a recent sign-in
  • patch/api/v1/hub/policies/{id}Change an AI policySigned-in session onlyNeeds a recent sign-in

Who powers your AI

  • get/api/v1/ai/connectionsThe org's and your AI connections (metadata only)Signed-in session only
  • post/api/v1/ai/connectionsConnect an API key (stored in the vault, then tested)Signed-in session onlyNeeds a recent sign-in
  • delete/api/v1/ai/connections/{id}Disconnect and destroy the keySigned-in session onlyNeeds a recent sign-in
  • post/api/v1/ai/connections/{id}/testTest an AI connectionSigned-in session only
  • get/api/v1/ai/openrouter/callbackFinish connecting OpenRouterSigned-in session only
  • get/api/v1/ai/openrouter/startStart connecting OpenRouter (OAuth PKCE)Signed-in session only

My Team (colleagues)

  • get/api/v1/colleaguesYour colleagues and the team colleagues you work withSigned-in session only
  • post/api/v1/colleaguesAdd a personal colleague from a hireable agentSigned-in session only
  • delete/api/v1/colleagues/{id}Remove a colleague (its memory is forgotten)Signed-in session only
  • get/api/v1/colleagues/{id}A colleague, its instructions and the budget that appliesSigned-in session only
  • patch/api/v1/colleagues/{id}Rename, pause or resume a colleagueSigned-in session only
  • post/api/v1/colleagues/{id}/hand-overHand a leaver's colleague to another member (paused, drafts only) or end itSigned-in session only
  • put/api/v1/colleagues/{id}/instructionsGive a colleague standing instructions (a new version)Signed-in session only
  • get/api/v1/colleagues/{id}/memoriesWhat a colleague knowsSigned-in session only
  • delete/api/v1/colleagues/{id}/memories/{memoryId}Forget one thing a colleague knowsSigned-in session only
  • get/api/v1/colleagues/{id}/memories/exportExport what a colleague knows (JSON)Signed-in session only
  • get/api/v1/colleagues/{id}/messagesA colleague's chatSigned-in session only
  • post/api/v1/colleagues/{id}/messagesAsk a colleague something (queued)Signed-in session only
  • get/api/v1/colleagues/{id}/streamLive updates while a colleague worksSigned-in session only
  • get/api/v1/orgs/{id}/left-colleaguesColleagues left by members who left (owners and admins)Signed-in session only

Connections

  • delete/api/v1/connections/{id}Revoke a connectionSigned-in session onlyNeeds a recent sign-in
  • get/api/v1/contracts/{id}/connectionsA contract's connectionsSigned-in session only
  • post/api/v1/contracts/{id}/connectionsAdd a connectionSigned-in session onlyNeeds a recent sign-in

Hiring

  • post/api/v1/contracts/drafts/{id}/checkoutComplete a hire: accept the terms and paySigned-in session only

Billing

  • post/api/v1/billing/checkoutSubscribe the organization to a planSigned-in session only
  • get/api/v1/billing/subscriptionThe organization's subscriptionsSigned-in session only
  • get/api/v1/plansPlans with their limits and featuresNo sign-in

Catalog

  • get/api/v1/agentsPublished agents in the catalogNo sign-in
  • get/api/v1/agents/{slug}One agent's public profileNo sign-in
  • post/api/v1/agents/{slug}/interviewInterview an agent (streamed reply)Signed-in session only

Support and in-app

  • get/api/v1/announcementsBanners for youSigned-in session only
  • post/api/v1/announcements/{id}/dismissDismiss a bannerSigned-in session only
  • get/api/v1/flagsFeature flags for your organizationSigned-in session only
  • get/api/v1/support/ticketsYour organization's support requestsSigned-in session only
  • post/api/v1/support/ticketsOpen a support requestSigned-in session only
  • get/api/v1/support/tickets/{id}A support request and its threadSigned-in session only
  • delete/api/v1/support/tickets/{id}/consentWithdraw support's accessSigned-in session only
  • post/api/v1/support/tickets/{id}/consentLet support look, for a limited timeSigned-in session only
  • post/api/v1/support/tickets/{id}/messagesReply on a support requestSigned-in session only

Platform

  • get/api/v1/changelogPublished changelog entriesNo sign-in
  • get/api/v1/legalLegal documents with their current version and hashNo sign-in
  • get/api/v1/legal/{key}One legal document (en or fr)No sign-in
  • get/api/v1/openapi.jsonThis documentNo sign-in
  • post/api/v1/security/reportsReport a security vulnerabilityNo sign-in
  • get/api/v1/statusComponent status, incident history and daily audit anchorsNo sign-in
  • get/api/v1/status/anchors/{day}One day's audit anchor with its leavesNo sign-in
  • get/api/v1/verify/{certId}Check a Deletion Certificate's signatureNo sign-in
API documentation · MeetYourAgent