Create team API client
POST
/api/user/teams/{id}/api-clients
const url = 'https://hitkeep.com/api/user/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/api-clients';const options = { method: 'POST', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"description":"example","expires_at":"2026-04-15T12:00:00Z","name":"example","site_roles":[{"role":"example","site_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://hitkeep.com/api/user/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/api-clients \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "description": "example", "expires_at": "2026-04-15T12:00:00Z", "name": "example", "site_roles": [ { "role": "example", "site_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ] }'Creates a team-owned API client and returns a one-time token. Team-owned clients are limited to delegated site scopes within the team.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
object
description
string
expires_at
string format: date-time
name
required
string
site_roles
Array<object>
object
role
string
site_id
string format: uuid
Example generated
{ "description": "example", "expires_at": "2026-04-15T12:00:00Z", "name": "example", "site_roles": [ { "role": "example", "site_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ]}Responses
Section titled “ Responses ”Created team API client
Media type application/json
object
client
object
created_at
string format: date-time
description
string
expires_at
string format: date-time
id
string format: uuid
instance_role
string
last_used_at
string format: date-time
name
string
owner_type
string
revoked_at
string format: date-time
site_roles
Array<object>
object
role
string
site_id
string format: uuid
tenant_id
string format: uuid
updated_at
string format: date-time
user_id
string format: uuid
token
string
Example
{ "client": { "owner_type": "personal" }}