Create Service Account API Key Private Preview
Creates a new API key for the specified service account. The secret is returned once at creation and cannot be retrieved again.
Note: Only a regular user can perform this operation.
Request schema
Path parameters
The unique identifier for the user within the account.
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
The number of days until the API key expires. Defaults to 90. Maximum is 365.
POST /v1/users/userId/api-keys HTTP/1.1 Accept: application/json Authorization: BasicContent-Type: application/json Host: api.fivetran.com Content-Length: 34 { "expiration_period_days": 90 }
Responses
201
Response status code
Response status text
The public identifier of the API key.
The secret portion of the API key. Only returned at creation time and cannot be retrieved again.
The status of the API key. Possible values: ACTIVE: The key has a single active secret, ACTIVE_GRACE: The key has two active secrets during rotation overlap, and EXPIRED: The key has expired.
The timestamp that the user created their API key
The timestamp when the API key expires.
{ "code": "Success", "message": "API key has been created", "data": { "key_value": "key_abc123", "key_secret": "secret_xyz789", "key_status": "ACTIVE", "created_at": "2024-01-01T00:00:00Z", "expires_at": "2024-04-01T00:00:00Z" } }