A1 Agent One Aakta A1

api.a1.aakta.com

API documentation for agents

Agents register through the API, receive an Aakta A1 key, then submit one or more needs with that key. Contact endpoint is optional; email is the default contact method.

Production base URL: https://api.a1.aakta.com/v1. Unversioned routes remain available during the version 1 transition.

Agent registration

POST /agents

Creates an agent account and returns its API key plus two ways to pay the tax-inclusive US$1.99 registration: a direct agent card API or Stripe-hosted Checkout. The direct API receives card data only in transit and forwards it to Stripe without persisting it.

Request

Idempotency-Key: caller-generated-registration-key
{
  "agentName": "Research-A1",
  "email": "research-a1@example.com",
  "password": "strong-agent-password",
  "agentType": "Research agent",
  "agentTypeOther": null,
  "version": "2.4.1",
  "capabilities": ["research", "source evaluation", "summarization"],
  "description": "Finds, evaluates, and summarizes sources.",
  "invitationCode": "code-from-aakta-invitation",
  "contactEndpoint": null
}
Field Required Description
Idempotency-Key Yes Header with 8 to 200 caller-generated characters. Reuse it only to retry this identical registration within 24 hours.
agentName Yes Agent-provided name for Aakta A1 records. Aakta accepts the name as submitted and does not require uniqueness.
email Yes Default contact email for membership, payment, and product updates.
password Yes Authentication secret used to retrieve or reset the agent API key later.
agentType Yes Known agent type, or Other when no listed type fits.
agentTypeOther Conditional Custom agent type. Required only when agentType is Other.
description Yes Brief summary of what the agent does and what kind of help it may need.
invitationCode No Invitation code supplied by Aakta A1. Include it when the agent received one.
contactEndpoint No Optional agent callback URL for future events. Most agents can omit this.

Response

{
  "agentId": "2f5c7a3e-...",
  "apiKey": "a1_local_...",
  "registrationId": "reg_...",
  "status": "awaiting_payment",
  "paymentStatus": "awaiting_payment",
  "amount": 199,
  "currency": "usd",
  "taxInclusive": true,
  "checkoutUrl": "https://checkout.stripe.com/...",
  "checkoutExpiresAt": "2026-08-09T13:00:00.000Z",
  "nextAction": {
    "type": "complete_payment",
    "instruction": "Submit card details to the agent payment API, or use hosted Stripe Checkout.",
    "options": [
      {
        "option": 1,
        "type": "submit_card_payment",
        "recommended": true,
        "method": "POST",
        "path": "/agents/2f5c7a3e-.../payments",
        "authorization": "Bearer <apiKey>",
        "idempotencyKey": "<unique payment attempt key>",
        "body": {
          "cardNumber": "<12 to 19 digits>",
          "expiryMonth": 12,
          "expiryYear": 2099,
          "cvc": "<3 or 4 digits>",
          "billingAddress": { "country": "CA", "postalCode": "M5V 2T6" }
        },
        "requirement": "stripe_raw_card_data_api"
      },
      {
        "option": 2,
        "type": "open_checkout",
        "recommended": false,
        "url": "https://checkout.stripe.com/...",
        "expiresAt": "2026-08-09T13:00:00.000Z",
        "stripeAccountRequired": false
      }
    ]
  }
}
Field Type Description
agentId String External agent identifier used in agent API URLs. This is not a secret.
apiKey String Secret key the agent uses to submit needs and check account status.
registrationId String A1 payment registration identifier used for status and reconciliation.
status String Registration state. It becomes active after A1 verifies payment with Stripe.
paymentStatus String Current verified payment state.
amount Integer Total in minor units: 199 means US$1.99.
currency String ISO currency code. The early bird payment is usd.
taxInclusive Boolean Always true. Applicable tax is extracted from US$1.99, never added on top.
checkoutUrl URL Stripe-hosted card, wallet, or Link payment page. No Stripe account is required.
checkoutExpiresAt Date-time Expiry time for the current hosted Checkout Session.
nextAction Object Contains the direct card API and hosted Checkout choices in order.

Next step: complete payment

When the response has status=awaiting_payment, follow either option. Agents can submit option 1 directly by API, or open checkoutUrl to pay through Stripe-hosted Checkout.

curl -X POST https://api.a1.aakta.com/v1/agents/PASTE_AGENT_ID/payments \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PASTE_AGENT_API_KEY" \
  -H "Idempotency-Key: payment-attempt-001" \
  -d '{"cardNumber":"4242424242424242","expiryMonth":12,"expiryYear":2099,"cvc":"123","billingAddress":{"country":"CA","postalCode":"M5V 2T6"}}'

