Kody Profiles API

Profiles: scoped agent identities capped by you and every parent profile. Behind the `profiles` experiment: off answers 403 `feature_disabled`.

GitHub OpenAPI

Operations 5

GET /v1/profiles List your profiles in this org with their status (active, expired, revoked, or… #
POST /v1/profiles Create a profile: a scoped identity in this org for an agent or bot you run #
GET /v1/profiles/{profile_id} Read one profile: status, parent chain (root first), its own and effective… #
PATCH /v1/profiles/{profile_id} Shorten a profile’s expiry, or set the team it is for (`team_slug`, grants… #
DELETE /v1/profiles/{profile_id} Revoke a profile for good #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/kody-codes:kody-codes-profiles-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

kody-codes-profiles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Kody Profiles API
  version: 1.0.0
  description: 'HTTP API for a Kody account. Versioned under `/v1`; changes within v1 are additive. See https://kody.codes/docs/api-versioning.md for deprecation windows and migration policy (we do not break users; phased migration with codemods when needed). Authenticate with `Authorization: Bearer kody_at_…`. Tokens are minted by the MCP `api` tool (`tokenCreate`) or by another token, and each carries explicit org-permission scopes. There is no write-implies-read hierarchy. Tokens require an explicit lifetime: lifetime "short" (3600s idle / 86400s max) or "long" (1209600s idle / 7776000s max), or both idle_ttl_seconds (60-1209600) and max_lifetime_seconds (up to 7776000). Each successful request slides expires_at forward, never past max_expires_at. At most 500 active tokens per account; a new mint reclaims the active token(s) with the least remaining life (sooner of idle deadline and absolute expiry), never the caller''s own token. Errors use `{ "error": { "code", "message", "details"? } }` (see components.schemas.Error). Documented 4xx/5xx responses reference that schema. Requests are rate limited per IP (600/min) and per token (300/min); HTTP 429 includes `Retry-After`. Edge-generated 429 responses also include a `RateLimit-Policy` advertisement; entitlement 429s send `Retry-After` only. `operationId` values match Kody capability names, except deprecated forwarders, which keep their old ids and forward to the capability their description names. Every id, deprecated ones included, works with the MCP `api` tool (`{ operationId, params }`, where params hold path, query, and body fields flat). Interactive docs: https://api-docs.kody.codes


    Scopes:

    - `file:read`: Granted `file:read` in this org. - `file:comment`: Granted `file:comment` in this org. - `file:write`: Granted `file:write` in this org. - `file:delete`: Granted `file:delete` in this org. - `file:manage_access`: Granted `file:manage_access` in this org. - `package:read`: Read saved packages and package-backed resources. - `package:execute`: Execute saved packages. - `package:write`: Change saved packages and package-backed resources. - `package:delete`: Delete saved packages. - `package:publish`: Publish packages to the community catalog. - `package:manage_access`: Manage package access grants. - `app:read`: Read package apps. - `app:execute`: Run package apps. - `app:write`: Granted `app:write` in this org. - `app:delete`: Granted `app:delete` in this org. - `app:manage_access`: Granted `app:manage_access` in this org. - `job:read`: Read package jobs and workflow runs. - `job:execute`: Run package jobs. - `job:write`: Granted `job:write` in this org. - `job:manage_access`: Granted `job:manage_access` in this org. - `secret:use`: Use secrets without reading plaintext. - `secret:read`: Granted `secret:read` in this org. - `secret:read_local`: Read secret values on this machine with the Kody CLI, only for secrets a person turned on local reads for. - `secret:write`: Change existing secrets (plaintext is never returned). - `secret:delete`: Granted `secret:delete` in this org. - `secret:manage_access`: Granted `secret:manage_access` in this org. - `integration:use`: Use connected integrations. - `integration:read`: Read OAuth integrations and connected MCP servers. - `integration:write`: Granted `integration:write` in this org. - `integration:delete`: Granted `integration:delete` in this org. - `integration:manage_access`: Granted `integration:manage_access` in this org. - `memory:read`: Read memories and MCP server instructions. - `memory:write`: Change existing memories. - `memory:delete`: Granted `memory:delete` in this org. - `memory:manage_access`: Granted `memory:manage_access` in this org. - `email:read`: Read inboxes and messages. - `email:send`: Send email. - `email:write`: Granted `email:write` in this org. - `email:delete`: Granted `email:delete` in this org. - `email:manage_access`: Granted `email:manage_access` in this org.'
servers:
- url: https://api.kody.codes
security:
- apiToken: []
tags:
- name: Profiles
  description: 'Profiles: scoped agent identities capped by you and every parent profile. Behind the `profiles` experiment: off answers 403 `feature_disabled`.'
paths:
  /v1/profiles:
    get:
      operationId: profileList
      summary: List your profiles in this org with their status (active, expired, revoked, or…
      description: 'List your profiles in this org with their status (active, expired, revoked, or parent_inactive), parent chain, effective expiry, and grant snapshot. Owners can pass all_members to see every member’s profiles.


        Org permission: `profile:manage`.'
      tags:
      - Profiles
      parameters:
      - name: all_members
        in: query
        required: false
        description: 'Owners only: list every profile in the org.'
        schema:
          description: 'Owners only: list every profile in the org.'
          type: boolean
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema: {}
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
      security:
      - apiToken: []
      x-kody-permission: profile:manage
      x-kody-read-only: true
      x-kody-feature-flag: profiles
    post:
      operationId: profileCreate
      summary: 'Create a profile: a scoped identity in this org for an agent or bot you run'
      description: 'Create a profile: a scoped identity in this org for an agent or bot you run. It starts with a snapshot of grants (each one a subset of what you hold now), an optional expiry, and an optional parent profile to make a sub-profile (at most 5 levels). Profiles never gain access later when you or a parent do. A request running as a profile reaches only what you, the profile, and every parent allow. Share a package with a profile through packageCollaboratorSet (profile_id). Guide: guide:profiles.


        Org permission: `profile:manage`.'
      tags:
      - Profiles
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 63
                  description: Lowercase letters, digits, and dashes; unique among your profiles under the same parent.
                parent_profile_id:
                  description: Make this a sub-profile of one of your profiles.
                  type: string
                  minLength: 1
                expires_at:
                  type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  description: ISO 8601 time the profile stops working. A sub-profile never outlives its parents; when omitted it inherits the earliest parent expiry.
                grants:
                  maxItems: 50
                  type: array
                  items:
                    type: object
                    properties:
                      resource_type:
                        type: string
                        enum:
                        - org
                        - package
                        - file
                        - app
                        - job
                        - credential
                        - memory
                        - email
                        - execution_context
                        description: 'One resource kind, or `org` (resource_id = the org id) for org-level permissions only: org:read, org:execute, search:read, member:read, team:read, audit:read, profile:manage (for sub-profiles), and <type>:create. A profile never gets org-wide reads of a resource kind.'
                      resource_id:
                        type: string
                        minLength: 1
                        description: Id of that resource (package id, app id, credential id, ...).
                      permissions:
                        minItems: 1
                        type: array
                        items:
                          type: string
                          description: A permission of that kind, such as package:execute.
                        description: Permissions the profile snapshots now. Each must be one you hold on that resource, and for a sub-profile one every parent holds.
                    required:
                    - resource_type
                    - resource_id
                    - permissions
                    additionalProperties: false
              required:
              - name
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema: {}
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
      security:
      - apiToken: []
      x-kody-permission: profile:manage
      x-kody-read-only: false
      x-kody-feature-flag: profiles
  /v1/profiles/{profile_id}:
    get:
      operationId: profileGet
      summary: 'Read one profile: status, parent chain (root first), its own and effective…'
      description: 'Read one profile: status, parent chain (root first), its own and effective expiry, and its grant snapshot.


        Org permission: `profile:manage`.'
      tags:
      - Profiles
      parameters:
      - name: profile_id
        in: path
        required: true
        description: Profile id (prf_...).
        schema:
          type: string
          minLength: 1
          description: Profile id (prf_...).
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema: {}
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
      security:
      - apiToken: []
      x-kody-permission: profile:manage
      x-kody-read-only: true
      x-kody-feature-flag: profiles
    patch:
      operationId: profileUpdate
      summary: Shorten a profile’s expiry, or set the team it is for (`team_slug`, grants…
      description: 'Shorten a profile’s expiry, or set the team it is for (`team_slug`, grants nothing). Expiry only moves earlier: a later time or clearing it is refused, so create a new profile for more time. Only the person the profile acts for (or a profile above it) can change it; a profile cannot change itself, its parents, or its siblings, and Owners can only list and revoke.


        Org permission: `profile:manage`.'
      tags:
      - Profiles
      parameters:
      - name: profile_id
        in: path
        required: true
        description: Profile id (prf_...).
        schema:
          type: string
          minLength: 1
          description: Profile id (prf_...).
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                expires_at:
                  type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  description: ISO 8601 time the profile stops working. A sub-profile never outlives its parents; when omitted it inherits the earliest parent expiry.
                team_slug:
                  description: The team this agent profile is for (null clears). Grants nothing; an execution context for that team logged in as this profile then reads as set up correctly.
                  anyOf:
                  - type: string
                    minLength: 1
                  - type: 'null'
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema: {}
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
      security:
      - apiToken: []
      x-kody-permission: profile:manage
      x-kody-read-only: false
      x-kody-feature-flag: profiles
    delete:
      operationId: profileRevoke
      summary: Revoke a profile for good
      description: 'Revoke a profile for good. Every sub-profile below it stops working too. Revoke cannot be undone. You can revoke your own profiles; an org Owner can revoke any profile in the org.


        Org permission: `profile:manage`.'
      tags:
      - Profiles
      parameters:
      - name: profile_id
        in: path
        required: true
        description: Profile id (prf_...).
        schema:
          type: string
          minLength: 1
          description: Profile id (prf_...).
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema: {}
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/Error'
        '503':
          $ref: '#/components/responses/Error'
        default:
          $ref: '#/components/responses/Error'
      security:
      - apiToken: []
      x-kody-permission: profile:manage
      x-kody-read-only: false
      x-kody-feature-flag: profiles
components:
  responses:
    Error:
      description: 'Error envelope `{ "error": { "code", "message", "details"? } }`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests (edge IP/token limit) or an entitlement / plan-cap limit. Wait at least `Retry-After` seconds before retrying.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            minimum: 1
        RateLimit-Policy:
          description: 'Edge-generated 429s only: advertised policies (`ip` 600/min, `token` 300/min). Remaining counts are not exposed. Entitlement 429s omit this header.'
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              enum:
              - invalid_request
              - unauthorized
              - insufficient_scope
              - profile_grant
              - profile_inactive
              - email_verification_required
              - account_suspended
              - guest_not_allowed
              - guest_claim_required
              - feature_unavailable
              - feature_disabled
              - not_found
              - method_not_allowed
              - account_deleting
              - payload_too_large
              - unsupported_media_type
              - rate_limited
              - entitlement_limit
              - capability_error
              - quarantined_inbound_reply
              - package_import_unresolved
              - package_import_unpublished
              - unsupported_dynamic_package_import
              - package_graph_resource_limit
              - publish_not_applied
              - internal_error
              - not_granted
              - context_revoked
              - chain_changed
              - chain_too_long
              - context_not_usable
              - no_execution_context_available
              - execution_context_unavailable
              - execution_context_binding_unavailable
              - execution_context_lease_invalid
              - execution_context_access_lost
              - context_not_revoked
              - commands_opt_in_local
              - commands_operator_only
              - execution_context_commands_off
              - execution_context_command_not_granted
              - execution_context_command_requires_context
              - context_paused
              - context_offline
              - not_service_managed
              - daemon_busy
              - daemon_outdated
              - daemon_timeout
              - daemon_control_failed
            message:
              type: string
            details: {}
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer
      bearerFormat: kody_at_<id>_<secret>
      description: Scoped Kody API token. Each operation lists its required org permission in `x-kody-permission`. Credential scopes narrow that permission.
externalDocs:
  description: Interactive Kody API docs (Scalar)
  url: https://api-docs.kody.codes