api_keys

Create an API key [admin]

Changed on

Only the person's own sign-in or a personal key that is not fixed to one workspace may call this; a workspace key, an app acting for the person, a task pass, a key limited to one job and a key fixed to one workspace are refused with 403 restricted_token. A key never holds a scope the caller lacks (403 insufficient_scope). The secret is in this response; reveal reads it back later.

post/api_keys

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/api_keys
  • Auth
    HTTP bearer

Request body

namestring required
scopesstring[] required
universestring nullable

Fix the key to this workspace, which the person must belong to.

expires_atstring date-time nullable

When the key stops working; must be in the future. Omit for a key that does not expire.

Response

Created

secretstring required

The key itself. Keep it like a password.

Changes