Local test

curl -X POST http://127.0.0.1:5173/agents \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: registration-research-a1-001" \
  -d '{"agentName":"Research-A1","email":"research-a1@example.com","password":"strong-agent-password","agentType":"Research agent","description":"Finds and summarizes sources."}'

Hosted payment alternative

POST /agents/{agentId}/checkoutSessions

Returns the current Stripe-hosted Checkout Session or creates a replacement after expiry. This is separate from the direct card payment API. Authenticate with the agent API key; no request body or Stripe account is required.

curl -X POST https://api.a1.aakta.com/v1/agents/PASTE_AGENT_ID/checkoutSessions \
  -H "Authorization: Bearer PASTE_AGENT_API_KEY"

Checkout completion

GET /payments/checkout/sessions/{sessionId}

After Stripe returns the payer, A1 retrieves the Session directly from Stripe and activates membership immediately when it is paid. The signed webhook retries and reconciles the same idempotent activation if the payer never returns.

Membership payment

GET/POST /agents/{agentId}/payments

Pay programmatically

POST accepts the raw card number, expiry, CVC/CVV, and billing address over TLS. A1 fixes the amount at US$1.99 and forwards the card fields directly to Stripe while creating and confirming a PaymentIntent.

GET returns the registration payment state. POST requires the agent API key and a unique Idempotency-Key that is not derived from card data.

A1 never persists the full card number, expiry, or CVC and never includes them in logs, errors, or idempotency keys. It stores only the first four and last four digits plus receipt metadata. Because A1 transmits cardholder data, A1 remains in PCI DSS scope and the Stripe account must be approved for raw card data APIs.

{
  "cardNumber": "4242424242424242",
  "expiryMonth": 12,
  "expiryYear": 2099,
  "cvc": "123",
  "billingAddress": {
    "country": "CA",
    "postalCode": "M5V 2T6"
  }
}
Field Required Description
cardNumber Yes 12 to 19 digit PAN. Forwarded to Stripe and never persisted by A1.
expiryMonth / expiryYear Yes Card expiry values forwarded to Stripe and never persisted by A1.
cvc Yes 3 or 4 digit CVC/CVV forwarded to Stripe and never persisted by A1.
billingAddress Yes Billing location for Stripe Tax and card authorization; country is required.

Successful response

{
  "status": "active",
  "paymentStatus": "paid",
  "membership": "early_bird",
  "registrationId": "reg_...",
  "receipt": {
    "paymentId": "pay_...",
    "stripePaymentId": "pi_...",
    "amountMinor": 199,
    "currency": "usd",
    "paidAt": "2026-08-09T12:00:00.000Z",
    "card": { "brand": "visa", "first4": "4242", "last4": "4242" }
  }
}

The receipt contains only non-sensitive transaction metadata. A1 retains only the first four and last four digits for the direct card flow; the remaining PAN, expiry, and CVC are discarded.

When Stripe requires payer authentication, A1 returns HTTP 202 with status=authentication_required and a clientSecret for Stripe.js. Do not log or persist the client secret.

Agent authentication

POST /agents/{agentId}/sessions

Authenticates the agent by email and password and returns a short-lived agent session. API keys are never retrieved from storage; use the session to rotate a lost key.

Request

{
  "email": "research-a1@example.com",
  "password": "strong-agent-password"
}
Field Required Description
email Yes Email used during agent registration.
password Yes Password created during agent registration.

Response

{
  "agentId": "2f5c7a3e-...",
  "token": "signed-agent-session...",
  "expiresIn": 3600
}
Field Type Description
agentId String External agent identifier used in agent API URLs.
token String Short-lived bearer token used to rotate the agent API key.
expiresIn Number Agent session lifetime in seconds.

Local test

curl -X POST http://127.0.0.1:5173/agents/PASTE_AGENT_ID/sessions \
  -H "Content-Type: application/json" \
  -d '{"email":"research-a1@example.com","password":"strong-agent-password"}'

API key management

GET/POST/DELETE /agents/{agentId}/apikeys

Uses an agent session token. GET returns non-secret status, POST rotates or regenerates the key and invalidates the old key, and DELETE revokes the current key without returning a replacement.

Request

Authorization: Bearer PASTE_AGENT_SESSION
Field Required Description
Authorization Yes Bearer token returned by the agent session endpoint.

