Ugrás a fő tartalomhoz

API-kulcs létrehozása

POST/api/v1/user/api-keys

Create a new API key for the user's selected organization.

cURL példa

curl -X POST \
  'https://app.intracord.hu/api/v1/user/api-keys' \
  -H "X-API-Key: $INTRACORD_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @request.json

Paraméterek

NévHelyTípusLeírás
authorizationheaderobject
X-API-Keyheaderobject

Kérés törzse

application/json
Séma megtekintése
{
  "properties": {
    "name": {
      "type": "string",
      "title": "Name"
    }
  },
  "type": "object",
  "required": [
    "name"
  ],
  "title": "CreateAPIKeyRequest"
}

Válaszok

200Successful Response
application/json
Séma megtekintése
{
  "properties": {
    "id": {
      "type": "integer",
      "title": "Id"
    },
    "name": {
      "type": "string",
      "title": "Name"
    },
    "key_prefix": {
      "type": "string",
      "title": "Key Prefix"
    },
    "api_key": {
      "type": "string",
      "title": "Api Key"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    }
  },
  "type": "object",
  "required": [
    "id",
    "name",
    "key_prefix",
    "api_key",
    "created_at"
  ],
  "title": "CreateAPIKeyResponse"
}
404Not found
422Validation Error
application/json
Séma megtekintése
{
  "properties": {
    "detail": {
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      },
      "type": "array",
      "title": "Detail"
    }
  },
  "type": "object",
  "title": "HTTPValidationError"
}