Create SubAccount API Key

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

POST /user/apikey

Creates (or regenerates) an API key for a sub-account. If the sub-account already has a key, calling this replaces it in place — the previous key is immediately invalidated.

📘

Authorization

Only parent accounts can generate API keys for their sub-accounts. The sub-account must be owned by the authenticated parent.

HTTP Method & Path

POST /user/apikey?isSubaccount=true&userId={subaccount_id}

Base URL: https://api-v2.pandavideo.com.br

Authentication Requirements

  • Security Scheme: PandaAuth (apiKey)
  • Header: Authorization: <your_api_token> (no Bearer prefix)

Parameters

NameInTypeRequiredDescription
AuthorizationheaderstringYesPanda API token (without Bearer prefix)

Query Parameters

NameTypeRequiredDescription
isSubaccountbooleanYesMust be true (lowercase, compared strictly as the string "true") to target a sub-account
userIdstring (uuid)YesSub-account to generate the key for (required when isSubaccount=true)
🚧

Replaces the existing key. If the sub-account already has an API key, this call overwrites it; the old key stops working immediately and cannot be recovered.

⚠️

The key value is shown only once. The full api_key is returned only in this response — it is stored hashed and never returned again by GET /user/apikey. If lost, generate a new one.

There is no request body.

Response

Success Response (200)

{
  "apikey": {
    "id": "5750356b-628c-0000-0000-999999999",
    "user_id": "efsd2323-df17-46b6-bfd8-e0990b04010",
    "api_key": "panda-07ac29b909fb...",
    "created_at": "2026-01-06T15:06:15.000Z"
  }
}
FieldTypeDescription
apikey.idstring (uuid)API key record ID
apikey.user_idstring (uuid)Sub-account user that owns the key
apikey.api_keystringThe generated key (prefix panda-) — shown only here
apikey.created_atstring (ISO 8601)Creation timestamp

Error Responses

  • 400 Bad Request — missing/invalid query params, or ownership failures: "invalid user", "invalid subaccount user", "invalid user or subaccount", "subaccount does not belong to the user".
  • 401 Unauthorized — Invalid or missing API token.
  • 500 Internal Server Error — Server error.

Example Usage

cURL

curl -X POST \
  'https://api-v2.pandavideo.com.br/user/apikey?isSubaccount=true&userId=your_subaccount_id_here' \
  -H 'Authorization: your_api_token_here'
Path Params
boolean
required
string
required
Query Params
boolean
required

Must be true to indicate this is a sub-account operation

string
required

ID of the sub-account to generate the API key for

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json