Create API key
POST
/platform/api-keysCreate a new API key for a project in the authenticated organization
Authorization
Bearer Authorization<token>
In: header
Request Body
requiredapplication/json{
"$ref": "#/components/schemas/types.CreateAPIKeyRequest",
"$ref-value": {
"properties": {
"expiring_at": {
"type": "string"
},
"name": {
"type": "string"
},
"project_id": {
"type": "string"
}
},
"required": [
"name",
"project_id"
],
"type": "object"
}
}Response Body
200application/json
OK
type: unknown
{
"$ref": "#/components/schemas/apikeysv1.CreateApiKeyResponse",
"$ref-value": {
"properties": {
"api_key": {
"$ref": "#/components/schemas/apikeysv1.ApiKey",
"$ref-value": {
"properties": {
"created_at": {
"type": "string"
},
"expiring_at": {
"type": "string"
},
"id": {
"type": "string"
},
"last_used": {
"type": "string"
},
"name": {
"type": "string"
},
"org_id": {
"type": "string"
},
"project_id": {
"type": "string"
},
"project_name": {
"type": "string"
},
"secret": {
"type": "string"
}
},
"type": "object"
}
}
},
"type": "object"
}
}curl -X POST "https://api.rixl.com/platform/api-keys" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"project_id": "string"
}'OK
application/json
{
"$ref": "#/components/schemas/apikeysv1.CreateApiKeyResponse",
"$ref-value": {
"properties": {
"api_key": {
"$ref": "#/components/schemas/apikeysv1.ApiKey",
"$ref-value": {
"properties": {
"created_at": {
"type": "string"
},
"expiring_at": {
"type": "string"
},
"id": {
"type": "string"
},
"last_used": {
"type": "string"
},
"name": {
"type": "string"
},
"org_id": {
"type": "string"
},
"project_id": {
"type": "string"
},
"project_name": {
"type": "string"
},
"secret": {
"type": "string"
}
},
"type": "object"
}
}
},
"type": "object"
}
}