Skip to main content
    Ivy Biosciences Docs/Call the platform/API/Reference/Reference/API Keys/PATCH /user/api-keys

    PATCH /user/api-keys

    Revoke, archive or move several API keys — Applies one action to up to 50 of your keys at once. revoke and archive both set the status to revoked…

    Auth: required. Send a signed-in session token (Authorization: Bearer …) or the session cookie (browser sessions). See Authentication.

    Applies one action to up to 50 of your keys at once. revoke and archive both set the status to revoked; move replaces each key's project restriction. If any key belongs to someone else, or the batch includes a key the action can't touch, nothing is changed: revoke and archive refuse the key .bloom* manages for job callbacks, and move refuses that key and every other key .bloom* manages. Requires a signed-in session; an ivy_ key is answered with 401.

    Request

    Request body

    actionenum ("revoke" | "archive" | "move")
    keyIdsstring (uuid)[]
    allowedProjectIdsstring[]

    Required for move. An empty array removes the project restriction.

    Responses

    200 OK

    The action was applied

    Response shape:

    successboolean
    actionenum ("revoke" | "archive" | "move")
    affectedinteger

    Number of keys in the request that the action was applied to.

    400 Bad Request

    keyIds is empty or longer than 50, action is not recognised, or allowedProjectIds is missing for move

    Response shape: object

    401 Unauthorized

    A signed-in session is required

    Response shape: object

    403 Forbidden

    Some keys are not yours (unauthorizedIds), a project is not accessible to you, or the batch includes a managed key the action refuses (managedKeyIds). If a key becomes managed while the request runs, the other keys are still changed: read affected and refused

    Response shape: object

    429 Too Many Requests

    Rate limit exceeded

    Response shape: object

    curl -X PATCH 'https://ivybiosciences.com/api/user/api-keys' \
      -H "Authorization: Bearer $IVY_SESSION_TOKEN" \
      -H 'Content-Type: application/json' \
      -d '{
      "action": "revoke",
      "keyIds": [
        "00000000-0000-0000-0000-000000000000"
      ]
    }'

    Was this page helpful?

    Loading...