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

    POST /user/api-keys

    Create an API key — Creates an ivy_ API key for your account and returns the full key in apiKey.

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

    Creates an ivy_ API key for your account and returns the full key in apiKey. This is the only time the secret is shown, so store it immediately. An API key cannot create other keys: this route needs a signed-in session, and an ivy_ key is answered with 401.

    Request

    Request body

    namestring

    Display name. Must not be blank.

    descriptionstring
    scopesstring[]

    Capabilities to grant (read, write, manage). Defaults to the standard set when omitted. Scopes reserved for .bloom* are rejected.

    expiresInDaysinteger

    Days until the key expires. The key never expires when omitted.

    rateLimitPerHourinteger
    rateLimitPerDayinteger
    maxConcurrentJobsinteger
    allowedProjectIdsstring[]

    Limit the key to these projects. You must have access to each one. The key covers all your projects when omitted.

    Responses

    201 Created

    The key was created

    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)
    apiKeystring

    The full ivy_ key. Shown once and never returned again.

    400 Bad Request

    The name is missing, a limit is not a positive bounded integer, or a requested scope is reserved for .bloom*

    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

    Your profile was not found

    Response shape: object

    429 Too Many Requests

    Rate limit exceeded

    Response shape: object

    curl -X POST 'https://ivybiosciences.com/api/user/api-keys' \
      -H "Authorization: Bearer $IVY_SESSION_TOKEN" \
      -H 'Content-Type: application/json' \
      -d '{
      "name": ""
    }'

    Was this page helpful?

    Loading...