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

    PUT /user/api-keys

    Update an API key — Changes the name, description, rate limits or project restriction of one of your active keys. Send only the fields you want to change.

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

    Changes the name, description, rate limits or project restriction of one of your active keys. Send only the fields you want to change. Scopes and expiry cannot be changed. Requires a signed-in session; an ivy_ key is answered with 401.

    Request

    Request body

    keyIdstring (uuid)

    The key's id.

    namestring

    New display name. Must not be blank.

    descriptionstring
    rateLimitPerHourinteger
    rateLimitPerDayinteger
    maxConcurrentJobsinteger
    allowedProjectIdsstring[]

    New project restriction. Send null to remove it.

    Responses

    200 OK

    The updated key

    Response shape:

    idstring (uuid)

    Key id. Pass it as keyId to read usage.

    keyIdstring

    Public key identifier.

    keyPrefixstring

    First characters of the key, for recognising it.

    namestring
    descriptionstring
    statusenum ("active" | "revoked" | "expired")
    scopesstring[]
    allowedProjectIdsstring[]

    Projects the key is limited to; null means all of your projects.

    rateLimitPerHourinteger
    rateLimitPerDayinteger
    maxConcurrentJobsinteger
    totalRequestsinteger
    lastUsedAtstring (date-time)
    expiresAtstring (date-time)
    createdAtstring (date-time)

    400 Bad Request

    keyId is missing, the name is empty, or a limit is not a positive bounded integer

    Response shape: object

    401 Unauthorized

    A signed-in session is required

    Response shape: object

    403 Forbidden

    The key would be limited to projects you cannot access (unauthorizedProjectIds lists them)

    Response shape: object

    404 Not Found

    No active key with that id on your account

    Response shape: object

    429 Too Many Requests

    Rate limit exceeded

    Response shape: object

    curl -X PUT 'https://ivybiosciences.com/api/user/api-keys' \
      -H "Authorization: Bearer $IVY_SESSION_TOKEN" \
      -H 'Content-Type: application/json' \
      -d '{
      "keyId": "00000000-0000-0000-0000-000000000000"
    }'

    Was this page helpful?

    Loading...