API Key Management

Create API Key

Create a new API key. Maximum 5 active keys per user. The full token (plain_token) is only returned in this response — store it securely.

post/v1/api-keys

Request

  • Base URL
    https://api.oilpriceapi.com
  • Auth
    API key in header Authorization

Request body

namestring nullable

Optional label (e.g. "Production", "Staging")

Example request

{
  "name": "Production"
}

Response

API key created

statusstring

Example response

{
  "status": "success",
  "data": {
    "api_key": {
      "token_hint": "a1b2c3d4",
      "plain_token": "a1b2c3d4e5f6..."
    }
  }
}

Changes

No recorded changes to this operation across all 17 revisions of this API.