CreateApiKey
POST
header
X-API-Key<token>API key for protected endpoints, supplied in the X-API-Key header.
org_id*org_idRequest Body
requiredapplication/json{
"type": "object",
"properties": {
"name": {
"type": "string",
"examples": [
"Production Key"
],
"title": "name",
"maxLength": 64
},
"project_id": {
"type": "string",
"examples": [
"Bq4y3QB38S"
],
"title": "project_id"
},
"expiring_at": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "expiring_at",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"policy_ids": {
"type": "array",
"examples": [
[
"aS9d0F1g2H"
]
],
"items": {
"type": "string",
"examples": [
[
"aS9d0F1g2H"
]
]
},
"title": "policy_ids"
}
},
"title": "CreateApiKeyRequest",
"additionalProperties": false
}name?string
project_id?string
expiring_at?unknown
policy_ids?array<string>
Response Body
200application/json
Success
type: unknown
{
"$ref": "#/components/schemas/apikeys.v1.CreateApiKeyResponse",
"$ref-value": {
"type": "object",
"properties": {
"api_key": {
"title": "api_key",
"$ref": "#/components/schemas/apikeys.v1.ApiKey",
"$ref-value": {
"type": "object",
"properties": {
"id": {
"type": "string",
"examples": [
"XyZ9aB8cD1"
],
"title": "id"
},
"project_id": {
"type": "string",
"examples": [
"Bq4y3QB38S"
],
"title": "project_id"
},
"name": {
"type": "string",
"examples": [
"Production Key"
],
"title": "name",
"maxLength": 64
},
"org_id": {
"type": "string",
"examples": [
"OR98234j23"
],
"title": "org_id"
},
"project_name": {
"type": "string",
"title": "project_name"
},
"created_at": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "created_at",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"expiring_at": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "expiring_at",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"last_used": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "last_used",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"secret": {
"type": "string",
"examples": [
"rxl_Bq4y3QB38SFpzVPNx1cG"
],
"title": "secret"
},
"policy_ids": {
"type": "array",
"examples": [
[
"aS9d0F1g2H"
]
],
"items": {
"type": "string",
"examples": [
[
"aS9d0F1g2H"
]
]
},
"title": "policy_ids"
},
"permissions": {
"type": "array",
"examples": [
[
"media:videos:read"
]
],
"items": {
"type": "string",
"examples": [
[
"media:videos:read"
]
]
},
"title": "permissions"
},
"previous_secret_expires_at": {
"examples": [
"2026-01-16T10:30:00Z"
],
"title": "previous_secret_expires_at",
"description": "When the previous secret stops working. Unset unless a staged rotation overlap is active.",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"secret_rotated_at": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "secret_rotated_at",
"description": "When the current secret was issued by a rotation. Unset if the key was never rotated.",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"secret_state": {
"title": "secret_state",
"description": "Whether only the current secret is valid, or the previous secret is also valid until previous_secret_expires_at.",
"$ref": "#/components/schemas/apikeys.v1.SecretState",
"$ref-value": {
"type": "string",
"title": "SecretState",
"enum": [
"SECRET_STATE_UNSPECIFIED",
"SECRET_STATE_SINGLE",
"SECRET_STATE_OVERLAP"
]
}
}
},
"title": "ApiKey",
"additionalProperties": false
}
}
},
"title": "CreateApiKeyResponse",
"additionalProperties": false
}
}default
curl -X POST 'https://api.rixl.com/organizations/OR98234j23/api-keys/v1'Success
application/json
{
"$ref": "#/components/schemas/apikeys.v1.CreateApiKeyResponse",
"$ref-value": {
"type": "object",
"properties": {
"api_key": {
"title": "api_key",
"$ref": "#/components/schemas/apikeys.v1.ApiKey",
"$ref-value": {
"type": "object",
"properties": {
"id": {
"type": "string",
"examples": [
"XyZ9aB8cD1"
],
"title": "id"
},
"project_id": {
"type": "string",
"examples": [
"Bq4y3QB38S"
],
"title": "project_id"
},
"name": {
"type": "string",
"examples": [
"Production Key"
],
"title": "name",
"maxLength": 64
},
"org_id": {
"type": "string",
"examples": [
"OR98234j23"
],
"title": "org_id"
},
"project_name": {
"type": "string",
"title": "project_name"
},
"created_at": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "created_at",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"expiring_at": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "expiring_at",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"last_used": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "last_used",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"secret": {
"type": "string",
"examples": [
"rxl_Bq4y3QB38SFpzVPNx1cG"
],
"title": "secret"
},
"policy_ids": {
"type": "array",
"examples": [
[
"aS9d0F1g2H"
]
],
"items": {
"type": "string",
"examples": [
[
"aS9d0F1g2H"
]
]
},
"title": "policy_ids"
},
"permissions": {
"type": "array",
"examples": [
[
"media:videos:read"
]
],
"items": {
"type": "string",
"examples": [
[
"media:videos:read"
]
]
},
"title": "permissions"
},
"previous_secret_expires_at": {
"examples": [
"2026-01-16T10:30:00Z"
],
"title": "previous_secret_expires_at",
"description": "When the previous secret stops working. Unset unless a staged rotation overlap is active.",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"secret_rotated_at": {
"examples": [
"2026-01-15T10:30:00Z"
],
"title": "secret_rotated_at",
"description": "When the current secret was issued by a rotation. Unset if the key was never rotated.",
"$ref": "#/components/schemas/google.protobuf.Timestamp",
"$ref-value": {
"type": "string",
"examples": [
"2023-01-15T01:30:15.01Z",
"2024-12-25T12:00:00Z"
],
"format": "date-time",
"description": "A point in time in RFC 3339 format, with up to nanosecond precision. Output uses UTC (`Z`); input may use an offset from UTC."
}
},
"secret_state": {
"title": "secret_state",
"description": "Whether only the current secret is valid, or the previous secret is also valid until previous_secret_expires_at.",
"$ref": "#/components/schemas/apikeys.v1.SecretState",
"$ref-value": {
"type": "string",
"title": "SecretState",
"enum": [
"SECRET_STATE_UNSPECIFIED",
"SECRET_STATE_SINGLE",
"SECRET_STATE_OVERLAP"
]
}
}
},
"title": "ApiKey",
"additionalProperties": false
}
}
},
"title": "CreateApiKeyResponse",
"additionalProperties": false
}
}