CreateApiKey

POST/organizations/{org_id}/api-keys/v1

Path Parameters

org_id*org_id

The org_id path parameter.

Request Body

required
application/json
{
  "name": "Production Key",
  "project_id": "Bq4y3QB38S",
  "expiring_at": "2026-01-15T10:30:00Z",
  "policy_ids": [
    "aS9d0F1g2H"
  ]
}
name?string
project_id?string
expiring_at?object
policy_ids?array<string>

Response Body

200application/json

Success

type: unknown

{
  "$ref": "#/components/schemas/apikeys.v1.CreateApiKeyResponse",
  "$ref-value": {
    "type": "object",
    "properties": {
      "api_key": {
        "allOf": [
          {
            "$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": {
                  "allOf": [
                    {
                      "$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."
                      }
                    }
                  ],
                  "examples": [
                    "2026-01-15T10:30:00Z"
                  ],
                  "title": "created_at"
                },
                "expiring_at": {
                  "allOf": [
                    {
                      "$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."
                      }
                    }
                  ],
                  "examples": [
                    "2026-01-15T10:30:00Z"
                  ],
                  "title": "expiring_at"
                },
                "last_used": {
                  "allOf": [
                    {
                      "$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."
                      }
                    }
                  ],
                  "examples": [
                    "2026-01-15T10:30:00Z"
                  ],
                  "title": "last_used"
                },
                "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"
                }
              },
              "title": "ApiKey",
              "additionalProperties": false
            }
          }
        ],
        "title": "api_key"
      }
    },
    "title": "CreateApiKeyResponse",
    "additionalProperties": false
  }
}
curl -X POST "https://api.rixl.com/organizations/OR98234j23/api-keys/v1" \
  -H "Content-Type: application/json" \
  -d '{}'

Success

application/json

{
  "$ref": "#/components/schemas/apikeys.v1.CreateApiKeyResponse",
  "$ref-value": {
    "type": "object",
    "properties": {
      "api_key": {
        "allOf": [
          {
            "$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": {
                  "allOf": [
                    {
                      "$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."
                      }
                    }
                  ],
                  "examples": [
                    "2026-01-15T10:30:00Z"
                  ],
                  "title": "created_at"
                },
                "expiring_at": {
                  "allOf": [
                    {
                      "$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."
                      }
                    }
                  ],
                  "examples": [
                    "2026-01-15T10:30:00Z"
                  ],
                  "title": "expiring_at"
                },
                "last_used": {
                  "allOf": [
                    {
                      "$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."
                      }
                    }
                  ],
                  "examples": [
                    "2026-01-15T10:30:00Z"
                  ],
                  "title": "last_used"
                },
                "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"
                }
              },
              "title": "ApiKey",
              "additionalProperties": false
            }
          }
        ],
        "title": "api_key"
      }
    },
    "title": "CreateApiKeyResponse",
    "additionalProperties": false
  }
}