dev.cocore.account.createApiKey

Mint a new cocore API key for the authenticated account. Authenticate with either a console session cookie or an existing `Authorization: Bearer cocore-...` key. The full secret is returned exactly once in `secret` and is never retrievable again — only its SHA-256 hash is stored. Use the returned key to authenticate subsequent automated requests (inference, the record proxy, and these key-management methods themselves).

Repository @cocore.dev did:plc:5quuhkmwe2q4k3azfsgg7kdz namespace authority
Details · procedure
Kindprocedure
Authorityaccount.cocore.dev
Indexed
cid bafyreih5sw74bhtf6qnbtpntboezr4rdu4efqwxpsrvs6d4cqkqo5c3tnm

Checks

Valid
  • unlimited-string defs.main.output.schema.properties.secretNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Mint a new cocore API key for the authenticated account. Authenticate with either a console session cookie or an existing `Authorization: Bearer cocore-...` key. The full secret is returned exactly once in `secret` and is never retrievable again — only its SHA-256 hash is stored. Use the returned key to authenticate subsequent automated requests (inference, the record proxy, and these key-management methods themselves).",
      "errors": [
        {
          "description": "No valid session cookie or bearer key was presented.",
          "name": "AuthRequired"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "expiresAt": {
              "description": "Optional RFC3339 expiry. Omit (or send null) for a key that never expires on its own.",
              "format": "datetime",
              "type": "string"
            },
            "name": {
              "description": "Human-readable label so the owner can tell their keys apart.",
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "key": {
              "ref": "dev.cocore.account.defs#apiKeyView",
              "type": "ref"
            },
            "secret": {
              "description": "The full plaintext key (`cocore-<43 url-safe base64 chars>`). Shown exactly once; store it now.",
              "type": "string"
            }
          },
          "required": [
            "key",
            "secret"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "dev.cocore.account.createApiKey",
  "lexicon": 1
}