---
updatedAt: 2025-09-23T20:53:30.000Z
agentTools:
  projectIndex: https://developers.berkeleypayment.com/llms.txt
---

# Create Temporary Key

Used to create a temporary API key that will expire in 15 minutes.  This key can be used to authorise a request to any endpoint *except* endpoints starting with secure.

Two types of temporary keys can be created:

Type "private" may be used in place of secret tokens.

Type "public" may be used in place of public tokens.

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Temporary Authentication Keys",
    "description": "Temporary keys are used as a short lived alternative to the standard bearer token. That can be used on all endpoints except to create or delete a new authentication key.",
    "version": "1.0.0",
    "contact": {}
  },
  "servers": [
    {
      "url": "https://api.staging.pungle.co/",
      "description": "Staging/Test"
    },
    {
      "url": "https://api.pungle.io",
      "description": "Production"
    }
  ],
  "paths": {
    "/api/v1/secure/key": {
      "post": {
        "tags": [
          "Temporary keys"
        ],
        "summary": "Create Temporary Key",
        "description": "Used to create a temporary API key that will expire in 15 minutes.  This key can be used to authorise a request to any endpoint *except* endpoints starting with secure.\n\nTwo types of temporary keys can be created:\n\nType \"private\" may be used in place of secret tokens.\n\nType \"public\" may be used in place of public tokens.",
        "operationId": "createTemporaryKey",
        "parameters": [
          {
            "name": "type",
            "required": true,
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "private",
                "public"
              ],
              "example": "private"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Public Key",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string",
                          "example": "I2Fie3s8VpkRSamhXuZLvAOCJB7xwzoWQ516nE"
                        },
                        "type": {
                          "type": "string",
                          "example": "public"
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Public Key": {
                    "value": {
                      "data": {
                        "token": "I2Fie3s8VpkRSamhXuZLvAOCJB7xwzoWQ516nE",
                        "type": "public"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```