Skip to main content
Docs

APIKeyResource

An interface that describes an API key used to authenticate requests to your application's API endpoints on behalf of a user or organization.

Properties

  • Name
    claims
    Type
    Record<string, any> | null
    Description

    Custom claims associated with the API key, or null if none.

  • Name
    createdAt
    Type
    Date
    Description

    The date and time when the API key was created.

  • Name
    createdBy
    Type
    string | null
    Description

    The ID of the user that created the API key.

  • Name
    description
    Type
    string | null
    Description

    An optional description for the API key.

  • Name
    expiration
    Type
    Date | null
    Description

    The expiration date and time for the API key, or null if the key never expires.

  • Name
    expired
    Type
    boolean
    Description

    Whether the API key is expired.

  • Name
    id
    Type
    string
    Description

    The unique identifier of the API key.

  • Name
    lastUsedAt
    Type
    Date | null
    Description

    The date and time when the API key was last used to authenticate a request, or null if it has never been used.

  • Name
    name
    Type
    string
    Description

    The name of the API key.

  • Name
    revocationReason
    Type
    string | null
    Description

    The reason the API key was revoked, or null if not revoked.

  • Name
    revoked
    Type
    boolean
    Description

    Whether the API key has been revoked.

  • Name
    scopes
    Type
    string[]
    Description

    An array of scopes that define what the API key can access.

  • Name
    secret?
    Type
    string
    Description

    The API key secret. This property is only present in the response from create() and cannot be retrieved later.

  • Name
    subject
    Type
    string
    Description

    The user or organization ID that the API key is associated with.

  • Name
    type
    Type
    string
    Description

    The type of the API key.

  • Name
    updatedAt
    Type
    Date
    Description

    The date and time when the API key was last updated.

Feedback

What did you think of this content?

Last updated on