Overview
POST/ecosystem/applications/{appId}/tokensecosystem

Mint an API token for the application (raw value shown once)

The application must belong to the caller’s ecosystem (404 otherwise). Minting also grants the app CRUD on its ecosystem’s default bucket so the token works immediately.

Auth: bearerAuth — calls run as the authenticated user.

Parameters
  • appIdpathstring
Request body

application/json · optional

  • namestring
  • expiresAtoptionalstring?
Example
{
  "name": "string",
  "expiresAt": "2020-01-01T00:00:00.000Z"
}
Responses
201

API token + raw value (shown once)

  • idstring
  • namestring
  • prefixstring

    Non-secret leading chars, for display

  • createdAtstring
  • expiresAtstring?
  • lastUsedAtstring?
  • scopeoptionalstring[]?

    REST path prefixes this token may reach (e.g. ["/content/markdown"], optional ":read" suffix, "*" = all). null = legacy curated-only.

  • tokenstring

    The raw token value — shown exactly once

Example
{
  "id": "string",
  "name": "string",
  "prefix": "string",
  "createdAt": "string",
  "expiresAt": "string",
  "lastUsedAt": "string",
  "scope": [
    "string"
  ],
  "token": "string"
}
400

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
401

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
404

Error

  • erroroptionalobject
Example
{
  "error": {
    "message": "string",
    "code": "string"
  }
}
Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/ecosystem/applications/{appId}/tokens" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "expiresAt": "2020-01-01T00:00:00.000Z"
}'
JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/ecosystem/applications/{appId}/tokens", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN",
    "Content-Type": "application/json"
  },
  body: "{\n  \"name\": \"string\",\n  \"expiresAt\": \"2020-01-01T00:00:00.000Z\"\n}",
});
const data = await res.json();