Skip to Content

List temporary API keys

GEThttps://api.respan.ai/api/temporary-keys/

Returns unrevoked temporary API keys for your organization.

Servers

https://api.respan.ai: Respan API Server

Authentication

RespanApiKey

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

HTTP scheme: bearer; format: Respan API key.

HTTP
Authorization: Bearer $RESPAN_API_KEY

Responses

200

Paginated API keys.

application/json

Field Type Requirement Description and constraints
$ object Body
-
count integer Required in parent
Number of results on this page, not the total. Request pages until next is null to get every result.
next string or null Optional
Format: uri
previous string or null Optional
Format: uri
current_filters object Optional
Additional properties are allowed
results array<object> Required in parent
-
results[] object Array item
Additional properties are allowed
results[].id string Optional
API key ID.
results[].name string Optional
Key name.
results[].prefix string Optional
Key prefix.
results[].is_test boolean Optional
Test or production key.
results[].expiry_date string Optional
Expiry date.
Format: date-time
results[].max_usage integer Optional
Max usage count. -1 = unlimited.
results[].rate_limit number or null Optional
Requests per minute. null uses the organization default.
results[].spending_limit number or null Optional
Spending limit in USD. null when not set.
results[].created string Optional
When the API key was created.
Format: date-time
results[].unique_organization_id string or null Optional
Owning organization UUID.

OpenAPI response schema

{
  "type": "object",
  "required": [
    "count",
    "results"
  ],
  "properties": {
    "count": {
      "type": "integer",
      "description": "Number of results on this page, not the total. Request pages until `next` is null to get every result."
    },
    "next": {
      "type": "string",
      "format": "uri",
      "nullable": true
    },
    "previous": {
      "type": "string",
      "format": "uri",
      "nullable": true
    },
    "current_filters": {
      "type": "object",
      "additionalProperties": true
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "API key ID."
          },
          "name": {
            "type": "string",
            "description": "Key name."
          },
          "prefix": {
            "type": "string",
            "description": "Key prefix."
          },
          "is_test": {
            "type": "boolean",
            "description": "Test or production key."
          },
          "expiry_date": {
            "type": "string",
            "format": "date-time",
            "description": "Expiry date."
          },
          "max_usage": {
            "type": "integer",
            "description": "Max usage count. -1 = unlimited."
          },
          "rate_limit": {
            "type": "number",
            "nullable": true,
            "description": "Requests per minute. null uses the organization default."
          },
          "spending_limit": {
            "type": "number",
            "description": "Spending limit in USD. `null` when not set.",
            "nullable": true
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "When the API key was created."
          },
          "unique_organization_id": {
            "type": "string",
            "nullable": true,
            "description": "Owning organization UUID."
          }
        },
        "additionalProperties": true
      }
    }
  }
}

403

The API key is missing, invalid or expired.

application/json

Field Type Requirement Description and constraints
$ object Body
-
detail string Required in parent
-

OpenAPI response schema

{
  "type": "object",
  "required": [
    "detail"
  ],
  "properties": {
    "detail": {
      "type": "string"
    }
  }
}
Example
JSON
{ "detail": "Your API key is invalid or expired, please check your API key in the platform settings." }

OpenAPI source

The operation and referenced components below retain the complete OpenAPI definitions, including constraints and examples.

OpenAPI operation

{
  "summary": "List temporary API keys",
  "operationId": "listApiKeys",
  "tags": [
    "Temporary API Keys"
  ],
  "description": "Returns unrevoked temporary API keys for your organization.",
  "responses": {
    "200": {
      "description": "Paginated API keys.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "count",
              "results"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "description": "Number of results on this page, not the total. Request pages until `next` is null to get every result."
              },
              "next": {
                "type": "string",
                "format": "uri",
                "nullable": true
              },
              "previous": {
                "type": "string",
                "format": "uri",
                "nullable": true
              },
              "current_filters": {
                "type": "object",
                "additionalProperties": true
              },
              "results": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "API key ID."
                    },
                    "name": {
                      "type": "string",
                      "description": "Key name."
                    },
                    "prefix": {
                      "type": "string",
                      "description": "Key prefix."
                    },
                    "is_test": {
                      "type": "boolean",
                      "description": "Test or production key."
                    },
                    "expiry_date": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Expiry date."
                    },
                    "max_usage": {
                      "type": "integer",
                      "description": "Max usage count. -1 = unlimited."
                    },
                    "rate_limit": {
                      "type": "number",
                      "nullable": true,
                      "description": "Requests per minute. null uses the organization default."
                    },
                    "spending_limit": {
                      "type": "number",
                      "description": "Spending limit in USD. `null` when not set.",
                      "nullable": true
                    },
                    "created": {
                      "type": "string",
                      "format": "date-time",
                      "description": "When the API key was created."
                    },
                    "unique_organization_id": {
                      "type": "string",
                      "nullable": true,
                      "description": "Owning organization UUID."
                    }
                  },
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "403": {
      "$ref": "#/components/responses/InvalidApiKey"
    }
  },
  "security": [
    {
      "RespanApiKey": []
    }
  ]
}

OpenAPI path metadata

{}

Referenced OpenAPI components

{
  "responses": {
    "InvalidApiKey": {
      "description": "The API key is missing, invalid or expired.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "detail"
            ],
            "properties": {
              "detail": {
                "type": "string"
              }
            }
          },
          "example": {
            "detail": "Your API key is invalid or expired, please check your API key in the platform settings."
          }
        }
      }
    }
  },
  "securitySchemes": {
    "RespanApiKey": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "Respan API key",
      "description": "Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.",
      "x-fern-bearer": {
        "name": "respanApiKey",
        "env": "RESPAN_API_KEY"
      }
    }
  }
}