SendlySendly
API ReferenceApi keys

Get an API key

GET
/api/projects/{id}/api-keys/{keyId}

Returns one key on the project, revoked or not. Never returns a token or its hash: lastFour is the only fragment of the secret that survives creation. 404 if the key does not exist under this project.

Requires the api-keys:read scope — See which API keys exist, including what each one is allowed to do.

Authorization

better-auth.session_token<token>

BetterAuth session cookie. Used by the dashboard / browser clients. When present, the active project is taken from the x-project-id header.

In: cookie

Path Parameters

id*string

Project id.

keyId*string

API key id.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/projects/string/api-keys/string"
{
  "success": true,
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "projectId": "5a8591dd-4039-49df-9202-96385ba3eff8",
    "name": "string",
    "lastFour": "string",
    "legacyGrantPreset": "FULL",
    "mode": "LIVE",
    "scopes": [
      "emails:send"
    ],
    "domainId": "8a0b02c3-fdd8-452e-bc6e-ef07a335ec7e",
    "lastUsedAt": "2019-08-24T14:15:22Z",
    "createdAt": "2019-08-24T14:15:22Z",
    "revokedAt": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}
{
  "success": false,
  "error": {
    "message": "string",
    "code": "string",
    "details": {
      "errors": [
        null
      ]
    }
  }
}