Create API key for an organization
POST/api/v1/apikeys
Create an API key for an organization. The API key will be used to authenticate the requests to the Astro Platform API.
Request
Header Parameters
APIKey
Responses
- 200
- 400
- 403
- 404
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
data
object
apiKey is the API key.
createdAt is the creation time of the APIkey.
expiresAt is the expiration time of the API key.
id is the unique identifier of the API key.
isPermanent is a flag to make the API key permanent. If true, the API key will not expire. If false, the API key will expire after the duration. If not specified, the default value is false.
orgId is the organization ID.
orgNamespace is the organization namespace.
userId is unique identifier of the user.
{
"data": {
"apikey": "string",
"createdAt": "string",
"expiresAt": "string",
"id": "string",
"isPermanent": true,
"orgId": "string",
"orgNamespace": "string",
"userId": "string"
},
"id": "string",
"message": "string",
"status": "string"
}
bad request
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}
forbidden to create an API key for this organization. Please contact your organization admin to add you as a member
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}
organization not found
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}
internal server error
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}