API Keys
API Keys
GET /api/v1/me/apikeys
Get A P I Keys
getAPIKeys returns all API keys for the current user (hash excluded via json:"-")
Response
Type: []APIKey
| Field | Type | Description |
|---|---|---|
id | uuid.UUID | |
created_at | time.Time | |
updated_at | time.Time | |
user_id | string | |
organization_id | string | Optional org scope |
name | string | “CI/CD Key”, “Dev Key” |
key_prefix | string | First 8 chars for identification |
scopes | datatypes.JSON | [“models:read”, “workflows:*”] |
last_used_at | time.Time | |
expires_at | time.Time | |
disabled | bool | |
user | User | Computed (optional) |
organization | Organization | (optional) |
Example
curl -X GET \
-H "Authorization: Bearer <token>" \
https://api.seeme.ai/api/v1/me/apikeysPOST /api/v1/me/apikeys
Create A P I Key
createAPIKey generates a new API key, stores the SHA-256 hash, and returns the plaintext once
Request Body
Type: CreateAPIKeyRequest
| Field | Type | Description |
|---|---|---|
name | string | |
scopes | []string | |
organization_id | string | |
expires_in_days | int |
Response
Type: CreateAPIKeyResponse
| Field | Type | Description |
|---|---|---|
id | uuid.UUID | |
name | string | |
key_prefix | string | |
key | string | Full key, only returned on creation |
scopes | []string | |
expires_at | time.Time |
Example
curl -X POST \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{}' \
https://api.seeme.ai/api/v1/me/apikeysPUT /api/v1/me/apikeys/{id}
Update toggle A P I Key
toggleAPIKey toggles the disabled field on an API key (only owner’s keys)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
id | path | string | true |
Response
Type: APIKey
| Field | Type | Description |
|---|---|---|
id | uuid.UUID | |
created_at | time.Time | |
updated_at | time.Time | |
user_id | string | |
organization_id | string | Optional org scope |
name | string | “CI/CD Key”, “Dev Key” |
key_prefix | string | First 8 chars for identification |
scopes | datatypes.JSON | [“models:read”, “workflows:*”] |
last_used_at | time.Time | |
expires_at | time.Time | |
disabled | bool | |
user | User | Computed (optional) |
organization | Organization | (optional) |
Example
curl -X PUT \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
https://api.seeme.ai/api/v1/me/apikeys/{id}DELETE /api/v1/me/apikeys/{id}
Delete A P I Key
deleteAPIKey soft-deletes an API key (only owner’s keys)
Parameters
| Name | In | Type | Required |
|---|---|---|---|
id | path | string | true |
Example
curl -X DELETE \
-H "Authorization: Bearer <token>" \
https://api.seeme.ai/api/v1/me/apikeys/{id}