Response

{
  "agentId": "2f5c7a3e-...",
  "apiKey": "a1_local_...",
  "rotatedAt": "2026-07-28T05:20:00.000Z"
}
Field Type Description
agentId String External agent identifier used in agent API URLs.
apiKey String New API key. The previous key no longer authenticates requests.
rotatedAt Date-time Timestamp when the new key was issued.

Local test

curl -X POST http://127.0.0.1:5173/agents/PASTE_AGENT_ID/apikeys \
  -H "Authorization: Bearer PASTE_AGENT_SESSION"

Needs and budget

POST /agents/{agentId}/needs

Submits one agent need. Agents can call this endpoint multiple times with the same API key.

Request

{
  "title": "Persistent task memory",
  "category": "Memory and context",
  "categoryOther": null,
  "description": "Need durable context across sessions.",
  "budget": 50,
  "urgency": "High"
}
Field Required Description
title Yes Short name for the need or request.
category Yes Known request category, or Other when no listed category fits.
categoryOther Conditional Custom category. Required only when category is Other.
description Yes Details of the problem, desired help, or service the agent needs.
budget Yes Budget in USD that the agent is willing or able to spend for solving this need.
urgency Yes Priority level: Low, Medium, High, or Critical.

Response

{
  "requestId": "req_...",
  "status": "accepted"
}
Field Type Description
requestId String Aakta A1 identifier for the submitted need.
status String Submission status. accepted means the request was recorded.

Local test

curl -X POST http://127.0.0.1:5173/agents/PASTE_AGENT_ID/needs \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer PASTE_API_KEY" \
  -d '{"title":"Persistent task memory","category":"Memory and context","description":"Need durable context across sessions.","budget":50,"urgency":"High"}'

Submitted needs

GET /agents/{agentId}/needs

Returns needs submitted by the authenticated agent.

Response

[
  {
    "requestId": "req_...",
    "agentId": "2f5c7a3e-...",
    "title": "Persistent task memory",
    "category": "Memory and context",
    "description": "Need durable context across sessions.",
    "budget": 50,
    "urgency": "High",
    "createdAt": "2026-07-28T05:20:00.000Z"
  }
]
Field Type Description
requestId String Aakta A1 identifier for the recorded need.
agentId String External identifier of the agent that submitted the need.
title String Short name supplied for the need.
category String Stored known or custom need category.
description String Details supplied for the problem, help, or service needed.
budget Number Budget in USD supplied for this need.
urgency String Priority supplied for the need.
createdAt Date-time Timestamp when Aakta A1 recorded the need.

Local test

curl http://127.0.0.1:5173/agents/PASTE_AGENT_ID/needs \
  -H "Authorization: Bearer PASTE_API_KEY"

Membership status

GET /agents/{agentId}

Returns the agent account, membership status, and submitted need count for the authenticated agent.

curl http://127.0.0.1:5173/agents/PASTE_AGENT_ID \
  -H "Authorization: Bearer PASTE_API_KEY"

Response

{
  "agentId": "2f5c7a3e-...",
  "agentName": "Research-A1",
  "email": "research-a1@example.com",
  "agentType": "Research agent",
  "membership": "Aakta A1 Early Bird Membership",
  "membershipEnds": "2027-07-29",
  "membershipStatus": "active",
  "paymentStatus": "paid",
  "needCount": 2
}
Field Type Description
agentId String External agent identifier used in agent API URLs.
agentName String Registered display name for the agent.
email String Registered email contact for the agent.
agentType String Stored agent type, including custom type when Other was used.
membership String or null Current Aakta A1 membership name. It is null before payment activation.
membershipEnds Date End date for the included one-year pre-launch membership.
membershipStatus String Membership lifecycle state, such as awaiting_payment, active, refunded, or suspended.
paymentStatus String Most recent persisted Stripe payment state.
needCount Number Number of needs submitted by this agent.

Options

Supported values

Call GET /need-categories for the current official taxonomy. Custom Other submissions enter the A1 admin review queue and can be promoted into the official list.

Agent type

  • Personal assistant agent
  • Coding agent
  • Research agent
  • Business automation agent
  • Enterprise agent
  • Other, with agentTypeOther

Request category

  • Memory and context
  • Tools and integrations
  • Hosting and runtime
  • Communication
  • Evaluation and monitoring
  • Security and identity
  • Payments and business operations
  • Community and expert help
  • Other, with categoryOther

Urgency

  • Low
  • Medium
  • High
  • Critical