{"type":"api","title":"Regenerate API Key","meta":{"id":"/apps/pubhub/media/000-v7-apis/f5ff389326d2bc679fc5f926ad0c9b7bb4ec2b95/1cb7581d-6e45-3f1d-a60a-94a1ce08dad1","info":{"title":"API Keys API","description":"Manage API Keys for programmatic access to the ThousandEyes API.\n\nAPI Keys are organization-owned credentials that are not tied to an individual user account. Each key has its own permissions and can be scoped to one or more account groups or to the entire organization.\n","version":"7.0.109"},"security":[{"BearerAuth":[]}],"tags":[{"name":"API Keys"}],"openapi":"3.0.1","servers":[{"description":"ThousandEyes API production URL","url":"https://api.thousandeyes.com/v7"}],"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Bearer authentication token"}}},"spec":{"tags":["API Keys"],"summary":"Regenerate API Key","operationId":"regenerateApiKey","description":"Regenerates the API Key used to authenticate this request.\n\nAuthenticate with the API Key you want to regenerate. ThousandEyes API bearer tokens are not supported for this operation.\n\n* A new key and expiration date are returned in the response. The new key keeps the same name, permissions, and account group access.\n* The previous key remains valid for 7 days, giving you time to update your integrations.\n* The full key value is included only in this response. Store it securely. It cannot be retrieved again.\n\nIf the previous key is still within its grace period, another regeneration is not allowed until that period ends.\n","responses":{"200":{"description":"API Key regenerated successfully.","content":{"application/hal+json":{"schema":{"type":"object","description":"Details of the regenerated API Key.","required":["id","name","key","status","createdAt","validUntil"],"properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the key.","example":"550e8400-e29b-41d4-a716-446655440000","$$ref":"#/components/schemas/ApiKeyId","readOnly":true},"name":{"type":"string","description":"A name to help you identify this key.","example":"CI/CD Pipeline Token","readOnly":true},"key":{"type":"string","description":"Full key value. Returned only when a key is created or regenerated.","example":"2c-new98xy76-1234-4abc-8def-1234567890ab","readOnly":true},"status":{"type":"string","description":"Current status of the API Key. Keys past their expiration date are reported as `expired`.","enum":["active","inactive","expired"],"example":"active","$$ref":"#/components/schemas/ApiKeyStatus","readOnly":true},"createdAt":{"type":"string","format":"date-time","description":"Date and time when the key was created, in UTC.","example":"2026-02-10T10:30:00Z","readOnly":true},"validUntil":{"type":"string","format":"date-time","description":"Date and time when the key expires, in UTC.","example":"2026-08-09T10:30:00Z","readOnly":true}},"$$ref":"#/components/schemas/RegenerateApiKeyResponse"},"example":{"id":"550e8400-e29b-41d4-a716-446655440000","name":"CI/CD Pipeline Token","key":"2c-new98xy76-1234-4abc-8def-1234567890ab","status":"active","createdAt":"2026-02-10T10:30:00Z","validUntil":"2026-08-09T10:30:00Z"}}}},"401":{"description":"Unauthorized","content":{"application/problem+json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"invalid_token"},"error_description":{"type":"string","example":"Invalid access token"}},"$$ref":"#/components/schemas/UnauthorizedError"}}},"$$ref":"#/components/responses/401"},"403":{"description":"Insufficient permissions to query endpoint","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\"."},"title":{"type":"string","description":"A short, human-readable summary of the problem type."},"status":{"type":"integer","description":"The HTTP status code generated by the origin server for this occurrence of the problem."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."},"instance":{"type":"string","description":"A URI reference that identifies the specific occurrence of the problem."}},"$$ref":"#/components/schemas/Error"}}},"$$ref":"#/components/responses/403"},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\"."},"title":{"type":"string","description":"A short, human-readable summary of the problem type."},"status":{"type":"integer","description":"The HTTP status code generated by the origin server for this occurrence of the problem."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."},"instance":{"type":"string","description":"A URI reference that identifies the specific occurrence of the problem."}},"$$ref":"#/components/schemas/Error"},"example":{"type":"about:blank","title":"URI Resource Not Found","status":404,"detail":"Details explaining if the 404 error is related to an invalid URI or a wrong ID","instance":"/v7"}}},"$$ref":"#/components/responses/404"},"409":{"description":"The previous key is still within its grace period. Wait until the grace period ends before regenerating again.","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\"."},"title":{"type":"string","description":"A short, human-readable summary of the problem type."},"status":{"type":"integer","description":"The HTTP status code generated by the origin server for this occurrence of the problem."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."},"instance":{"type":"string","description":"A URI reference that identifies the specific occurrence of the problem."}},"$$ref":"#/components/schemas/Error"},"example":{"type":"about:blank","title":"Conflict","status":409,"detail":"This key was regenerated recently. Wait for the grace period to end before regenerating again.","instance":"/v7/api-keys/regenerate"}}}},"429":{"description":"Exhausted rate limit for the organization","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\"."},"title":{"type":"string","description":"A short, human-readable summary of the problem type."},"status":{"type":"integer","description":"The HTTP status code generated by the origin server for this occurrence of the problem."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."},"instance":{"type":"string","description":"A URI reference that identifies the specific occurrence of the problem."}},"$$ref":"#/components/schemas/Error"}}},"$$ref":"#/components/responses/429"},"500":{"description":"Internal server error","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"A URI reference that identifies the problem type. When this member is not present, its value is assumed to be \"about:blank\"."},"title":{"type":"string","description":"A short, human-readable summary of the problem type."},"status":{"type":"integer","description":"The HTTP status code generated by the origin server for this occurrence of the problem."},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem."},"instance":{"type":"string","description":"A URI reference that identifies the specific occurrence of the problem."}},"$$ref":"#/components/schemas/Error"},"example":{"type":"about:blank","title":"Internal server error","status":500,"detail":"Optional detail about the internal error message.","instance":"/v7"}}},"$$ref":"#/components/responses/500"}},"__originalOperationId":"regenerateApiKey","security":[{"BearerAuth":[]}],"method":"post","path":"/api-keys/regenerate"}}